Common Examples of Relational Database Management Systems (RDBMS) : - Oracle, - Mysql, - Microsoft SQL Server, - Postgresql and - Ibm Db2 - Etc

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 13

Common examples of Relational Database

Management Systems(RDBMS):
• Oracle,
• MySQL,
• Microsoft SQL Server,
• PostgreSQL and
• IBM DB2
• etc
• A relation schema is denoted by R(A1,A2,…AN)
is made of a relation name R and a list of
attributes A1,A2,…AN.
NORMALIZATION
• Normalization is the process of splitting
relations into well structured relations that
allow users to insert, delete, and update
tuples without introducing database
inconsistencies.

• There are three types of anomalies: update,


deletion and insertion anomalies.
Basic Normal Forms
• 1NF - Each attribute is atomic.
• 2NF - Must be in 1NF
- All non-key attributes are fully functional
dependent on the primary key

• 3NF - Must be in 1NF and 2NF


- no non-primary-key attribute is transitively
dependent on the primary key
2NF
• In a table, if attribute B is functionally dependent on A, but
is not functionally dependent on a proper subset of A, then
B is considered fully functional dependent on A.

• Hence, in a 2NF table, all non-key attributes cannot be


dependent on a subset of the primary key. Note that if the
primary key is not a composite key, all non-key attributes are
always fully functional dependent on the primary key.

• A table that is in 1st normal form and contains only a single


key as the primary key is automatically in 2nd normal form.
• Consider the following example:

• This table has a composite primary key [Customer ID, Store ID]. The
non-key attribute is [Purchase Location]. In this case, [Purchase
Location] only depends on [Store ID], which is only part of the primary
key. Therefore, this table does not satisfy second normal form.
To bring this table to second normal form, we
break the table into two tables, and now we
have the following:
• 3rd Normal Form Definition
• A database is in third normal form if it satisfies the
following conditions:
• It is in second normal form
• There is no transitive functional dependency
• By transitive functional dependency, we mean we have
the following relationships in the table: A is
functionally dependent on B, and B is functionally
dependent on C. In this case, C is transitively
dependent on A via B.
• In the table able, [Book ID] determines [Genre ID], and [Genre ID]
determines [Genre Type]. Therefore, [Book ID] determines [Genre
Type] via [Genre ID] and we have transitive functional
dependency, and this structure does not satisfy third normal form.

• To bring this table to third normal form, we split the table into two
as follows:
• Now all non-key attributes are fully functional dependent only on
the primary key. In [TABLE_BOOK], both [Genre ID] and [Price] are
only dependent on [Book ID].

• In [TABLE_GENRE], [Genre Type] is only dependent on [Genre ID].

You might also like