Creating a Schema John Wright Where to Start We start with the ERD. We create a relation for each entity. We need to determine the attributes for each.

Slides:



Advertisements
Similar presentations
Normalisation.
Advertisements

Relational Database Modeling II We dont live in a world of reality, we live in a world of perceptions. J. Gerald Simmons.
1 Entity-Relationship Modeling. 2 ER Graphical modeling technique Informal, understandable for laymen Coarse technique to design tables Provides rules.
1 Assignment 4 Map entities with relationships to relational schemas. Use DBDL to describe the table schemas.
Database Design Chapter Five DATABASE CONCEPTS, 6th Edition
Transforming Entity-Relationship Models Into Relational Database Implementations.
Translating from ER to Relationship Schema Adapted from Juliana Freire.
1 Class Agenda – 09/20/2011  Answer questions about exam  Evaluate database design homework  Review database design homework for syntax and logic 
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
© 2008 Prentice Hall Business Publishing Accounting Information Systems, 11/e Romney/Steinbart1 of 121 C HAPTER 16 Implementing an REA Model in a Relational.
Entity-Relationship Model and Diagrams (continued)
1 The Information School of the University of Washington Nov 29fit forms © 2006 University of Washington More Forms INFO/CSE 100, Fall 2006 Fluency.
Creating an ERD John Wright Where to Start We need a description of some kind from interviews, questionnaires, etc Armed with the description we can.
Database – Part 2a Dr. V.T. Raja Oregon State University.
Case study Lisa’s Bookstore IST210.
Electronic Library Management System (ELiMS). Content Overview on ELiMS Key Fact on National Library Board Entities, Key Attributes Entities – Relationship.
Web Database Design Session 6 and 7 Matakuliah: Web Database Tahun: 2008.
1 Relational model concepts Key constraints Referential integrity constraint Steen Jensen, autumn 2013.
Normalization.
CHAPTER 7 Database: SQL, MySQL. Topics  Introduction  Relational Database Model  Relational Database Overview: Books.mdb Database  SQL (Structured.
CSE 441: Systems Analysis & Design
CHAPTER 2. FUNDAMENTAL OF ENTITY RELATIONSHIP (ER)
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Before Starting Data Integrity Data Types Record (line, tupel) Field (attribute, column) Table (file, relation) Data Dictionary (repository, metadata)
1 Translating E/R Diagrams into Relational Schemas.
CIS 270—Application Development II Chapter 25—Accessing Databases with JDBC.
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities.
PLUG IT IN 3 Fundamentals of Relational Database Operations.
Lecture 7 of Advanced Databases
Customer Order Order Number Date Cust ID Last Name First Name State Amount Tax Rate Product 1 ID Product 1 Description Product 1 Quantity Product 2 ID.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
Relational Database. Database Management System (DBMS)
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Constraints - primary and foreign keys in Oracle Please use speaker notes for additional information!
1 The Information School of the University of Washington Dec 1fit advdatabases © 2006 University of Washington Advanced Database Concepts INFO/CSE.
An Entity Relationship (ER) Diagram is a graphic that shows the interrelationship between entities in a database.
Btec National - Advanced Databases 1 Advanced Databases Entity Relationship Diagrams.
Database Design. The process of developing database structures from user requirements for data a structured methodology Structured Methodology - a number.
Relational Theory and Design
Database Design – Lecture 6 Moving to a Logical Model.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
1 DATABASE TECHNOLOGIES (Part 2) BUS Abdou Illia, Fall 2015 (September 9, 2015)
Database Design – Lecture 7
Entity-Relationship Diagram Presentation Gianna-lee Williams 6AQ Ms. Anderson.
* Database is a group of related objects * Objects can be Tables, Forms, Queries or Reports * All data reside in Tables * A Row in a Table is a record.
Btec National - IT SYSTEMS ANALYSIS AND DESIGN 1 IT Systems Analysis and Design Entity Relationship Diagrams.
Database Design Slide 1 Database Design Lecture 7 part 2 Mapping ERD to Tables.
Database Design. Database Design Process Data Model Requirements Application 1 Database Requirements Application 2 Requirements Application 4 Requirements.
IST 220 – Intro to DB Lecture 4 Database Design thru ER Modeling.
COMP 430 Intro. to Database Systems ER Implementation as Tables Slides use ideas from Chris Ré.
Order Database – ER Diagram Prepared by Bryan Borcher Spring 2014.
Conversion from ER diagram to relational model 1 ER is a visual model The relational model is a matemathical model.
Data Modeling AND ER MODELS.
Hoi Le. Why database? Spreadsheet is not good to: Store very large information Efficiently update data Use in multi-user mode Hoi Le2.
DATA MODELING AND ENTITY-RELATIONSHIP MODEL II IST 210: Organization of Data IST210 1.
Year 12 > 13 Applied GCE ICT Unit 7 Using Database Software.
DBM 380 Week 3 Individual Assignment ERD Creation Project The following assignment refers to material found in the Virtual Organizations. Create a detailed.
BTM 382 Database Management Chapter 13: Business intelligence and data warehousing Chapter 14-4: Data analytics Chitu Okoli Associate Professor in Business.
Week 02 - Introduction to Data Modelling
Entity-Relationship Model and Diagrams (continued)
INFO/CSE 100, Spring 2005 Fluency in Information Technology
Relational Model and ER Model: in a Nutshell
Order Database – ER Diagram
The 1:M Relationship (continued)
Normalization By Jason Park Fall 2005 CS157A.
Technical Module A Data Modeling Definitions
Entity – Relationship Model
THE NORMAL DISTRIBUTION AND THE 68–95–99.7% RULE
Normalization By Jason Park Fall 2005 CS157A.
Presentation transcript:

Creating a Schema John Wright

Where to Start We start with the ERD. We create a relation for each entity. We need to determine the attributes for each entity.  We normally do this on the ERD, but for this exercise I will do it in the SCHEMA We then apply the rules of dependancy to normalize the relations. We then apply determine the primary/foreign key relationships. (See the other slide presentation for help in this.).

The ERD Publisher Book Patron Purchase Order CheckOut Publishes Contains Submitted Author Order Item Associative Entity AuthorBook Contains Associative Entity

Schema with Attributes Book Copy #ISBNPurchase DateAuthorIDTitlePublisherIDTypeNameAuthorID Author Purchase Order PublisherIDPONumberDate Order Item PONumberLineNumberCostTitleType Author Book AuthorIDISBN

Entities Publisher AddressPublisherIDRepresentativeIDCityStatezip CheckOut PatronIDISBNCKOutDate Patron AddressPatronIDFinesDueCityStatezip

Normalization Normally we normalize at this point. See the presentation on normalization. Normalization is determined by dependancies. Next, we add foreign keys using the rules found in the Schema presentation.

Foreign Keys Book Copy #ISBNPurchase DateAuthorIDTitlePublisherTypeNameAuthorID Author Purchase Order PublisherIDPONumberDate Order Item PONumberLineNumberCostTitleType Author Book AuthorIDISBN ISBN and AUTHORID are both foreign keys and composite keys PONumber is a foreign key as well as a composite key PublisherID is a foreign key to publisher table

Foreign Keys Publisher AddressPublisherIDRepresentativeIDCityStatezip CheckOut PatronIDISBNCKOutDate Patron AddressPatronIDFinesDueCityStatezip ISBN and PatronID are both foreign keys as well as composit keys