70 likes | 218 Views
Information Technology. Databases. Kathy S. Schwaig. Conceptual Design Entity-Relationship Model . Entity A “thing” of interest. May be tangible (employee) or intangible (banking transaction). E.g. employee, department, manager, customer. Attributes -- properties or characteristics.
E N D
Information Technology Databases Kathy S. Schwaig
Conceptual Design Entity-Relationship Model • Entity • A “thing” of interest. • May be tangible (employee) or intangible (banking transaction). E.g. employee, department, manager, customer. • Attributes -- properties or characteristics. • Key • Each entity must be uniquely identified by an attribute or group of attributes called a key. E.g.: Employee: [EMP#, name, address, phone#]
Relationship • An association between entities. • E.g. Managers manage Employees • Cardinalities indicate the number of each entity that may participate in the relationship. • One to one (1:1) • One to many (1:N) • Many to many (N:M) • M:N relationships may have relationship attributes. • E.g. Employees assigned-to Projects:[length-of-time] N : M
Entity- Relationship Diagram • Each entity represented by a rectangle. • Each relationship represented by a diamond. • Attributes shown in ovals. • Cardinalities next to entities
E-R Diagram SSN name grade Course# N assigned to M Student Course address description
Consulting Company Database You have been asked to create a database for a small consulting company. The company wants to keep track of which employees are assigned to which project and what dates they start and stop working on them. An employee can work on more than one project at a time (as any MBA student knows). You also need to keep track of which client sponsors which project(s). Each project usually requires a set of skills so you need to know what skills an employee has and when he or she obtained them. Employees are encouraged to find clients and receive extra compensation for doing so.
Emp# finds l Client-Id Employee N N N start-date Client has end-date date acquired 1 assigned to M sponsors Skill M N Skill- name Project# M requires N Project