1 / 14

CSE 3330 Database Concepts

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 designed for such scenario.

meagan
Download Presentation

CSE 3330 Database Concepts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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, multiplecores, distributed processing, etc

  3. NoSQL databases • NoSQLdbs have following properties:- non-relationalrelations 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 NoSQLdb • Features:- JSON-style documentsdocument contains one instance of the datacan 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. MongoDBvs 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 valueshttp://docs.mongodb.org/manual/core/read-operations-introduction/

  12. MongoDB example It’s easy to project columns, find valueshttp://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: • Find total types of itemsi.e. how many different itemTypes are there • Find the items which have itemType of “sauces” • Find items which have itemType of “sauces” and name=“Tomatillo” • Try to sort by price

More Related