Download presentation
Presentation is loading. Please wait.
1
Database
2
Relational Database Design
This chapter explores relational database design concepts that will help model the real-world enterprise in a relational database. It provides guidelines to define tables, columns, and establish relationships between tables so that there is minimum redundancy of data.
3
The problem of redundancy
Data redundancy implies finding the same data in more than one location within database tables. Redundancy in a relational schema is a non-optimal relational database design because of the following problems: Insertion Anomalies Deletion Anomalies Update Anomalies
4
Decompositions Decomposition in relational database design implies breaking down a relational schema into smaller and simpler relations that avoid redundancy. The idea is to be able to query the smaller relations for any information that we were previously able to retrieve from the original relational schema.
5
Functional Dependencies
Functional Dependency (FD) is a type of integrity constraint that extends the idea of a super key. It defines a dependency between subsets of attributes of a given relation.
6
Properties of Functional Dependencies
1. Reflexivity: If B is a subset of attributes in set A, then A → B. (by trivial FD) 2. Augmentation: If A → B and C is another attribute, then AC → BC Applying reflexivity to this rule, we can also say that, AC → B. 3. Transitivity: If A → B and B → C, then A → C.
7
Normal Forms Normalization is a procedure in relational database design that aims at converting relational schemas into a more desirable form. The goal is to remove redundancy in relations and the problems that follow from it, namely insertion, deletion and update anomalies.
8
A table is in 1NF if and only if it satisfies the following five conditions:
• There is no top-to-bottom ordering to the rows. • There is no left-to-right ordering to the columns. • There are no duplicate rows. • Every row-and-column intersection contains exactly one value from the applicable domain (and nothing else). • All columns are regular [i.e. rows have no hidden components such as row IDs, object IDs, or hidden timestamps].
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.