Data Base Manageme NT System (DBMS)
Data Base Manageme NT System (DBMS)
Data Base Manageme NT System (DBMS)
Manageme
nt System
(DBMS)
Conte
nts
Data Hierarchy
Traditional File Processing
Database approach to Data Management
DBMS- Features and Capabilities
Database Schemas
Components of DBMS
Data Models
RDBMS
Normalization
What is it and why is it required?
Background of Normalization: Definitions
The process of normalization
Data
Hierarchy
Data Hierarchy refers to the systematic organization of
data, often in a hierarchical form. A computer system
organizes data in a hierarchy that starts with bits and bytes
and progresses to fields, records, files, and databases. A bit
represents the smallest unit of data a computer can handle.
A group of bits, called a byte, represents a single
character, which can be a letter, a number, or another
symbol
Each application, requires its own files and its own computer
program to operate. For example, the human resources functional
area might have a personnel master file, a payroll file, a medical
insurance file, a pension file, a mailing list file, and so forth until
tens, perhaps hundreds, of files and programs existed. In the
company as a whole, this process led to multiple master files
created, maintained, and operated by separate divisions or
departments. As this process goes on for 5 or 10 years, the
organization is saddled with hundreds of programs and
applications that are very difficult to maintain and manage. The
resulting problems are data redundancy and
inconsistency, program-data dependence, inflexibility, poor data
security, and an inability to share data among applications.
Database approach
to Data
Management
Database
A database is a logically coherent collection of data with some
inherent meaning, representing some aspect of real world
and which is designed, built and populated with data for a
specific purpose .
DBMS
A Data Base Management System (DBMS) is a set of software
programs that enables users to define, create and maintain a
database. The DBMS also enforces necessary access restrictions
and security measures in order to protect the database.
Controlling of Redundancy
DBMS Features and
Capabilities
Computation: There are common computations requested on
attributes such as
counting, summing, averaging, sorting, grouping, cross-
referencing, etc
In the example above, "Customer ID" is the PK in one table and the
FK in another. The arrow represents a one-to-many relationship
between the two tables. The relationship indicates that one customer
can have one or more orders. A given order, however, can be initiated
by one and only one customer.
Normalization
Normaliza
tion
Normalization is a systematic way of ensuring that a database structure is
suitable for general-purpose querying and free of certain undesirable
characteristics that could lead to a loss of data integrity.
e.g. in an "Employee" table that includes the attributes "Employee ID" and
"Employee Date of Birth", the functional dependency {Employee ID} →
{Employee Date of Birth} would hold.
Background to Normalization:
Definitions
Full Functional Dependency
A and B are attributes of a relation,
B is fully dependent on A if B is functionally dependent on A but
not on any proper subset of A.
A candidate key is a key that can be used to uniquely identify record. I.e., it
may be used to retrieve one specific record.
The primary key of a relation is a candidate key that has been designated
as the main key.
A foreign key is an attribute (or collection of attributes) in a relation that can
be used as a key to another relation. Foreign keys link tables together to
form an integrated database.
The Process of Normalization
The Process of
Normalization
There are two main steps of the normalization process:
eliminate redundant data (for example, storing the same
data in more than one table) and ensure data dependencies
make sense (only storing related data in a table). Both of
these are worthy goals as they reduce the amount of space
a database consumes and ensure that data is logically
stored.
UNF to 1NF:
Eliminate duplicative columns from the same table (In other
words.. Remove subsets of data that apply to multiple rows of a
table and place them in separate tables.).
Create separate tables for each group of related data and identify
each row with a unique column or set of columns (the primary
key).
Create relationships between these new tables and their
predecessors through the use of foreign keys.
Second Normal Form
(2NF)
No Partial Dependencies on a Concatenated Key
1NF to 2NF:
Identify primary key for the 1NF relation.
Identify functional dependencies in the relation.
If partial dependencies exist on the primary key remove them by placing
them in a new relation along with copy of their determinant (in other
words, remove columns that are not fully dependent upon the primary
key).
Create relationships between these new tables and their predecessors
through the use of foreign keys.
Third Normal Form
(3NF)
No Dependencies on Non-Key Attributes
2NF to 3NF
Identify the primary key in the 2NF relation.
Identify functional dependencies in the relation.
If transitive dependencies exist on the primary key remove them by
placing them in a new relation along with copy of their determinant.
Thank You