Data Model
Data Model
Well defined data model reduces risk (problem on disk space, ad hoc queries, business rules) to be
encountered by the organization.
Entity is anything (noun) about which data are to be collected and stored
Attribute is a characteristic of an entity.
Relationship describes an association among (two or more) entities
One-to-many (1:M) relationship
Many-to-many (M:N or M:M) relationship
One-to-one (1:1) relationship
Business Rules
Brief, precise, and unambiguous description of a policy, procedure, or principle within a specific
organization’s environment
A company airplane must be inspect after 100 hours of flight time.
A customer may generate many invoices.
Each invoice is generated by only one customer.
Apply to any organization that stores and uses data to generate information.
Description of operations that help to create and enforce actions within that organization’s environment.
Yenshenn company wants to track each part used in each specific piece of equipment; each part is bought
from a specific supplier. Create a relational data model for the database of Yenshenn company.
(Hint: A piece of equipment is composed of many parts, but each part is used in one specific piece of
equipment. A supplier can supply many parts, but each part has been supplied by only one supplier.)
A hospital stores data about patients, their admission and discharge from departments and their
treatments with their doctors. Patient can have many treatments with the attending doctor in many
departments during hospitalization. Patient can be attended by many doctors. Create a relational data
model as a design for the database of the hospital. Define some business rules applied in the hospital.
Hierarchical Structure—Characteristics
Schema
o Conceptual organization of entire database as viewed by the database administrator
Subschema
o Defines database portion “seen” by the application programs that actually produce the desired
information from data contained within the database
Data Management Language (DML)
o Define data characteristics and data structure in order to manipulate the data
Table (relations)
o Matrix consisting of a series of row/column intersections
o Related to each other by sharing a common entity characteristic
Relational schema
o Visual representation of relational database’s entities, attributes within those entities, and
relationships between those entities
Stores a collection of related entities
o Resembles a file
Relational table is purely logical structure
o How data are physically stored in the database is of no concern to the user or the designer
o This property became the source of a real database revolution
Advantages
Structural independence – changes in the relational data structure do not affect the DBMS’s
data access in any way
Improved conceptual simplicity by concentrating on the logical view
Easier database design, implementation, management, and use
Ad hoc query capability - SQL
Powerful database management system
Disadvantages
Substantial hardware and system software overhead
Can facilitate poor design and implementation
May promote “islands of information” problems
Disadvantages
Limited constraint representation
Limited relationship representation
No data manipulation language
Loss of information content
The Object Oriented Model
Advantages
Adds semantic content
Visual presentation includes semantic content
Database integrity
Both structural and data independence
Disadvantages
Slow pace of OODM standards development
Complex navigational data access
Steep learning curve
High system overhead slows transactions
Lack of market penetration
Other Models