Conceptual modeling of databases

Slides:



Advertisements
Similar presentations
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Advertisements

System Analysis - Data Modeling
Database Design (Data Modeling) DCO11310 Database Systems and Design By Rose Chang.
--The Entity Relationship Model(1)--1 The Entity Relationship Model.
Modeling Data The Entity Relationship Model (ER) For Database Design.
Database Design Concepts Info1408
Chapter Five Data Modeling with the Entity-Relationship Model.
Class 8: Data Management July 20 th,  Grades are posted: _summer2011/grades/grades.htm
Entity/Relationship Modelling
Yong Choi School of Business CSUB
Data Modeling Using the Entity-Relationship Model
1. 2 Data Modeling 3 Process of creating a logical representation of the structure of the database The most important task in database development E-R.
1 Data Modeling : ER Model Lecture Why We Model  We build models of complex systems because we cannot comprehend any such system in its entirety.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Database Design Principles – Lecture 3
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
ERD ( Conceptual data model From the statement of data requirements a conceptual data model is produced. This describes.
Databases Illuminated Chapter 3 The Entity Relationship Model.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
Database Design – Lecture 6 Moving to a Logical Model.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
EntityRelationshipDiagrams. Entity Relationship Models The E-R (entity-relationship) data model views the real world as a set of basic objects (entities)
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
ERD :: 19 / 1 / Entity-Relationship (ER) Modeling. ER Modeling is a top-down approach to database design. Entity Relationship (ER) Diagram –A.
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
DATA MODELING AND ENTITY-RELATIONSHIP MODEL II IST 210: Organization of Data IST210 1.
Databases and Database User ch1 Define Database? A database is a collection of related data.1 By data, we mean known facts that can be recorded and that.
Data Modeling Using the Entity- Relationship (ER) Model
Database Design Chapters 17 and 18.
Entity Relationship Modeling
Data Modeling Using the ERD
Let try to identify the conectivity of these entity relationship
Business System Development
Database Development Lifecycle
Entity- Relationship (ER) Model
The Relational Model.
Databases Chapter 16.
© The McGraw-Hill Companies, All Rights Reserved APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Entity-Relationship Model
Tables and Their Characteristics
Database Design – Lecture 4
Chapter 7: Entity-Relationship Model
Outline of the ER Model By S.Saha
ER MODEL Lecture 3.
ERD :: 19 / 1 / Entity-Relationship (ER) Modeling. ER Modeling is a top-down approach to database design. Entity Relationship (ER) Diagram –A.
بسم الله الرحمن الرحيم.
CS 174: Server-Side Web Programming February 12 Class Meeting
ERD’s REVIEW DBS201.
Database Fundamentals
Overview of Entity‐Relationship Model
Entity Relationship Diagrams
Database Systems: Design, Implementation, and Management Tenth Edition
Data Modeling with Entity Relationship Diagrams (Cont.)
Session 2 Welcome: The seventh learning sequence
Database Design Chapters 17 and 18.
Database Modeling using Entity Relationship Model (E-R Model)
Review of Week 1 Database DBMS File systems vs. database systems
Conceptual Data Modeling Using Entities & Relationships
MIS2502: Data Analytics Relational Data Modeling
Chapter 4 Entity Relationship (ER) Modeling
Chapter 7: Entity-Relationship Model
Entity-Relationship Diagram (ERD)
DBMS ER-Relational Mapping
Entity Relation Model Tingting Zhang.
Database Management system
Database Management system
Entity Relationship Model
ER MODELING Instructor: SAMIA ARSHAD
Entity-Relationship Design
Presentation transcript:

Conceptual modeling of databases Database Management Systems Instructor: Karthik Srinivasan 5/19/2019 Database Management Systems

Recollect What is a database? A database is an organized collection of logically related data, designed to meet the information needs of an organization 5/19/2019 Database Management Systems

Learning objectives To be able to describe a database miniworld To be able to describe what is conceptual model in database design To be able to define the elements of a conceptual model To be able to create a conceptual model (i.e., an entity relationship diagram) for a given description of a miniworld 5/19/2019 Database Management Systems

Miniworld A miniworld is a system we are interested in knowing more about, and whose data we wish to store and access using a database Examples of miniworlds: A company A restaurant A shop A hospital Miniworld are also called as universe of discourse. 5/19/2019 Database Management Systems

A miniworld contains entities Customers Products Employees Transactions Operating costs Miniworld of a shop Suppliers Stock Can you list entities of the miniworld of a university? 5/19/2019 Database Management Systems

What is a conceptual model? Schema of a database modeled as a collection of entities and relationships among entities Also called Entity-Relationship Diagram or an ER model Representation of business rules and requirements as a diagram What is the need to represent business rules using a conceptual model? 5/19/2019 Database Management Systems

Need for a conceptual model Starting point for the design process after requirement gathering/analysis A communication tool to describe the database A model is independent of technology Elicits business rules to all stakeholders Strong foundation for development process 5/19/2019 Database Management Systems

How a conceptual model looks like… 5/19/2019 Database Management Systems

Chen notation for conceptual modeling 5/19/2019 Database Management Systems

Entity class, instance and attribute Entity class: An abstract representation of a person, place, thing, or event about which information is maintained e.g., Customer, Product, Company Instance: A specific person, place, thing, or event; a single representation of an entity e.g., John (Customer), iPhone X (Product), Intel (Company) Attribute: A characteristic or quality of an entity e.g., Age (Customer), Cost (Product), Turnover (Company) A record is also called instance/tuple/entry 5/19/2019 Database Management Systems

Entity class, instance and attribute Entity class often corresponds to a table in a database e.g., Customers table, Products table, Companies table Instances correspond to rows in the table represented by an entity class Attributes correspond to columns in the table represented by an entity class A record is also called instance/tuple/entry 5/19/2019 Database Management Systems

Entity class and instances Students Entity/Instance “Hi - I’m Mark.” “Hi - I’m John.” “Hi - I’m Julia.” Entity class 5/19/2019 Database Management Systems

Entity class as a table Students Given that we have some information about each of these students, we can create the following table STUDENTS table Students Mark John Julia Student Name Student Email Student GPA Mark mark@highschool.com 3.8 John john@highschool.com Julia julia@highschool.com 3.9 … 5/19/2019 Database Management Systems

Representing the Entity class STUDENTS table STUDENTS Entity class Student Name Student Email Student GPA Mark mark@highschool.com 3.8 John john@highschool.com Julia julia@highschool.com 3.9 … STUDENTS student GPA student Name Student Email Note that the conceptual model does not show entity instances! 5/19/2019 Database Management Systems

A more verbose example John Doe bought 10 dollars worth of Cheese and 20 dollars worth of Ham in the foods section of Walmart How many entities are present in the above Walmart mini-world? A record is also called instance/tuple/entry Note that the mini-world (i.e., Walmart) itself is NOT specified as an entity 5/19/2019 Database Management Systems

Entities – Example (contd.) Answer: 4 entities from 3 entity classes John Doe bought 10 dollars worth of Cheese and 20 dollars worth of Ham in the foods section of Walmart A record is also called instance/tuple/entry 5/19/2019 Database Management Systems

Entities – Example (contd.) John Doe bought 10 dollars worth of Cheese and 20 dollars worth of Ham in the foods section of Walmart PRODUCTS table CUSTOMERS table Product Product ID Product type Cheese 23322 Milk-based Ham 23244 Meat … Name Customer ID Address John Doe 832333 1333 N . … SECTIONS table Section Section ID Section category Foods 2 Perishable … 5/19/2019 Database Management Systems

Primary Key Primary key is an attribute in an entity class that uniquely identifies an entity/instance It is one of the attributes chosen to identify entity instances uniquely The attribute which is the primary key: Should not change values over time for each row Must be unique for each row Must have non-null values for each row 5/19/2019 Database Management Systems

Primary key - Example STUDENTS studentID studentName studentEmail STUDENTS table Student ID Student Name Student Email 212 Mark mark@highschool.com 213 John john@highschool.com 214 Julia julia@highschool.com … Why should StudentID be the primary key and not Name or Email? 5/19/2019 Database Management Systems

Primary key – Another example TEACHERS teacherID teacherName teacherEmail teacherSalary Which is the primary key for TEACHERS entity class? Can you create the table for the TEACHERS entity class? 5/19/2019 Database Management Systems

TEACHERS entity class TEACHERS Teacher ID Teacher Name Teacher Email teacherSalary Teacher ID Teacher Name Teacher Email Teacher salary 512 Martha martha@highschool.com NULL 513 Bob bob@highschool.com 44,500 … TEACHERS table 5/19/2019 Database Management Systems

COURSES entity class We want to represent all COURSES and keep track of course numbers and course names. courseNo courseName Course ID Course Name 122 Geography 123 History … COURSES 5/19/2019 Database Management Systems

What we have done so far We have created the STUDENTS, TEACHERS, and COURSES entity classes Each entity has its own attributes Each entity has a primary key 5/19/2019 Database Management Systems

Entities are connected by Relationships TEACHERS teach COURSES teacherEmail teacherName courseNo courseName Teach COURSES TEACHERS teacherSalary teacherID 5/19/2019 Database Management Systems

Entities are connected by Relationships STUDENTS enroll in COURSES courseName studentID courseNo Enroll_In STUDENTS COURSES studentName studentEmail 5/19/2019 Database Management Systems

Conceptual model for our example courseNo courseName teacherEmail teacherName Teach COURSES TEACHERS teacherSalary teacherID studentID Enroll_In STUDENTS studentName studentEmail Miniworld description: Teachers teach courses in which students enroll into 5/19/2019 Database Management Systems

Conceptual modeling guidelines Get description of the mini-world through requirement analysis Determine entity classes from the description Mark attributes for the entity classes Mark identifiers for each entity class Determine relationship classes among the entity classes Capture the user data requirements using entities, the properties of entities (i.e., attributes) and relationships between entities Use different names for different elements If an entity has only one attribute, ask yourself if it is really necessary 5/19/2019 Database Management Systems

What we learned in this module Describe a database miniworld Describe what is conceptual model in database design Define the elements of a conceptual model – Entity class, entity instances, entity attributes, relationship, primary key Create a conceptual model (i.e., an entity relationship diagram) for a given description of a miniworld 5/19/2019 Database Management Systems

A take-home example Mariott international is a hospitality company that owns several hotels across the globe. Each hotel has a unique hotel ID, website, address and customer service phone number and email. Customers checking into hotels in Mariott are assigned a unique customer number. Information such as phone number, credit card type, number of days of stay, check-in date, type of suite booked are logged for each customer. Refer the reference textbook for more worked out examples. More practice is always recommended 5/19/2019 Database Management Systems

Topics for upcoming classes Types of attributes Cardinality of relationships Types of relationships Weak entity classes Enhanced ER modeling 5/19/2019 Database Management Systems