Explain document-based NOSQL system with example.

 Document Databases

  • Document databases, like JSON (JavaScript Object Notation) objects, store data in documents. Each document has a set of field and value pairs. The values might be of many sorts, such as texts, integers, Booleans, arrays, or objects, and their structures are usually aligned with the objects that developers interact with within code.
  • Document databases are useful for a broad number of use cases and may be utilized as a general-purpose database due to their variety of field value types and strong query languages. They can expand out horizontally to accommodate enormous data volumes.
  • A document database is a type of NoSQL database that stores data as JSON documents instead of columns and rows. JSON is a native language used to both store and query data. These documents can be grouped together into collections to form database systems.

Each document consists of a number of key-value pairs. 
Here is an example of a document that consists of 4 key-value pairs:

{
"ID" : "001",
"Book" : "Java: The Complete Reference",
"Genre" : "Reference work",
"Author" : "Herbert Schildt",
}

Using JSON enables app developers to store and query data in the same document-model format that they use to organize their app’s code. The object model can be converted into other formats, such as JSON, BSON, and XML.


OR,

Document-based NOSQL system

Document-based NOSQL DB stores and retrieves data as a key value pair but the value part is stored in JSON (Javascript object Notation ) or ML. Each document contains pairs of fields and values. The value can typically be a variety of types including like strings, numbers, booleans, arrays, or objects.

Consider the below example that shows a sample database stored in both Relational and document databases.

Document Database

F_name;"Marry ",
L_name: "Jones",
Contact: "1234567890"
City:"London",
DOB: 1986,
Location:{
              type: "Point",
               Coordinates: "[-73.986, 40.754]
                },

Profession: [ "Developer", "Engineer"]
           apps:[
          { name:"MYAPP",
           version: 1.04},
             
          { name: "DocFinder",
            version: 2.57}
                 ],

Cars:[
       { Make:"Bently",
        Year : 1973},

          { Make: " Rolls Royce",
           Year: 1965}
            ]



 

Comments

Popular posts from this blog

Suppose that a data warehouse for Big-University consists of the following four dimensions: student, course, semester, and instructor, and two measures count and avg_grade. When at the lowest conceptual level (e.g., for a given student, course, semester, and instructor combination), the avg_grade measure stores the actual course grade of the student. At higher conceptual levels, avg_grade stores the average grade for the given combination. a) Draw a snowflake schema diagram for the data warehouse. b) Starting with the base cuboid [student, course, semester, instructor], what specific OLAP operations (e.g., roll-up from semester to year) should one perform in order to list the average grade of CS courses for each BigUniversity student. c) If each dimension has five levels (including all), such as “student < major < status < university < all”, how many cuboids will this cube contain (including the base and apex cuboids)?

Suppose that a data warehouse consists of the four dimensions; date, spectator, location, and game, and the two measures, count and charge, where charge is the fee that a spectator pays when watching a game on a given date. Spectators may be students, adults, or seniors, with each category having its own charge rate. a) Draw a star schema diagram for the data b) Starting with the base cuboid [date; spectator; location; game], what specific OLAP operations should perform in order to list the total charge paid by student spectators at GM Place in 2004?

What is national data warehouse? What is census data?