Document database … one kind of NoSQL database

Slides:



Advertisements
Similar presentations
Exploring Microsoft Access 2003 Chapter 3 Information From the Database: Reports and Queries.
Advertisements

Conceptual Data Modeling: ER
Data Modeling (CB 12) CPSC 356 Database Ellen Walker Hiram College (Includes figures from Database Systems by Connolly & Begg, © Addison Wesley 2002)
1 Database Theoretic Basis Entity Relationship (E-R) Modeling Database Theoretic Basis Entity Relationship (E-R) Modeling.
OUTLINE OF THE LECTURE PART I GOAL: Understand the Data Definition Statements in Fig 4.1 Step1: Columns of the Tables and Data types. Step2: Single column.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 6 (Continued) The Relational Algebra and Calculus.
Mapping an ERD to a Relational Database To map an ERD to a relational database, five rules are defined to govern how tables are constructed. 1)Rule for.
- relation schema, relations - database schema, database state
Review Database Application Development Access Database Development ER-diagram Forms Reports Queries.
CS 104 Introduction to Computer Science and Graphics Problems Introduction to Database (2) Basic SQL 12/05/2008 Yang Song.
Copyright © 2007 Ramez Elmasr and Shamkant B. Navathei Week 3 Outline Overview of Database Design Process Example Database Application (COMPANY) ER Model.
Data modeling using the entity-relationship model Winter 2006Ron McFadyen Entity-relationship model (ER model) P. 49: “This model and its variations.
Relational Data Model Sept. 2014Yangjun Chen ACS Outline: Relational Data Model Relational Data Model -relation schema, relations -database schema,
Class Number – CS 304 Class Name - DBMS Instructor – Sanjay Madria Instructor – Sanjay Madria Lesson Title – ER Model.
Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.
CS 405G Introduction to Database Systems
Chapter 3 Data Modeling Using the Entity-Relationship (ER) Model.
Outline What is ER Model? And Why? Example COMPANY Database
Systems analysis and design, 6th edition Dennis, wixom, and roth
Review: Application of Database Systems
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
Data Modeling Using the Entity-Relationship
Entity-Relationship Model Ch. 3
SQL Structured Query Language Programming Course.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
Retrieve the names of all employees in department 5 who work more than 10 hours per week on the ‘ProductX’ project. p10ssn ← (Π essn (σ hours > 10 (works-on.
1 Database Concepts 2 Definition of a Database An organized Collection Of related records.
Data Modeling Using the Entity- Relationship (ER) Model.
CS 405G: Introduction to Database Systems Lecture 2 : Database Design I.
Slide Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
Entity-Relationship Model Chapter 3 II COSC 457 Sungchul Hong.
Data Modeling Using the Entity-Relationship (ER) Data Model (Based on Chapter 3 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 3)
Copyright © 2007 Ramez Elmasr and Shamkant B. Navathei Slide 3- 1.
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 6 The Relational Algebra.
Seminar 10: OODB Design (Self-Study)
Relational Model E.F. Codd at IBM 1970 Chapter 3 (ed. 7 – Chap. 5)
603 Database Systems Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 10 A First Course in Database Systems.
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Data Modeling Using the Entity- Relationship (ER) Model.
Chapter 3: Data Modeling Using the Entity-Relationship (ER) Data Model
AJAX. Ajax  $.get  $.post  $.getJSON  $.ajax  json and xml  Looping over data results, success and error callbacks.
1Fundamentals of Database Systems 기본키에 밑줄을 그은 COMPANY 관계 데이타베이스 스키마 FNAMEMINITLNAMESSNBDATEADDRESSSEXSALARYSUPERSSNDNO EMPLOYEE DNAMEDNUMBERMGRSSNMGRSTARTDATE.
1 VIEW Structured Query Language (SQL) - Part IV.
603 Database Systems Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 16 A First Course in Database Systems.
Example COMPANY Database
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Lecture # 16 July 26,2012 Data Modeling using the Entity Relationship.
Comp 1100 Entity-Relationship (ER) Model
Data Modeling Using the Entity- Relationship (ER) Model
and Big Data Storage Systems
CS4222 Principles of Database System
Data Modeling Using the Entity- Relationship (ER) Model
Database Management Systems
Entity-Relationship Model
Document database … one kind of NoSQL database
Chapter -3- Data Modeling Using the Entity-Relationship Model
Graph Database.
Seminar 9: OODB Design (Self Study)
Outline: Relational Data Model
Joining Tables ضم الجداول وإستخراج مناظر views منها الهدف : 1- استخراج المعلومات من جدولين أو اكثر بالإستفادة من الرابط بينهما وبإستخدام SQL 2- شروط قواعد.
Company Requirements.
Data Modeling Using the Entity- Relationship Model
Initial Design of Entity Types: EMPLOYEE, DEPARTMENT, PROJECT, DEPENDENT Gender.
376a. Database Design Dept. of Computer Science Vassar College
Conceptual Data Modeling Using Entities & Relationships
Mapping an ERD to a Relational Database
DATABASE TECHNOLOGIES
Engine Part ID Part 1.
Engine Part ID Part 2.
Engine Part ID Part 2.
Mapping an ERD to a Relational Database
Presentation transcript:

Document database … one kind of NoSQL database Store data that are documents, typically with some structure. Similar documents are stored in collections. Database consists of collections where each collection contains documents. Popular language for describing data is JSON e.g. { "_id" : 1, "name" : { "first" : "John", "last" : "Backus" }, "contribs" : [ "Fortran", "ALGOL", "Backus-Naur Form", "FP" ], "awards" : [ "award" : "W.W. McDowell Award", "year" : 1967, "by" : "IEEE Computer Society" }, { "award" : "Draper Prize", "year" : 1993, "by" : "National Academy of Engineering" } ]

Each document has a unique object identifier { "_id" : 1, "name" : { "first" : "John", "last" : "Backus" }, "contribs" : [ "Fortran", "ALGOL", "Backus-Naur Form", "FP" ], "awards" : [ "award" : "W.W. McDowell Award", "year" : 1967, "by" : "IEEE Computer Society" }, { "award" : "Draper Prize", "year" : 1993, "by" : "National Academy of Engineering" } ] Each document has a unique object identifier Name is composite Contribs is multi-valued – an array Awards is multi-valued Each award is composite

employee: { "_id" : "123456789", "Fname" : "John", "Lname": "Smith", "Minit": "B", "Bdate" : "1965-01-09", "Dependents":[ "dependent_name": "Michael", "sex":"M", "Bdate":"1988-01-04", "Relationship": "Son" }, "dependent_name": "Alice", "sex":"F", "Bdate":"1988-12-30", "Relationship": "Daughter" "dependent_name": "Elizabeth", "Relationship": "Spouse" } ] Easy to model employees and dependents in one collection as there is a natural hierarchy (the one-to-many relationship)

How does one handle the supervises relationship… employee: { "_id" : 88866555, "Fname" : "James", "Lname ": "Borg", "Minit ": "E" "Bdate" : "1965-01-09", … etc Dependents:[ … } ] Supervises:[ "_id" : 33344555, "Fname" : "Franklin", "Lname ": "Wong", "Minit ": "T" "Bdate" : "1955-12-08", } How does one handle the supervises relationship… Could embed each employee within their supervisor Notice that each employee will have a Supervises entry

How does one handle the supervises relationship… Or, each employee is a separate document with references to other employees via the object identifier Don"t expect to be able to specify a join operation … rather need to program this Employee: { "_id" : 88866555, "Fname" : James", "Lname ": "Borg", "Minit ": "E" "Bdate" : "1965-01-09", … etc Dependents:[ … } ] Supervises [ ObjectID("33344555"), ObjectID("987654321"), … employee:[ "_id" : 33344555, "Fname" : "Franklin", "Lname ": "Wong", "Minit ": "T" "Bdate" : "1955-12-08", Supervises: [ObjectID:("123456789")] } To get the employees supervised by 88866555 e = db.employees.find ( { _id:88866555} ) Subordinates = db.employees.find ( { _id: $in e.Supervises} )