Chapter2

Chapter2 - CSIS0278A CSIS0278A Introduction to Database...

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

View Full Document Right Arrow Icon
CSIS0278A CSIS0278A Introduction to Database Introduction to Database Management Systems Management Systems Module 2: Entity-Relationship Model Dr. Reynold C. K. Cheng Based on the Ch. 6 notes of “Database System Concepts” by A. Silberschatz, H. Korth & S. Sudarshan and notes by Dr. HO Wai Shing
Background image of page 1

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

View Full DocumentRight Arrow Icon
DB020:2 Overview Overview Basics Entity Sets, Attributes, Weak Entity Sets Relationship Sets, Mapping Constraints E-R Diagram Extended E-R Features Design of an E-R Database Schema Reduction of an E-R Schema to Tables
Background image of page 2
DB020:3 Entity Sets Entity Sets In Entity-Relationship Model (E-R Model), a database can be modeled as a collection of entities relationships among entities An entity is an object that exists and is distinguishable from other objects. e.g., a person, a company, a plant, etc. Entities have attributes e.g., people have names and addresses An entity set is a set of entities of the same type that share the same properties (attributes) e.g., a set of all persons, all companies, all trees, etc.
Background image of page 3

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

View Full DocumentRight Arrow Icon
DB020:4 Entity vs. Entity Sets Entity vs. Entity Sets id = 321-12-3123 name = Jones street = Main city = Harrison id = 019-28-3746 name = Smith street = North city = Rye id = 677-89-9011 name = Hayes street = Main city = Harrison Entity Set Customer number = A-102 amount = 1000 number = A-101 amount = 2000 Entity Set Account an entity another entity
Background image of page 4
DB020:5 Attributes Attributes An entity is represented by a set of attributes, e.g., Customer(customer_id, customer_name,          customer_street, customer_city) Account(account_number, amount) Domain the set of permitted values of each attribute Attribute types Simple vs. Composite attributes e.g., address is a composite attribute Single-valued vs. Multi-valued attributes e.g., phone_number (If this attribute that can hold more than one phone number, it’s a multi-valued attribute.) Derived attributes e.g., age , if only DOB is stored.
Background image of page 5

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

View Full DocumentRight Arrow Icon
DB020:6 Attributes Attributes Composite attributes: Multi-valued attribute: id = 321-12-3123 name = Jones phone = 12345678, 23456789, 98765432 a customer
Background image of page 6
DB020:7 Relationship Sets Relationship Sets A relationship is an association among two or more entities. e.g., A relationship set is a mathematical relation among n 2 entities, each taken from an entity set. id = 677-89-9011 name = Hayes street = Main city = Harrison number = A-102 amount = 1000 These two entities are related. this is a relationship Hayes Customer , A-102 Loan , ( Hayes , A-102 ) is a relationship, in relationship set Depositor e.g.,
Background image of page 7

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

View Full DocumentRight Arrow Icon
DB020:8 Entity Set / Relationship Set Entity Set / Relationship Set Distinguish: entity vs. entity set relationship vs. relationship set e.g., Customer is an entity set, while the customer with customer_name Hayes is an entity Account is an entity set, while the account with account_number A-102 is an entity
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 71

Chapter2 - CSIS0278A CSIS0278A Introduction to Database...

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

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