Data Science with Python by Dusty Phillips & Fabrizio Romano & Phuong Vo.T.H & Martin Czygan & Robert Layton

Data Science with Python by Dusty Phillips & Fabrizio Romano & Phuong Vo.T.H & Martin Czygan & Robert Layton

Author:Dusty Phillips & Fabrizio Romano & Phuong Vo.T.H & Martin Czygan & Robert Layton [Phillips, Dusty]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2016-06-10T04:00:00+00:00


The preceding snippet says that our MongoDB instance only has one database, named 'local'. If the databases and collections we point to do not exist, MongoDB will create them as necessary:

>>> db = conn.db >>> db Database(MongoClient('localhost', 27017), 'db')

Each database contains groups of documents, called collections. We can understand them as tables in a relational database. To list all existing collections in a database, we use collection_names() function:

>>> lc.collection_names() ['startup_log', 'system.indexes'] >>> db.collection_names() []



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.