FDS Reviewer
FDS Reviewer
o Enforcement of standards
Database: organized collection of logically related data o Improved data quality
Data: stored representations of meaningful objects and events o Improved data quality
o Reduced program maintenance
Structured: numbers, text, dates o Improved decision support
Unstructured: images, video, documents
Elements of the Database Approach
Information: data processed to increase knowledge in the person using the data
o Data models
Metadata: data that describes the properties and context of user data Graphical system capturing nature and relationship of data
Enterprise Data Model–high-level entities and relationships for the organization
Project Data Model–more detailed view, matching data structure in database or
Disadvantages of File Processing/Problems with Data Dependency data warehouse
o Program-Data Dependence o Entities
All programs maintain metadata for each file they use Noun form describing a person, place, object, event, or concept
o Duplication of Data Composed of attributes
Different systems/programs have separate copies of the same data o Relationships
o Limited Data Sharing Between entities
No centralized control of data Usually one-to-many (1:M) or many-to-many (M:N)
o Lengthy Development Times o Relational Databases
No centralized control of data Database technology involving tables (relations) representing entities and
o Excessive Program Maintenance primary/foreign keys representing relationships
80% of information systems budget
o Personal databases
o Two-tier and N-tier Client/Server databases
o Enterprise applications
Enterprise
resource
planning (ERP)
systems
Data
Database Schema
warehousing
o External Schema
User Views implementations
Subsets of Conceptual Schema
o
Enterprise Database Applications
o Enterprise Resource Planning (ERP) A Good Business Rule:
Integrate all enterprise functions (manufacturing, finance, sales, marketing,
inventory, accounting, human resources) o Declarative–what, not how
o Data Warehouse o Precise–clear, agreed-upon meaning
Integrated decision support system derived from various operational databases o Atomic–one statement
o Consistent–internally and externally
o Expressible–structured, natural language
CHAPTER 2
o Distinct–non-redundant
o Explanation of a term or fact o Business-oriented–understood by business people
Term–word or phrase with specific meaning
Fact–association between two or more terms Entities
o Guidelines for good data definition o Entity – a person, a place, an object, an event, or a concept in the user environment about
A concise description of essential data meaning
which the organization wishes to maintain data
Gathered in conjunction with systems requirements
o Entity type – a collection of entities that share common properties or characteristics
Accompanied by diagrams
o Entity instance – A single occurrence of an entity type
Achieved by consensus, and iteratively refined
Strong vs. Weak Entities and Identifying Relationships
o Strong entity
exists independently of other types of entities
has its own unique identifier
identifier underlined with single line
o Weak entity
dependent on a strong entity (identifying owner)…cannot exist on its own
does not have a unique identifier (only a partial identifier)
entity box and partial identifier have double lines
o Identifying relationship
links strong entities to weak entities
Business Rules Attributes
o Are statements that define or constrain some aspect of the business o Attribute–property or characteristic of an entity or relationship type
o Are derived from policies, procedures, events, functions
o Classifications of attributes:
o Assert business structure
Required versus Optional Attributes
o Control/influence business behavior
Simple versus Composite Attribute
o Are expressed in terms familiar to end users
o Are automated through DBMS software Single-Valued versus Multivalued Attribute
Stored versus Derived Attributes
Identifier Attributes
Required – must have a value for every entity (or relationship) instance with which it is associated
Optional – may not have a value for every entity (or relationship) instance with which it is associated
Modeling Relationships
Degree of Relationships
Cardinality Constraints
o Cardinality Constraints—the
number of instances of one entity
that can or must be associated with each
instance of another entity
o Minimum Cardinality
If zero, then optional
Associative Entities CHAPTER 3
Time stamp – a time value that is associated with a data value, often indicating when some event
occurred that affected the data value
Relation
o Relations (tables) correspond with entity types and with many-to-many relationship types.
o Rows correspond with entity instances and with many-to-many relationship instances.
o Columns correspond with attributes.
Entity Clusters
Key Fields
o EER diagrams are difficult to read when there are too many entities and relationships.
o Solution: Group entities and relationships into entity clusters. o Keys are special fields that serve two main purposes:
o Entity cluster: Set of one or more entity types and associated relationships grouped into a Primary keys are unique identifiers of the relation. Examples include employee
single abstract entity type numbers, social security numbers, etc. This guarantees that all rows are unique.
Foreign keys are identifiers that enable a dependent relation (on the many side of a
Advantages of Packaged Data Models relationship) to refer to its parent relation (on the one side of the relationship).
o Use proven model components o Keys can be simple (a single field) or composite (more than one field).
o Save time and cost
o Less likelihood of data model errors
o Easier to evolve and modify over time
o Aid in requirements determination
o Easier to read o Supertype/subtype hierarchies promote reuse
o Many-to-many relationships enhance model flexibility
o Vendor-supplied data model fosters integration with vendor’s applications
o Universal models support inter-organizational system
o Keys usually are used as indexes to speed up the response to user queries (more on this in
Chapter 5).
Integrity Constraints Transforming EER Diagrams into Relations
o Referential Integrity–rule states that any foreign key value (on the relation of the many
side) MUST match a primary key value in the relation of the one side. (Or the foreign key can
be null)
- For example: Delete Rules
Restrict–don’t allow delete of “parent” side if related rows exist in “dependent” side
Cascade–automatically delete “dependent” side rows that correspond with the
“parent” side row to be deleted
Set-to-Null–set the foreign key in the dependent side to null if deleting from the
parent side not allowed for weak entities
Transforming EER Diagrams into Relations Many-to-Many–Create a new
(con’t…) relation with the primary keys
of the two entities as its
o Mapping Weak Entities
primary key
Becomes a separate relation with
One-to-One–Primary key on
a foreign key taken from the
mandatory side becomes a
superior entity
foreign key on optional side
Primary key composed of:
Par
t ial
o Mapping Unary Relationships o One relation for supertype and for each subtype
One-to-Many–Recursive foreign key o Supertype attributes (including identifier and subtype discriminator) go into supertype
in the same relation relation
Many-to-Many–Two relations: o Subtype attributes go into each subtype; primary key of supertype relation also becomes
One for the entity type primary key of subtype relation
One for an associative o 1:1 relationship established between supertype and each subtype, with supertype as
relation in which the primary table
primary key has two
attributes, both taken from
the primary key of the
entity
Data Normalization
o Primarily a tool to validate and improve a logical design so that it satisfies certain constraints
that avoid unnecessary duplication of data
o The process of decomposing relations with anomalies to produce smaller, well-structured
relations
Well-structured Relations
o A relation that contains minimal data redundancy and allows users to insert, delete, and
update rows without causing data inconsistencies
o Goal is to avoid anomalies
Insertion Anomaly–adding new rows forces user to create duplicate data
Deletion Anomaly–deleting rows may cause a loss of data that would be needed for
other future rows
Modification Anomaly–changing data in a row forces changes to other rows
because of duplication
o Insertion–can’t enter a new employee without having the employee take a class (or at least
empty fields of class information)
o Deletion–if we remove employee 140, we lose information about the existence of a Tax Acc
class
o Modification–giving a salary increase to employee 100 forces us to update multiple records
o No multivalued attributes
o Every attribute value is atomic Third Normal Form
o Fig. 4-25 is not in 1st Normal Form (multivalued attributes) it is not a relation.
o Fig. 4-26 is in 1st Normal form. o 2NF PLUS no transitive dependencies (functional dependencies on non-primary-key
o All relations are in 1st Normal Form. attributes)
o Note: This is called transitive, because the primary key is a determinant for another
attribute, which in turn is a determinant for a third
o Solution: Non-key determinant with transitive dependencies go into a new table; non-key
determinant becomes primary key in the new table and stays as foreign key in the old table
o 1NF PLUS every non-key attribute is fully functionally dependent on the ENTIRE primary key
Every non-key attribute must be defined by the entire key, not by only part of the Enterprise Keys
key o Primary keys that are unique in the whole database, not just within a single relation
No partial functional dependencies o Corresponds with the concept of an object ID in object-oriented systems
CHAPTER 5
o Purpose–translate the
logical description of data
Normalization
into the technical
specifications for storing
and retrieving data
o Goal–create a design for
storing data that will
provide adequate
performance and ensure
database integrity, security, and recoverability
multivalued attributes
Each row of data has one value