본문 바로가기
반응형

IT/MongoDB3

MongoDB 연산자 정리 # 쿼리 연산자비교$eq :    값이 같음. (필드 == 값)ex) db.users.find({ age: { $eq: 2 } })$ne :    값이 같지 않음. (필드 != 값)ex) db.users.find({ age: { $ne: 2 } })$gt :    값이 필드 값보다 큼. (필드 > 값)ex) db.users.find({ age: { $gt: 2 } })$gte :    값이 필드 값보다 크거나 같음. (필드 >= 값)ex) db.users.find({ age: { $gte: 2 } })$lt :    값이 필드 값보다 작음. (필드 ex) db.users.find({ age: { $lt: 3 } })$lte :    값이 필드 값보다 작거나 같음. (필드 ex) db.users.find(.. 2024. 5. 10.
MongoDB 기본 명령어 정리 # 계정 관리 명령어생성된 계정 목록 보기 :    show users계정 생성 하기 :    db.createUser() ex) db.createUser({ user: "root", pwd: "1111", roles: ["root"] })계정 삭제 하기 :    db.dropUser() ex) db.dropUser("root")계정 업데이트 하기 :    db.updateUser(, )# 데이터베이스 명령어생성된 DB 목록 보기 :    show dbsDB 생성 및 변경 하기 :    use ex) use database현재 사용하고 있는 DB 보기 :    dbDB 삭제 하기 :    db.dropDatabase()# 컬렉션 명령어생성된 컬렉션 목록 보기 :    show collections컬렉션.. 2024. 5. 10.
window에서 MongoDB 설치 및 실행 MongoDB란?유연하고 확장 가능한 NoSQL 데이터베이스로써 JSON과 유사한 "키-값" 형태로 데이터를 저장하게 됩니다. (내부적으로 BSON 형태로 저장함) 성능, 확장성 및 사용 편의성으로 인해 웹 애플리케이션 및 빅 데이터에 널리 사용되는 DB 입니다.MongoDB 설치1. MongoDB 공식 사이트에 접속해서 다운로드 합니다. https://www.mongodb.com/try/download/community Try MongoDB Community EditionTry MongoDB Community Edition on premise non-relational database including the Community Server and Community Kubernetes Operator f.. 2024. 5. 10.
반응형