[mongoDB] MongoDB upsert() merge equivalent in Oracle database

 

Oracle database offers interesting option to perform all the DML operations using a single MERGE. similar to this in mongoDB starting 2.6 version the latest upsert() makes it possible to perform the following
Consider the following commands:
db.collection.find(query criteria).upsert().update(criteria);
db.collection.find(query criteria).upsert().updateOne(criteria);
db.collection.find(query criteria).upsert().replaceOne(criteria);
When documents matching query criteria is found it is either updated/replaced based on query conditions. If no document matching criteria is found, new document is inserted. This works same way as in Oracle MERGE
What is the way to pull protected fields using upsert?
It is possible as follows
{upsert:true,
select:{“protectedfield”:1} }
From mongoDB version 2.7.7 onwards it is possible to determine if upsert() uses correct indexes using explain()

 

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

[출처] http://www.learnersreference.com/mongodb-upsert-merge-equivalent-in-oracle-database/

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
공지 오라클 기본 샘플 데이터베이스 졸리운_곰 2014.01.02 96545
공지 [SQL컨셉] 서적 "SQL컨셉"의 샘플 데이타 베이스 SAMPLE DATABASE of ORACLE 가을의 곰을... 2013.02.10 87217
공지 [G_SQL] Sample Database 가을의 곰을... 2012.05.20 104085
133 [오라클, oracle] ORA-00911 : 문자가 부적합합니다 v1.0 졸리운_곰 2020.12.11 1905
132 [oracle, 오라클] 테이블이 존재 하는데, ORA-00942 발생 file 졸리운_곰 2020.12.11 4205
131 [Oracle] sysdate와 systimestamp 정리 및 예제 졸리운_곰 2020.11.12 2147
130 오라클 sysdate 샘플 쿼리 (sysdate - 1) (sysdate - 1/24)의 의미 졸리운_곰 2020.11.12 1603
129 [Oracle] 오라클 EXISTS, NOT EXISTS 사용법 정리 (IN, JOIN 비교) file 졸리운_곰 2020.11.10 2650
128 [오라클, oracle] ORA-00926:missing VALUES keyword 오류 졸리운_곰 2020.11.07 2176
127 [oracle] [오라클] SUBSTR, SUBSTRB 함수 사용방법 (문자열, 자르기, 바이트, Left) file 졸리운_곰 2020.11.07 1663
126 [Oracle] ORA-00917: 누락된 콤마 졸리운_곰 2020.11.07 1696
125 [oracle] 오라클 MOD 함수(나머지 구하기 함수, 초를 분으로 변경) 졸리운_곰 2020.11.07 1383
124 [몽고디비 mongodb] 몽고디비에서 벌크 오퍼려이션과 배열 삽입의 차이점은 what is the difference between bulk insert and array insert in Mongo db operations 졸리운_곰 2020.10.09 1408
123 [oracle] 성능 향상을 위한 다중 로우 처리 졸리운_곰 2020.10.09 1357
122 BULK SQL 사용예 졸리운_곰 2020.10.09 1868
121 Oracle :: MERGE INTO 졸리운_곰 2020.09.10 1774
120 오라클 MERGE INTO - 한번에 INSERT, UPDATE 하기 졸리운_곰 2020.09.10 1310
119 Oracle Merge 명령어 사용 file 졸리운_곰 2020.09.10 1432
118 [오라클] ORA-01476 제수가 0 입니다 졸리운_곰 2020.07.22 2178
117 다중 with문 사용 - ORACLE SQL | [PL]SQL 졸리운_곰 2020.06.28 1724
116 여러 개의 INSERT문을 한 번에 처리 졸리운_곰 2020.06.28 1421
115 [Oracle] 오라클 WITH절 사용법 & 예제 (임시 테이블 만들기) file 졸리운_곰 2020.06.28 1692
114 [oracle] WITH 구문 file 졸리운_곰 2020.06.28 1488
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED