Download presentation
Presentation is loading. Please wait.
Published byMark Smith Modified over 2 years ago
1
The company is organized into departments and each department has a unique name and main office. The department has a particular employee who manages the department. We should keep track of the date when that person started managing the department. We should also keep track of all of the offices that are assigned to the department. Each office has a building name, room number and a telephone.
2
Nouns = possible data items (only the first occurrence is highlighted)
3
The company is organized into departments and each department has a unique name and main office. The department has a particular employee who manages the department. We should keep track of the date when that person started managing the department. We should also keep track of all of the offices that are assigned to the department. Each office has a building name, room number and a telephone.
4
A department controls a number of projects, each of which has a unique number within the company. Each project also has a description, employee who serves as its director, and budget. The company also wants to keep track of all employees who are assigned to each project.
5
We want to keep track of each employee’s name. social security number, address, salary, sex, birthdate, and starting date of employment with the company. Each employee belongs to a department but may work on projects that are controlled by departments other than the one to which he or she is assigned. We also want to keep track of the number of hours each employee has worked on each project
6
Data Items Found (= Entities or Attributes) department (department) name (department) main office employee (department) manager date started managing department offices (office) building
7
(office) room (office) telephone project (project) number (project) description (project) budget (project) director
8
(employee) name social security number address salary sex birthdate starting date (of employment) number of hours worked
9
Verb phrases = possible relationships
10
The company is organized into departments and each department has a unique name and main office. The department has a particular employee who manages the department. We should keep track of the date when that person started managing the department. We should also keep track of all of the offices that are assigned to the department. Each office has a building name, room number and a telephone.
11
A department controls a number of projects, each of which has a unique number within the company. Each project also has a description, employee who serves as its director, and budget. The company also wants to keep track of all employees who are assigned to each project.
12
We want to keep track of each employee’s name, social security number, address, salary, sex, birthdate, and starting date of employment with the company. Each employee belongs to a department but may work on projects that are controlled by departments other than the one to which he or she is assigned. We also want to keep track of the number of hours each employee has worked on each project
13
department has a name. department has a main office. employee manages a department offices are assigned to a department office has a building name office has a room number office has a telephone
14
department controls a project project has a unique number project has a description project has an employee employee who serves as director project has a budget employee is assigned to a project.
15
employee has a name employee has a social security number employee has a address employee has a salary employee has a sex employee has a birthdate employee has a starting date of employment employee belongs to a department employee works on projects
16
projects are controlled by departments employee worked on a project
17
Modeling Principles: Use common form for all synonyms nouns suggest either entities or attributes possessive or“has a” often designates an attribute other verb phrases often designate relationships
18
Draw Entities
19
EMPLOYEE
20
SSN
21
EMPLOYEE SSN Name
22
EMPLOYEE Address SSN Name
23
EMPLOYEE AddressSalary SSN Name
24
EMPLOYEE AddressSalary Sex SSN Name
25
EMPLOYEE AddressSalary Sex Birthdate SSN Name
26
EMPLOYEE AddressSalary Sex Birthdate SSN Startdate Name
27
EMPLOYEE AddressSalary Sex Birthdate SSN Startdate Name DEPARTMENT
28
EMPLOYEE AddressSalary Sex Birthdate SSN Startdate Name DEPARTMENT Name
29
EMPLOYEE AddressSalary Sex Birthdate SSN Startdate Name DEPARTMENT Name Main Office
30
EMPLOYEE AddressSalary Sex Birthdate SSN Startdate Name DEPARTMENT Name Main Office Building
31
EMPLOYEE AddressSalary Sex Birthdate SSN Startdate Name DEPARTMENT Name Main Office BuildingRoom
32
EMPLOYEE AddressSalary Sex Birthdate SSN Startdate Name DEPARTMENT Name Main Office BuildingRoomPhone
33
EMPLOYEE AddressSalary Sex Birthdate SSN Startdate Name DEPARTMENT Name Main Office BuildingRoomPhone Office BuildingRoomPhone
34
EMPLOYEE AddressSalary Sex Birthdate SSN Startdate Name DEPARTMENT Name Main Office BuildingRoomPhone Office BuildingRoomPhone
35
PROJECT
36
Number
37
PROJECT Description Number
38
PROJECT Description BudgetNumber
39
Draw Relationships (attributes are omitted for clarity)
40
BelongsTo EMPLOYEEDEPARTMENT
41
BelongsTo EMPLOYEEDEPARTMENT Manages
42
BelongsTo EMPLOYEEDEPARTMENT Manages StartDate
43
BelongsTo EMPLOYEEDEPARTMENT PROJECT Manages StartDate Controls
44
BelongsTo EMPLOYEEDEPARTMENT PROJECT Manages StartDate Directs Controls
45
BelongsTo EMPLOYEEDEPARTMENT PROJECT Manages StartDate WorksOn Controls Directs
46
BelongsTo EMPLOYEEDEPARTMENT PROJECT Manages StartDate WorksOn Controls Hours Directs
47
Specify Attributes and Domains
48
AttributeDomainData TypeConstraints Employee.NameEmpNameDomStringMax length 40 SSNSSNDomString###-##-#### AddressAddressDomStringMax length 60 SalaryInteger 0 Sex{M,F} BirthdateDate Employee.StartdateDate Department.NameDeptNameDomStringMax length 15 MainOfficeOfficeDom (Building, Room, Phone) OfficeSet of OfficeDom BuildingBuildingDomStringMax length 10 RoomRoomDomStringMax length 3
49
AttributeDomainData TypeConstraints PhonePhoneDomString###-###-#### NumberProjectNumDomInteger 0 DescriptionProjDescDomStringMax length 40 BudgetInteger Manager.StartDateDate WorksOn.HoursInteger 0
Similar presentations
© 2018 SlidePlayer.com Inc.
All rights reserved.
Company profile free download ppt on pollution Ppt on eia report Ppt on political parties class 10 Ppt on review of related literature example Ppt on nonverbal communication body language Ppt on career options in humanities Ppt on history of mathematics Download ppt on eddy current brakes Skills ppt on leadership Download ppt on coordinate geometry for class 9th biology