- 전체
- Sample DB
- database modeling
- [표준 SQL] Standard SQL
- G-SQL
- 10-Min
- ORACLE
- MS SQLserver
- MySQL
- SQLite
- postgreSQL
- 데이터아키텍처전문가 - 국가공인자격
- 데이터 분석 전문가 [ADP]
- [국가공인] SQL 개발자/전문가
- NoSQL
- hadoop
- hadoop eco system
- big data (빅데이터)
- stat(통계) R 언어
- XML DB & XQuery
- spark
- DataBase Tool
- 데이터분석 & 데이터사이언스
- Engineer Quality Management
- [기계학습] machine learning
- 데이터 수집 및 전처리
- 국가기술자격 빅데이터분석기사
- 암호화폐 (비트코인, cryptocurrency, bitcoin)
NoSQL [mongoDB] MongoDB upsert() merge equivalent in Oracle database
2020.11.26 16:45
[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()
[출처] http://www.learnersreference.com/mongodb-upsert-merge-equivalent-in-oracle-database/
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
댓글 0
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
|---|---|---|---|---|
| 공지 | 오라클 기본 샘플 데이터베이스 | 졸리운_곰 | 2014.01.02 | 86121 |
| 공지 | [SQL컨셉] 서적 "SQL컨셉"의 샘플 데이타 베이스 SAMPLE DATABASE of ORACLE | 가을의 곰을... | 2013.02.10 | 78628 |
| 공지 | [G_SQL] Sample Database | 가을의 곰을... | 2012.05.20 | 95342 |
| 5 | XML database | 졸리운_곰 | 2016.11.29 | 4390 |
| 4 |
Learn XQuery in 10 Minutes: An XQuery Tutorial
| 졸리운_곰 | 2016.11.29 | 1996 |
| 3 |
xquery-tutorial.pdf
| 졸리운_곰 | 2016.11.29 | 1727 |
| 2 | XML 문서 가져오기 및 XQuery 쿼리 예제 | 졸리운_곰 | 2016.11.29 | 1563 |
| 1 |
[SQL] XQuery로 XML Data에 접근하기
| 졸리운_곰 | 2016.11.29 | 1921 |

