ILS3A01 Week 2
ILS3A01 Week 2
WEEK 2
Database Systems:
Design,
Implementation, and
Management, 14e
Module 2: Data Models
Footnote Coronel, Carlos and Morris, Steven, Database Systems: Design, Implementation, and Management, 14 Edition. © 2023 Cengage. All Rights 2
Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 2
Data Modeling and Data Models
Data modeling refers to the process of creating a specific data model for a determined problem domain
A data model is a relatively simple representation of more complex real-world data structures
Database designers make use of existing data-modeling constructs and powerful database design tools that
diminish the potential for errors in database modeling
Footnote 3
Data Model Basic Building Blocks (1 of 2)
An entity is a person, place, thing, concept, or event about which data will be collected
and stored
Footnote 4
Data Model Basic Building Blocks (2 of 2)
• An employee’s salary must have values that are between 6,000 and
350,000
• A student’s final mark must be between 50% and 74% to pass, higher
passes with a distinction, lower fails.
• Each class must have one and only one teacher
Footnote 5
Business Rules
Business rules are used to define entities, They must be easy to understand and widely disseminated
attributes, relationships, and constraints
Footnote 6
Discovering Business Rules
The main sources of business rules are company managers, policy makers,
department managers, and written documentation such as company
procedures
Business rules are essential to database design due to the following reasons:
It allows the designer to develop
It can be a communication It allows the designer to It allows the designer to appropriate relationship
It helps to standardize the
tool between users and understand the nature, role, understand business participation rules and
company’s view of data
designers and scope of the data processes constraints and to create an
accurate data model
Footnote 7
Translating Business Rules into Data Model Components
Footnote 8
Naming Conventions
Footnote 9
The Relational Model (1 of 4)
The relational data model is implemented The RDBMS performs the same basic functions
through a very sophisticated relational provided by the hierarchical and network DBMS
database management system (RDBMS) systems
The RDBMS manages all of the details, while the users sees a collection of
tables in which the data is stored
Footnote 10
The Relational Model (2 of 4)
• Any SQL-based relational database application involves the following three parts:
• The end user interface – the interface allows the end user to interact with the data
• A collection of tables stored in the database – the tables “present” the data to the end user in a way
that is easy to understand
• SQL engine – the SQL engine executes all queries or data requests
Footnote 13
The Entity Relationship Model (1 of 3)
The relational data model and ERM combined to provide the foundation for tightly structured database
design
Footnote 14
The Entity Relationship Model (2 of 3)
Footnote 15
The Entity Relationship Model (3 of 3)
Footnote 18
Degrees of Data Abstraction (2 of 2)
The external model is the end users’ view of the data environment
Footnote 20
The External Model (2 of 3)
• The use of external views that represent subsets of the database has some important advantages:
• It is easy to identify specific data required to support each business unit
• It makes the designer’s job easy by providing feedback about the model’s adequacy
• It helps to ensure security constraints in the database design
• It makes application program development much simpler
Footnote 22
The Conceptual Model (1 of 2)
• The conceptual model represents a global view of the entire database by the entire organization
• Also known as a conceptual schema, it is the basis for the identification and high-level description of
the main data objects
• The most widely used conceptual model is the ER model
• The following are advantages of the conceptual model:
• It provides a bird’s-eye view of the data environment that is easy to understand
• The conceptual model is independent of both software and hardware
• The term logical design refers to creating a conceptual data model
Footnote 23
The Conceptual Model (2 of 2)
An internal schema depicts a specific representation of an internal model, using the database
constructs supported by the chosen database
Because the internal model depends on specific database software, it is said to be software
dependent
When you change the internal model without affecting the conceptual model, you have logical
independence
Footnote 25
The Internal Model (2 of 2)
Footnote 27
Database Systems:
Design,
Implementation, and
Management, 14e
Module 3: The Relational
Database Model
Footnote Coronel, Carlos and Morris, Steven, Database Systems: Design, Implementation, and Management, 14 Edition. © 2023 Cengage. All Rights 28
Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 28
A Logical View of Data
Footnote 29
Tables and Their Characteristics (1 of 3)
You can think of a table as a persistent A relation whose contents can be permanently saved for future use
representation of a logical relation
The primary key (PK) is an attribute or combination of attributes that uniquely identifies any given row
The characteristics of a relational table are summarized in Table 3.1 on the following slide
Footnote 30
Tables and Their Characteristics (2 of 3)
2 Each table row (tuple) represents a single entity occurrence within the entity set
3 Each table column represents an attribute, and each column has a distinct name
6 Each column has a specific range of values known as the attribute domain
8 Each table must have an attribute or combination of attributes that uniquely identifies each row
Footnote 31
Tables and Their Characteristics (3 of 3)
Footnote 32
Keys
Keys are important because they They are also used to establish
are used to ensure that each row relationships among tables and to ensure
the integrity of the data
in a table is uniquely identifiable
Footnote 33
Dependencies
Footnote 34
Types of Keys (1 of 3)
A superkey is a key that can uniquely identify any row in the table
A candidate key is a minimal superkey; that is, a key that does not contain a subset of attributes that is itself a
superkey
Entity integrity is the condition in which each row in the table has its own known, unique identity
A null is the absence of any data value, and it is never allowed in any part of a primary key
Footnote 35
Types of Keys (2 of 3)
An unknown attribute value
A null could represent any of the A known, but missing, attribute value
following: A “not applicable” condition
A foreign key (FK) is a primary key of one table that has been placed in another
table
Referential integrity is a condition by which a dependent table’s foreign key entry must
have either a null entry or a matching entry in the primary key of the related table
A secondary key is a key that is used strictly for data retrieval purposes and does
not require a functional dependency
Footnote 36
Types of Keys (3 of 3)
Footnote 40