


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















What Is a Database?
A database is a collection of tables
Database Structure
Entity Relationship (ER) Diagram
Notation uses three main constructs
Chen Model & Crow’s Foot Model
: Examples of entities Person: EMPLOYEE, STUDENT, PATIENT Place: STORE, WAREHOUSE Object: MACHINE, PRODUCT, CAR Event: SALE,REGISTRATION, RENEWAL Concept: ACCOUNT, COURSE Guidelines for naming and defining : entity types An entity type name is a singular noun An entity type should be descriptive and specific An entity name should be concise
STUDENT: Student _ ID, Student _ Name, Home _ Address, Phone _ Number, Major
. An attribute name is a noun An attribute name should be unique To make an attribute name unique and clear, each attribute name should follow a standard format Similar attributes of different entity types should use similar but distinguishing names
Relationships can be classified as either
Cardinality : minimum and maximum number of instances of Entity B that can (or must be) associated with each instance of
. entity A
Professor teaches Class 1 M Connectivity )1,1 ( )1,4( Cardinality
Mandatory vs. Optional Cardinalities Specifies whether an instance must exist or can be absent in the relationship
. A Lecturer may handle zero or many classes . A class is handled by one and only one Lecturer MandatoryMandatory Optional Optional Lecturer Class )1,1 ( (N, 0 ) handles (^1) M
relationship 1: A single entity instance in one entity class is related to a single entity instance in another entity class Could indicate that two entities actually belong in the same table
M relationship: 1
The 1: M relationship between PAINTER and PAINTING
M:N relationships Must be avoided because they lead to data
. redundancies Can be implemented by breaking it up to produce a set of 1:M relationships Can avoid problems inherent to M:N relationship by creating a composite entity or bridge entity This will be used to link the tables that were originally related in a M:N relationship The composite entity structure includes-as f oreign keys-at least the primary keys of the . tables that are to be linked