Entity-Relationship Model. Entity-Relationship Mode What is it? What is it? –Technique for developing an informal organization of tables How does it work?

Slides:



Advertisements
Similar presentations
Banking Business Scenario
Advertisements

ER Model For a college DB
Data Modeling. What are you keeping track of? You begin to develop a database by deciding what you are going to keep track of. Each thing that you are.
Concepts of Database Management Seventh Edition Chapter 6 Database Design : ERD Model.
Database BA471 – Fall 2007 Dr. V.T. Raja Oregon State University.
ISMT221 Information Systems Analysis and Design Entity-Relationship Diagram Lab 4 Tony Tam.
Data Modeling with ERD ISYS 363. Entity-Relationship Diagram An entity is a “thing” in the real world, such as a person, place, event for which we intend.
Entity-Relationship Model and Diagrams (continued)
Introduction to Database. File Formats Comma delimited file –"s1","peter",3 –"s2","paul",2.5 –"s3","mary",3.5 –Demo: Excel – Data/Import Extended Markup.
Table design screen Field name Data type Field size Other properties.
WELL-DESIGNED DATABASES Process faster Easy to develop and maintain Easy to read and write code.
Database Design Concepts Info1408
1 Data Modelling Which data to include in the database.
Database – Part 2a Dr. V.T. Raja Oregon State University.
Relational Databases What is a relational database? What would we use one for? What do they look like? How can we describe them? How can you create one?
Creating a Database in Access Creating a database involves 1.Logical design of tables and relationships 2.Physical design of tables and relationships 3.Populating.
Case study Lisa’s Bookstore IST210.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
2.3 Organising Data for Effective Retrieval
The Teacher Computing Database Design CP4 Revision.
Unit 4: Computer Systems Design 4.1 Relational database system.
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)
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
Driving School Database
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
Data Modelling – ERD Entity Relationship Diagram’s Entity Relationship Diagrams and how to create them. 1.
CSC 240 (Blum)1 Introduction to Database. CSC 240 (Blum)2 Data versus Information When people distinguish between data and information, –Data is simply.
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.
Information Systems & Databases 2.2) Organisation methods.
What we’ve learnt Doc 5.69 Doc 5.70 Section 1-3. A simple database Related objects Tables hold the data Forms, reports, queries to access the data.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
Introduction to SQL. SQL What is SQL SQL Components Syntax & Conventions SQL Data Types INNER JOIN SELECT Statements.
Database Beginnings. Scenario so far In our scenario we have people registering for training sessions. –The data about the training sessions was placed.
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Access Review. Access Access is a database application A database is a collection of records and files organized for a particular purpose Access supports.
1 The Information School of the University of Washington Dec 1fit advdatabases © 2006 University of Washington Advanced Database Concepts INFO/CSE.
3 & 4 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Keys Consists of one or more attributes that determine other.
Entity Relationship Diagram. Introduction Definition: Entity-relationship diagram is a data-modeling technique that visualises entities, the attributes.
 Entity-relationship models (ERM) Entity-relationship models (ERM)  Simple E-R Diagram Simple E-R Diagram  Weak Entity Weak Entity  Strong Entity.
