06 ERD_Lecture

06 ERD_Lecture - ERD Fundamentals 1 Learning Outcomes...

Info iconThis preview shows pages 1–16. Sign up to view the full content.

View Full Document Right Arrow Icon
1 ERD Fundamentals
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Learning Outcomes Objective Learning Activities Readings/Q uiz In-Class Understand basics of Entity Relationship Diagrams Packet Lecture/ Demo Understand cardinality for ERDs Packet Lecture/ Demo Map ERDs to data tables Packet Lecture/ Demo
Background image of page 2
3 Agenda Discuss ERD basics ERD problems review Mapping ERDs to actual tables Quiz
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Building Models Why are models useful? Entity relationship diagram (ERD) is one of most popular approaches to data modeling Shows entities, attributes, and relationships among entities
Background image of page 4
5 Entities Entity is any object or concept about which we want to store data Person (Customer, Supplier) Thing (Order, Item) Event Place Test for entities More than one instance More than one attribute
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Relationships Naturally occurring associations between entities Customer orders Order Order has Item Supplier supplies Item
Background image of page 6
7 Simple ERD Customer Order has
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8 Attributes Characteristics that describe entities Customer: Number, Name, Phone Supplier: Number, Name, Phone Order: Number, Date Item: Number, Description, Price
Background image of page 8
9 Primary Keys Primary key (PK) is an attribute or set of attributes that can be used to identify individual instances of an entity The value of a primary key is unique for each instance
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10 Customer Number(PK) Name Phone Diagramming Attributes Entity Name Attributes
Background image of page 10
11 Cardinality Maximum number of occurrences of one entity for a single occurrence of the related entity E.g. Customers to orders, customers to invoices
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
12 Cardinality Example: * Think: Each instance of ENTITY1 can RELATIONSHIP at most how many instances of ENTITY2’s ? Each CUSTOMER can ORDER many ORDERS, and each ORDER is ORDERED BY at most one CUSTOMER Customer Order orders
Background image of page 12
13 Cardinality Exercise Item Supplier supplied by Order Item has
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
14 Cardinality Exercise Solution Item Supplier supplied by Order Item has
Background image of page 14
M:M Relationships What is the problem with M:M relationships in the database? Order
Background image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 16
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 02/17/2012.

Page1 / 46

06 ERD_Lecture - ERD Fundamentals 1 Learning Outcomes...

This preview shows document pages 1 - 16. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online