- 전체
- 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 | 86139 |
| 공지 | [SQL컨셉] 서적 "SQL컨셉"의 샘플 데이타 베이스 SAMPLE DATABASE of ORACLE | 가을의 곰을... | 2013.02.10 | 78637 |
| 공지 | [G_SQL] Sample Database | 가을의 곰을... | 2012.05.20 | 95365 |
| 5 | [PostgreSQL] 열을 행으로 전환 쿼리 | 졸리운_곰 | 2023.01.29 | 1192 |
| 4 | [postgreSQL] PostgreSQL 계층형 쿼리 구현 방법 | 졸리운_곰 | 2023.01.29 | 1895 |
| 3 | [postgreSQL] ORACLE쿼리에서 postgreSQL쿼리 변환 | 졸리운_곰 | 2023.01.29 | 1510 |
| 2 | [postgreSQL] [PostgreSQL] stored function(stored procedures) 사용하기 | 졸리운_곰 | 2023.01.23 | 1726 |
| 1 |
[postgreSQL] [Docker] Docker에 PostgreSQL 설치하기
| 졸리운_곰 | 2023.01.21 | 2035 |

