-
[MongoDB] ObjectId 란?Study/Web 2021. 6. 27. 16:51
ObjectId 란?
MongoDB는 Document 기반 데이터베이스인데,
ObjectId는 해당 Document 내에서 유일함을 보장하는 12byte 값으로, RDBMS의 Primary key와 같다.
Primary key는 DBMS가 부여하지만, ObjectId는 클라이언트에서 생성한다는 점이 차이가 있다.ObjectId 구조
Inc Counter은 처음 랜덤한 값에서 자동으로 Increment 되는 값이다.
Reference
https://docs.mongodb.com/manual/reference/method/ObjectId/
ObjectId — MongoDB Manual
Reference > mongo Shell Methods > Object Constructors and Methods ObjectId( )Returns a new ObjectId value. The 12-byte ObjectId value consists of:a 4-byte timestamp value, representing the ObjectId's creation, measured in seconds since the Unix epocha 5-by
docs.mongodb.com
https://developer.mongodb.com/quickstart/bson-data-types-objectid/
Quick Start: BSON Data Types - ObjectId
MongoDB provides an automatic unique identifier for the _id field in the form of an ObjectId data type.
developer.mongodb.com
https://kciter.so/posts/about-mongodb
MongoDB 이해하기
사내에서 MongoDB를 잘 쓰기위한 스터디를 하게되어 이번 기회에 관련 자료를 정리하기로 했다. MongoDB가 왜 필요한지, 더 잘사용하기 위해서 무엇이 필요한지를 중심으로 처음 MongoDB를 사용할 때
kciter.so
'Study > Web' 카테고리의 다른 글
[HTTP] Basic Authentication _ .htpasswd (0) 2021.03.08 [HTTP] Header : X-Forwarded-For (XFF) (0) 2021.02.09 [PHP] WAF Bypass : Non-Alphabets Code (0) 2021.01.11 PHP 입력 길이 제한 우회 (0) 2021.01.09 댓글