Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 2 This material was developed by Oregon Health & Science.

Slides:



Advertisements
Similar presentations
Data Modeling and the Entity-Relationship Model
Advertisements

Data Modeling and the Entity-Relationship Model
Entity Relationship (ER) Modeling
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 5/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
IT420: Database Management and Organization
Entity-Relationship Model
Data Modeling and the Entity-Relationship Model
Data Modeling and the Entity-Relationship Model
Concepts of Database Management Sixth Edition
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 8.
Fundamentals, Design, and Implementation, 9/e Chapter 5 Database Design.
Lecture Eleven Entity-Relationship Modelling
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke Database Processing Tenth Edition Chapter 5 Data.
Chapter Five Data Modeling with the Entity-Relationship Model.
© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
Data Modeling Entity - Relationship Models. Models Used to represent unstructured problems A model is a representation of reality Logical models  show.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 2.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke’s Chapter Five: Data Modeling with the Entity-Relationship.
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
Concepts of Database Management Seventh Edition
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 8 Structuring System Data Requirements
Entity-Relationship Model
Chapter 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
Introduction to Information and Computer Science Databases and SQL Lecture b This material (Comp4_Unit6b) was developed by Oregon Health & Science University,
APPENDIX C DESIGNING DATABASES
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke’s Chapter Five: Data Modeling with the Entity-Relationship.
Chapter 5 Database Processing.
ระบบฐานข้อมูลขั้นสูง (Advanced Database Systems) Lecturer AJ. Suwan Janin Phone:
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.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
IS 325 Notes for Wednesday September 4, Syllabus Change I eliminated quizzes I increased the points allocated to homework assignments.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 2/1 Copyright © 2004 Please……. No Food Or Drink in the class.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 4 This material was developed by Oregon Health & Science.
Concepts of Database Management Sixth Edition Chapter 6 Database Design 2: Design Method.
Entity-Relationship Modeling Based on Chapter 12.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-1 David M. Kroenke’s, 10 th ed. Chapter.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Chapter 4 Entity Relationship (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
Data Modeling IST210 Class Lecture.
Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 3 This material was developed by Oregon Health & Science.
C-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
Component 4: Introduction to Information and Computer Science Unit 6a Databases and SQL.
Component 4/Unit 6b Topic II Relational Databases Keys and relationships Data modeling Database acquisition Database Management System (DBMS) Database.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
Component 4/Unit 6d Topic IV: Design a simple relational database using data modeling and normalization Description and Information Gathering Data Model.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 4 ENTITY RELATIONSHIP (ER) MODELING Instructor Ms. Arwa Binsaleh 1.
(C) 2000, The University of Michigan 1 Database Application Design Handout #2 January 14, 2000.
1 DATABASE TECHNOLOGIES (Part 2) BUS Abdou Illia, Fall 2015 (September 9, 2015)
Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 6 This material was developed by Oregon Health & Science.
Component 10 – Fundamentals of Health Workflow Process Analysis and Redesign Unit 3-6 – Process Mapping Entity-Relationship Diagrams This material was.
Chapter 8 Entity-Relationship Modeling Pearson Education © 2009.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Five: Data Modeling with the Entity-Relationship.
Introduction to Information and Computer Science Databases and SQL Lecture d This material (Comp4_Unit6d) was developed by Oregon Health & Science University,
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
Lecture # 14 Chapter # 5 The Relational Data Model and Relational Database Constraints Database Systems.
Chapter 5 Database Design
Requirements Become the E-R Data Model
Review of Week 1 Database DBMS File systems vs. database systems
Database Processing: David M. Kroenke’s Chapter Five:
Presentation transcript:

Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 2 This material was developed by Oregon Health & Science University, funded by the Department of Health and Human Services, Office of the National Coordinator for Health Information Technology under Award Number IU24OC

Topic II Relational Databases Keys and relationships Data modeling Database acquisition Database Management System (DBMS) Database development Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring

Connecting Data Relationships Candidate keys Primary keys –Natural keys –Surrogate keys Foreign keys 3 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Data Modeling: Database Design Entities Entity-Relation Diagram (ERD) Maximum cardinality of the relationship Attributes Crow’s foot diagrams 4 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Database Acquisition Data is stored in and retrieved from a database by using Structured Query Language (SQL) 5 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

The Database Management System (DBMS) Metadata Administration of the database Carries out SQL statements and procedures Stored procedures Triggers Security (permissions) Handles processing problems Carries out backup & restore/recovery 6 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Database Development From scratch –Existing data –Data model eventually becomes DB design –Merge existing databases Modification of existing database –Most databases have already been developed 7 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Phases of Database Development 1.Gathering specifications 2.Design –Data modeling to database design 3.Testing 4.Implementation 5.Maintenance 6.Modification (starts process all over again) 8 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Gathering Specifications Attribute domains –Data type, length, legitimate values Business rules Input from users Forms and reports Existing files Outcome of this phase is a beginning data model 9 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Design More definitive specifications are gathered The data model is perfected toward the database design Entities become tables Attributes are added subtracted as needed Candidate keys are identified and finally primary keys are chosen Relationships are indicated with the addition of foreign keys 10 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Multiple Views of the Database Each user will have a different need/view of the database Forms, files and reports will all be of different views of the database All views of the database need to be resolved into the data model. The data model will not look like any one of the views. 11 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Testing First evaluate design Confirm that data model contains all the information that users will need –Converse with users –Show them data model –Express “known” facts to users Users can make objections 12 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Implementation Database is created Tables are created with attributes, primary and foreign keys Business rules are carried out –Stored procedures –Triggers –Built-in DBMS features 13 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

DBMS Restrictions The database design may have to be adjusted to meet with any DBMS or computer system restrictions. 14 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Testing Again The database is populated with real and/or test data SQL is written that accommodates what the users have requested and the SQL is run against the database Bad results means that the database must be changed. This can mean going all the way back to the design phase or it could be something more elementary. 15 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Entity-Relationship Model ER model (Peter Chen, 1976) Extended ER model Information Engineering (IE) (James Martin, 1990) or Crow’s foot version of ER Model Integrated Definition 1, Extended Version (IDEF1X) – government standard National Institute of STDs and Technology (NIST) 1993 Unified Modeling Language (UML) 16 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Entities Potential table Things that the user needs to keep track of –People, places, things, activities, documents Object Classes (idea) –An occurrence or individual is an instance of an entity class 17 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Attributes Descriptors of entities Have to have a direct relationship with the entity. –Customer entity might have customer name as an attribute Can be shown in entity relationship model as balloons or be listed under the entity name. 18 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Attributes Continued Composite attributes Multi-value attributes Attribute domains 19 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Attributes Continued Identifiers 20 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Primary Keys Primary key uniquely defines a record: –It must be unique within the table column –Composite keys consist of two or more columns –It’s more efficient if it’s short and numeric –Value should never change Natural vs. surrogate primary keys –A natural primary key is something that the user is familiar with and/or is readily available. 21 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Relationship Classes One-to-one One-to-many Many-to-many 22 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Relationships Maximum cardinality Parent-Child Minimum cardinality Recursive relationship Weak and strong entities ID shared relationship 23 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Relationships Continued Subtype and super type entities –Inheritance –Discriminator –Exclusive Vs Inclusive (Crow’s Foot) –Complete Vs Incomplete (IDEF1X) 24 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011

Relationships Continued Naming a relationship –Used to distinguish two relationships between the same two entities –Used to help clarify the relationship –Can be made up of a short phrase that describes the parent to child relationship followed by a short phrase that describes the child to parent relationship. 25 Component 4/Unit 6-2 Health IT Workforce Curriculum Version 2.0/Spring 2011