Docsity

Entity-Relationship Model - Database Design - Lecture Slides, Slides of Database Management Systems (DBMS)

Partial preview of the text

Download Entity-Relationship Model - Database Design - Lecture Slides and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

Entity-Relationship Model

Entity-Relationship Model (chapter 6)

  • Basic Concepts
  • Constraints, Keys, and Design Issues
  • Entity-Relationship Diagram
  • Extended E-R Features
  • Design of an E-R Database Schema
  • Reduction of an E-R Schema to Tables
  • Unified Modeling Language (UML)

Constraints, Keys, and Design Issues

  • Job Search Activity System:

o A thorough record of events

o Helps in demonstrating competency

o Activity example: received automated reply

o Requirements specification

Requirements Specification

  • Track activities associated with job search:

o List companies or locations of a company

o List contacts per location or per job

o List jobs per zip code or per contact

o List activity per contact, company, or job

o List follow-up dates per contact

o List referrals (recursive relationship)

Identify Entity Sets

  • One job seeker
  • Activity
  • Company
  • Location
  • Job
  • Contact
  • Pending follow-up date

Determine Attributes

location_id

                • street

location

city state zip_code

company_id co_name

company

stock_symbol web_site last_search_date

Shows a derived attribute: last_search_date.

Determine Attributes (continued)

activity_date activity_time

activity

activity_code comment

activity_code description

activity_description

Each description represents a specific job search activity.

contact_id follow-up_date

job_seeker follow-up

Activity Description Codes

1 Conducted search but did not apply 2 Applied on company website 3 E-mailed resume 4 Sent resume via regular mail 5 Received automated reply 6 Received personalized e-mail 7 Received voice mail message 8 Received call and spoke over phone 9 Left contact voice mail message 10 Called contact and spoke over phone 11 Had on-site interview

Extended E-R Features

  • Specialization: superclass-subclass (ISA)
  • Generalization: entity sets share attributes
  • Attribute inheritance: higher- and lower-level
  • Aggregation: back-to-back relation sets

Design of an E-R Database Schema for a

Job Search Activity System

my_job_id

co_job_id

job

position_type source

position

job_status

activity_code description

activity_description contact_id follow-up_date

follow-up

job_contact

looking event

activity_date

activity_time

activity comment

activity_code

my_job_id

job_seeker

company_id co_name

company

web_site stock_symbol last_search_date

location_id - - - - - - - - street location

city zip_code

state

company_location referred_by

first_name

contact_id name

contact

rapor_level telephone (^) title prefix^ last_name

email last_actiity_date

Reduction of an E-R Schema to Tables

  • Company = (company_id, co_name, web_site, stock_symbol)

company_id co_name web_site stock_symbol 1 Cisco www.cisco.com CSCO 2 Symantec www.symantec.com SYMC 3 Intel www.intel.com INTC

Unified Modeling Language (UML)

  • Cardinality constraints are presented

differently between ERD and UML:

o ERD

o UML

E1 E

E1 E

0..* R

0..1 0..*

0..

R