Download presentation
Presentation is loading. Please wait.
Published byMadison Little Modified over 9 years ago
1
Fundamentals, Design, and Implementation, 9/e CPE 481 Database Processing Chapter 3 Instructor:Suthep Madarasmi, Ph.D. ดร. สุเทพ มาดารัศมี Email:suthep@kmutt.ac.th Telephone: 02-470-9080 Messages: 02-470-9085 Fax: 02-872-5050 David M. Kroenke
2
Database Processing by Suthep Madarasmi Lecture 3/2 A Data Modeling Process Steps in the data modeling process –Plan project –Determine requirements –Specify entities –Specify relationships –Determine identifiers –Specify attributes –Specify domains –Validate model
3
Database Processing by Suthep Madarasmi Lecture 3/3 Planning the Project Obtaining project authorization and budget Building the project team Planning the team’s activities Establishing tools, techniques, and standards for consistent results Defining the project’s scope
4
Database Processing by Suthep Madarasmi Lecture 3/4 Determining System Requirements Sources for data modeling requirements –User interviews and user activity observations –Existing forms and reports –New forms and reports –Existing manual files –Existing computer files/databases –Formally defined interfaces (XML) –Domain expertise The result of the requirements determination will be a repository of notes, diagram, forms reports, files, etc., that can be used to develop the data model
5
Database Processing by Suthep Madarasmi Lecture 3/5 Specifying Entities An entity is something that the users want to track; something the users want to keep data about Entities –can be physical things or logical concepts –are identifiable; you can tell one from another –are things described by nouns, not characteristics described by adjectives
6
Database Processing by Suthep Madarasmi Lecture 3/6 Specifying Relationships Includes: –Identity of the parent and child entities –Relationship type –Minimum and maximum cardinalities –Name of the relationships Two techniques: –Examine whether a relationship exists between every combination of two entities –Locate relationships from requirement documents A combination of the two approaches may be used
7
Database Processing by Suthep Madarasmi Lecture 3/7 Determining Identifiers Identifier is an attribute or group of attributes that uniquely identifies an entity instance If there is difficulty specifying an identifier, maybe: –it should be part of a different entity –it is a subtype or category of a common entity –it needs one or more identifying relationships
8
Database Processing by Suthep Madarasmi Lecture 3/8 Specifying Attributes and Domains Find attributes on forms, reports, existing files, etc., and add them to entities Determine whether the attribute has already defined a domain –If so, the attribute is based upon that domain –If not, a new domain is defined Review the domains and make adjustments as necessary Domain property inheritance: when the domain properties change, all the attribute properties change as well Domains may be used to enforce data standards promoting compatible data types and systems Once all attributes have been specified the model should be reviewed for missing entities
9
Database Processing by Suthep Madarasmi Lecture 3/9 Validating Model Data model is a model of humans’ models, not a model of reality A data model is wrong if it does not accurately reflect the ways the users think about their world Data models are validated through a series of reviews –Normally, a team review is followed by user reviews E-R model as well as prototypes of forms and reports may be used to communicate to users features of the data model
10
Database Processing by Suthep Madarasmi Lecture 3/10 Creating Data Models From Forms and Reports Example: Single entities
11
Database Processing by Suthep Madarasmi Lecture 3/11 Example: Identifying Connection Relationships
12
Database Processing by Suthep Madarasmi Lecture 3/12 Example: Repeating Groups
13
Database Processing by Suthep Madarasmi Lecture 3/13 Example: Repeating Groups
14
Database Processing by Suthep Madarasmi Lecture 3/14 Example: Nested Groups 2 ways to Design: 1.2 relations 2.3 relations Which is Better?
15
Database Processing by Suthep Madarasmi Lecture 3/15 Example: Non-Identifying Connection Relationships Example: 1:1
16
Database Processing by Suthep Madarasmi Lecture 3/16 Example: Non-Identifying Connection Relationships
17
Database Processing by Suthep Madarasmi Lecture 3/17 Example: 1:N
18
Database Processing by Suthep Madarasmi Lecture 3/18 Example: 1:N
19
Database Processing by Suthep Madarasmi Lecture 3/19 Example: N:M Insert Form Page 88. A book may have many authors. An author may have written many books.
20
Database Processing by Suthep Madarasmi Lecture 3/20 Example: Category Relationship
21
Database Processing by Suthep Madarasmi Lecture 3/21 Example: Category Relationship
22
Database Processing by Suthep Madarasmi Lecture 3/22 Sales-Order Model
23
Database Processing by Suthep Madarasmi Lecture 3/23 Example: Sales Order
24
Database Processing by Suthep Madarasmi Lecture 3/24 Example: Sales Order Figure 3-16(c) shows an alternative design that allows an item to appear more than once on a given order
25
Database Processing by Suthep Madarasmi Lecture 3/25 Example: University System
26
Database Processing by Suthep Madarasmi Lecture 3/26 University System With Domain Names See Fig 3.26
27
Database Processing by Suthep Madarasmi Lecture 3/27 E-R Analysis Example 1: Job Application Form Entity: Person, Applicant (subtype), Spouse (subtype), Mother (subtype), Father (subtype), Children (subtype), Education_History, Work_History, Language_Skills, Computer_Skills Person ApplicantSpouseFatherChild Work History Education History Computer Skills Language Skills Mother 1..10..* 1..1 Language Skill Code WordAccessExcel 0..* 0..1 Computer Skill Type 0..*
28
Database Processing by Suthep Madarasmi Lecture 3/28 E-R Analysis Example 2: Payroll Processing Entity: Employee, Monthly_Wages (subtype), Hourly_Wages (subtype), Work_Times, Regular (subtype), OT1.5, OT2.0, OT3.0, Monthly_Pay Hourly Wage Monthly Wage Work Times 1..1 0..* OT3.0OT1.5OT2.0Regular Employee Employee Type Monthly Pay 0..* 1..1 0..1 1..1 0..1 Hour Type 0..*
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.