Agile Data Science - Collecting & Displaying Records



In this section, we will concentrate on the JSON structure, which forms part of the “Agile methodology”. MongoDB is a broadly used NoSQL data structure and operates effectively for collecting and displaying records.

json_structure

Step 1

This step includes building up connection with MongoDB for creating collection and determined data model. All you have to execute is “mongod” command for starting connection and mongo command to connect to the predetermined terminal.

specified_data_model

Step 2

Create a new database for creating records in JSON format. For the present, we are creating a dummy database named “mydatabase”.

>use mydatabase
switched to db mydatabase
>db
mydatabase
>show dbs
local 0.78125GB
test 0.23012GB
>db.user.insert({"name":"Agile Data Science"})
>show dbs
local 0.78125GB
mydatabase 0.23012GB
test 0.23012GB

Step 3

Creating collection is obligatory to get the list of records. This feature is beneficial for data science research and outputs.

>use test
switched to db test
>db.createCollection("mycollection")
{ "ok" : 1 }
>show collections
mycollection
system.indexes
>db.createCollection("mycol", { capped : true, autoIndexId : true, size :
 6142800, max : 10000 } )
{ "ok" : 1 }
>db.agiledatascience.insert({"name" : "demoname"})
>show collections
mycol
mycollection
system.indexes
demoname




Input your Topic Name and press Enter.