Btec National - Advanced Databases 1 Advanced Databases Entity Relationship Diagrams.
Rebecca McCready Faculty of Medical Sciences Newcastle University Lecture 2 – Relationships and Lookup fields.
IST 220 – Intro to Databases Lecture 3 Database Design Guidelines.
ENTITY RELATIONSHIP DIAGRAM ENTITY RELATIONSHIP DIAGRAM IS A SPECIALIZED GRAPHIC THAT ILLUSTRATES THE INTERRELATIONSHIPS BETWEEN ENTITIES IN A DATABASE.
Quiz questions. 1 A data structure that is made up of fields and records? Table.
Chapter 56 Relational Database Design Compiled by Eddie Moorcroft.
advanced data modeling
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
More SQL Statements To Modify Tables. Library Database Books ISBN bkTitle bkPrice pubID Publishers pubID pubName pubPhone Authors auID auName auPone Books/Authors.
* 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.
Tutorial 2 Data Modelling. 3 Terminology & Notation(1) An entity is an object about which the system needs to hold information –Customer, Student, Course.
Sample Table Standard Notation Entity name in uppercase
Btec National - IT SYSTEMS ANALYSIS AND DESIGN 1 IT Systems Analysis and Design Entity Relationship Diagrams.
Database Design. Database Design Process Data Model Requirements Application 1 Database Requirements Application 2 Requirements Application 4 Requirements.
Howard Paul. Sequential Access Index Files and Data File Random Access.
IST 220 – Intro to DB Lecture 4 Database Design thru ER Modeling.
Data Modeling AND ER MODELS.
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.
Week 03 – ER Diagram INFOSYS 222.
CSCI-100 Introduction to Computing
INFO/CSE 100, Spring 2005 Fluency in Information Technology
Order Database – ER Diagram
Entity relationship diagrams
5.02 Understand database queries, forms, and reports used in business.
Advanced Database Concepts: Reports & Views
Presentation transcript:

Entity-Relationship Model

Entity-Relationship Mode What is it? What is it? –Technique for developing an informal organization of tables How does it work? How does it work? –Identify entities (which become tables) –Identify attributes of each entity (which become fields) –Identify relationships

Notation Entity Entity –A general entity is a component of the database. –E.g., book, author, publisher, customer Attribute Attribute –Property of an entity –E.g., title and price of a book; name, phone number of a publisher; name, address of a customer Notation Notation –An entity and its attributes –E.g., Books(ISBN, bkTitle, price) Authors (auID, auName, auPhone) Publishers (pubID, pubName, pubPhone)

Purpose of Attributes Contain raw data for the database Contain raw data for the database –E.g., bkTtitle, price in Books, auName in Authors Identify one field whose values are unique; i.e., as a primary key. Identify one field whose values are unique; i.e., as a primary key. –E.g., auID in Authors, pubID in Publishers Link a table to another table, i.e., as a foreign key. (Need not be included in the Entity-relationship diagram) Link a table to another table, i.e., as a foreign key. (Need not be included in the Entity-relationship diagram)

Entity-Relationship Diagram Given the following entities: Given the following entities: –Students (stdID, stdName, stdAddress) –Classes (clID, clName, clTime, clRoom, instructor) –Instructors (instID, instName, instGender) How are they related? How are they related?

Students, Classes, Instructors Students Instructors Classes Attends Teaches N N 1 N

Students with Attributes Students Classes Attends Teaches N N N stdName stdAddress clTime clName clRoom instName std

Entity-Relationship Diagram

Refining Tables Recall Recall –Classes (clID, clName, clTime, clRoom, instName) Several classes may have the same name. E.g. EN201-01, EN are both named “Intro to Writing.” Several classes may have the same name. E.g. EN201-01, EN are both named “Intro to Writing.” Rooms may require more information. Rooms may require more information. Instructor name is already in Instructor table Instructor name is already in Instructor table

Create New Tables Courses(crsID, crsName, crsCredits) Courses(crsID, crsName, crsCredits) Rooms(rmID, rmLocation, rmNumber, rmCapacity) Rooms(rmID, rmLocation, rmNumber, rmCapacity) Classes(clID, classTime, crsID, rmID, instID) Underlined and italicized fields are foreign keys. Classes(clID, classTime, crsID, rmID, instID) Underlined and italicized fields are foreign keys.

More Tables Students Instructors Classes Attends Teaches NN 1 N Rooms Courses Taught as Holds ? ? ? ? ?

Your Turn Bank database Bank database –What kind of entities are involved? –What are some of their attributes? Academic database Academic database –What kind of entities are involved? –What are some of their attributes?

Your Turn (2) Airline database Airline database –What kind of entities are involved? –What are some of their attributes? Student Grades database Student Grades database –What kind of entities are involved? –What are some of their attributes?