Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE 3330 Database Concepts MongoDB. Big Data Surge in “big data” Larger datasets frequently need to be stored in dbs Traditional relational db were not.

Similar presentations


Presentation on theme: "CSE 3330 Database Concepts MongoDB. Big Data Surge in “big data” Larger datasets frequently need to be stored in dbs Traditional relational db were not."— Presentation transcript:

1 CSE 3330 Database Concepts MongoDB

2 Big Data Surge in “big data” Larger datasets frequently need to be stored in dbs Traditional relational db were not designed for such scenario. Problems of: - Scalability - “Relational” becomes a problem * need to load two or more tables in memory - Do not take advantage of high performance processing, multiple cores, distributed processing, etc

3 NoSQL databases NoSQL dbs have following properties: - non-relational relations are not stored as PK or FK constraints - distributed - open-source - scalable - high-performance - order of magnitude faster than relational dbs

4 MongoDB One of the most popular NoSQL db Features: - JSON-style documents document contains one instance of the data can be thought of as a row in a traditional db - Faster querying - Index support - Highly flexible - More details at: https://www.mongodb.org/

5 MongoDB MongoDB is consists of a collection of documents. - A document is a record consisting of key value pairs.

6 MongoDB

7 MongoDB vs Traditional http://www.mongodb.com/nosql-explained

8 Querying MongoDB

9 MongoDB example Schema is created dynamically: Example: db.students.insert({ firstName: ‘John’, lastName: ‘Smith’, studentID: ‘1234’, major: ‘CSE’, termAdmitted: ‘Fall2013’ });

10 MongoDB example Schema is created dynamically: Note that there was no need for create database or create table commands.

11 MongoDB example It’s easy to project columns, find values http://docs.mongodb.org/manual/core/read- operations-introduction/ http://docs.mongodb.org/manual/core/read- operations-introduction/

12 MongoDB example It’s easy to project columns, find values http://docs.mongodb.org/manual/core/read- operations-introduction/ http://docs.mongodb.org/manual/core/read- operations-introduction/

13 MongoDB example Look at two tutorials: http://code.tutsplus.com/tutorials/getting-started- with-mongodb-part-1--net-22879 http://code.tutsplus.com/tutorials/getting-started- with-mongodb-part-2--net-23636

14 MongoDB example Download taco truck insert statements. Run queries for: 1.Find total types of items i.e. how many different itemTypes are there 2.Find the items which have itemType of “sauces” 3.Find items which have itemType of “sauces” and name=“Tomatillo” 4.Try to sort by price


Download ppt "CSE 3330 Database Concepts MongoDB. Big Data Surge in “big data” Larger datasets frequently need to be stored in dbs Traditional relational db were not."

Similar presentations


Ads by Google