Introduction to Databases
• To understand basic database terms and
Flat Files or
File Processing Systems
• The Traditional
– Separate files
are created and
stored for each
Drawbacks to the
File Processing Systems
• Data redundancy
– Duplication of data in separate files.
• Lack of data integrity
– The degree to which the data in any one file is
• Program-data dependence
– A situation in which program and data organized for
one application are incompatible with programs and
data organized differently for another application.
The DATABASE Approach
• Central repository of shared data
• Data is managed using a DBMS
• Stored in a standardized, convenient form
Requires a Database Management System (DBMS)
Database Management System
• A software system that is used to create, maintain,
and provide controlled access to user databases
DBMS manages data resources like an operating system manages hardware resources
Advantages to the Database
• Improved strategic use of the corporate database
• Reduced Data Redundancy
• Improved Data Integrity
• Easier Modification and Updating
• Data and program independence
• Better access to data and information
• Standardization of data access
• A framework for program development
• Better overall protection of data
• Shared data and information resources resulting in
• What is a Database?
• What is Data?
• What is Information?
• What is Metadata?
Data in Context Information Utility?
Characteristics of Valuable Information
Types of Data
• Image or graphical
• A type of logical database structure that treats
data as if it were stored in two-dimensional tables
• It can relate any piece of information stored in one
table to any piece in another table as long as the
two tables share a common data element.
• Tables stored in the database are often referred to as
flat files, tables, relations or entities.
– In each table, the rows are unique records and the
columns are fields.
– Another term for a row or record in a relational database
is a tuple.
– Attributes are also referred to as columns or elements.
• Relational database products (DBMS) range from PC-
based (lower-end) to client/server (higher-end) and/or
mainframe based (legacy systems).
Relational Database Model
• Relational Data Model
– All data elements are placed in two-dimensional tables,
called relations, that are the logical equivalent of files.
• Data element
• Field/ Column/ Atrribute
• Record/ Row/ Tuple
• File/ Table/ Entity
• Business Rules
– Statements that define or constrain some
aspect of the business
– Assert business structure
– Control/influence business behavior
– Expressed in terms familiar to end users
– Automated through DBMS software
Data Names and Definitions
• Data Names
– Related to business, not technical, characteristics
– Meaningful and self-documenting
– Composed of words from an approved list
• Data Definitions
Properties of Tables (Entities)
1) Every table has a unique name.
2) Every attribute value is atomic.
3) Every row is unique.
4) Attributes in tables have unique names.
5) The order of the columns is irrelevant.
6) The order of the rows is irrelevant.
• Attribute - property or characteristic of
an entity type (table)
• Can be identifying or descriptive
• Classifications of attributes:
– Required versus Optional Attributes
– Simple versus Composite Attribute
– Stored versus Derived Attributes
– Identifier Attributes
A composite attribute
• Identifier or Key - An attribute (or
combination of attributes) that uniquely
identifies individual instances of an entity
• Simple Key versus Composite Key
Simple and composite key attributes
(a) Simple key attribute
(b) Composite key attribute
Criteria for Selecting Identifiers
• Will uniquely identify an instance of the entity.
• Will not be null.
• Will not change in value.
• Intelligent identifiers not recommended
(containing e.g. locations or people that might
• Substitute new, simple keys for long, composite
Composite Key / Concatenated Key
Functional Dependencies & Keys
The key’s role is based on a concept known as
determination, which is used in the definition of
Functional Dependency: The value of one attribute (the
determinant) determines the value of another attribute.
Candidate Key: Each non-key field is functionally
dependent on every candidate key.
• Unique Identifier
• Non-Redundant or not-null
• Each non-key field is functionally dependent on every
Controlled redundancy (shared common
attributes) makes the relational database work.
The primary key of one table appears again as
the link (foreign key) in another table.
If the foreign key contains either matching
values or nulls, the table(s) that make use of
such a foreign key are said to exhibit referential
Primary and Foreign Keys