DBMS Chapter 2 - Data Models
DBMS Chapter 2 - Data Models
Data Models
Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel 1
Lesson Objectives
Why data models are important About the basic data-modeling building blocks What business rules are and how they influence database design How the major data models evolved
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
Business Rules
How do modelers go about modeling data? By understanding Business Rules!
Brief, precise, and unambiguous descriptions of a policies, procedures, or principles within a specific organization
E.g. a student may take up to 21 credits at a time E.g. each computer account may only be used by one student
Any organization that stores and uses data to generate information has business rules (whether they know it or not) Business rules are a description of the organizations operations
They help to create and enforce actions within that organizations environment
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
E.g. E.g. each computer account may only be used by one student (the account owner)
identifies the STUDENT and ACCOUNT entities helps to identify that the relationship is 1:1 (to fully get that we need another rule how many accounts may a student have?)
Some business rules dont impact data modeling (but may impact application development)
E.g. students cannot sign up for more than one section of the same course (in same semester (may repeat))
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
Company managers
Policy makers Department managers Written documentation Procedures Standards Operations manuals Direct interviews with end users
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
10
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
11
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
13
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
14
A Hierarchical Structure
Bank Hierachical Database
Branch
Customer
Checks
Deposits
Withdrawals
16
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
17
18
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
20
21
Subschema
Defines database portion seen by the application programs that actually produce the desired information from data contained within the database
22
Subschema DDL
Allows application programs to define database components that will be used
DML
Works with the data in the database
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
23
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
24
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
25
Database Models
Network Database Model
Advantages
Conceptual simplicity Handles more relationship types Data access flexibility Promotes database integrity
Data independence
Conformance to standards
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
26
27
28
29
Relational diagram
Representation of relational databases entities, attributes within those entities, and relationships between those entities
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
30
31
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
32
34
Database Models
Relational Database Model
Advantages
Structural independence Improved conceptual simplicity Easier database design, implementation, management, and use Ad hoc query capability (SQL) Powerful database management system
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
35
Database Models
Relational Database Model
Disadvantages
Substantial hardware and system software overhead Possibility of poor design and implementation Potential islands of information problems
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
36
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
37
38
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
39
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
40
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
41
Includes information about relationships between facts within object, and relationships with other objects
Unlike relational models entity
42
43
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
44
Other Models
Extended Relational Data Model (ERDM)
Semantic data model developed in response to increasing complexity of applications DBMS based on the ERDM often described as an object/relational database management system (O/RDBMS) Primarily geared to business applications
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
45
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
46
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
47
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
48
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
49
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
50
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
51
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
52
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
53
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
54
Basis for identification and high-level description of main data objects, avoiding details
Most widely used conceptual model is the entity relationship (ER) model
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
55
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
56
57
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
58
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
59
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
60
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
61
Summary
A data model is a (relatively) simple abstraction of a complex real-world data environment
Basic data modeling components are:
Entities Attributes Relationships Constraints
62
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
Summary (continued)
Hierarchical model
Depicts a set of one-to-many (1:M) relationships between a parent and its children segments
Relational model
Current database implementation standard ER model is a popular graphical tool for data modeling that complements the relational model
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
63
Summary (continued)
Object is basic modeling structure of object oriented data model
The relational model has adopted many objectoriented extensions to become the extended relational data model (ERDM) Data modeling requirements are a function of different data views (global vs. local) and level of data abstraction
Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel
64