[mongoDB] CRUD(create, read, update, delete) / 메소드 insert, find, update, delete
·
mongoDB
# C (create)db에 삽입할때 컬렉션(집합)으로 삽입해야합니다 아직 존재하지 않는 컬렉션에 무언가 삽입하면 컬렉션이 생성됩니다 매서드는 insert, insertOne, insertMany 가 있습니다 기본 db는 test로 되어있습니다 구문)db.컬렉션명.insert()dogs 컬렉션과 강아지 정보를 객체로 추가했습니다.성공하면 아래에 문구가 뜨고 id가 생성되네요show collections컬렉션 목록을 확인할 수 있습니다잘 등록되었네요 cats 컬렉션을 추가하고 Read로 넘어가겠습니다.db.cats.insert({name: 'bobo', age: 6, breed: 'scottish fold', dogFriendly: false}) db.cats.insert({name: 'bob', age:..
개발짜옹
'find' 태그의 글 목록