The Relational Model UC Berkeley Extension [email protected] Copyright © 2008 Patrick McDermott.
-
Upload
alexis-bradford -
Category
Documents
-
view
215 -
download
0
Transcript of The Relational Model UC Berkeley Extension [email protected] Copyright © 2008 Patrick McDermott.
![Page 2: The Relational Model UC Berkeley Extension pmcdermott@msn.com Copyright © 2008 Patrick McDermott.](https://reader035.fdocuments.in/reader035/viewer/2022072116/56649ef15503460f94c02212/html5/thumbnails/2.jpg)
History
Codd Relational Model 1970
Codd 3NF 1972
Boyce/Codd 1974
Fagin 4NF 1977
Fagin 5NF 1979
![Page 3: The Relational Model UC Berkeley Extension pmcdermott@msn.com Copyright © 2008 Patrick McDermott.](https://reader035.fdocuments.in/reader035/viewer/2022072116/56649ef15503460f94c02212/html5/thumbnails/3.jpg)
TablesA “Relation” is a Table
– NOT so called because of ERD RelationshipsA Set of named ColumnsAn Arbitrary number of unnamed RowsEach Row is identified by a unique Key
![Page 4: The Relational Model UC Berkeley Extension pmcdermott@msn.com Copyright © 2008 Patrick McDermott.](https://reader035.fdocuments.in/reader035/viewer/2022072116/56649ef15503460f94c02212/html5/thumbnails/4.jpg)
Relational Database SystemsData is represented in a collection of two-
dimensional tables.Relationships between the data in the
tables are expressed by values tables. Using SQL, you can create relationships
between the data in a dynamic fashion on the fly.
The relationships between the data entities do not necessarily need to be defined or envisioned when the database is first created.
![Page 5: The Relational Model UC Berkeley Extension pmcdermott@msn.com Copyright © 2008 Patrick McDermott.](https://reader035.fdocuments.in/reader035/viewer/2022072116/56649ef15503460f94c02212/html5/thumbnails/5.jpg)
Relational Model Components
1. Data Structure• DDL: Data Definition Language
2. Data Manipulation• DML: Data Manipulation Language
3. Data Integrity• Business Rules re Key Referents
![Page 6: The Relational Model UC Berkeley Extension pmcdermott@msn.com Copyright © 2008 Patrick McDermott.](https://reader035.fdocuments.in/reader035/viewer/2022072116/56649ef15503460f94c02212/html5/thumbnails/6.jpg)
Data Definition Language
CREATE TABLEALTER TABLEDROP TABLE
CREATE INDEXCREATE VIEW
Defines the
Database
![Page 7: The Relational Model UC Berkeley Extension pmcdermott@msn.com Copyright © 2008 Patrick McDermott.](https://reader035.fdocuments.in/reader035/viewer/2022072116/56649ef15503460f94c02212/html5/thumbnails/7.jpg)
Properties of Relational Tables
1. Entries in columns are single-valued
2. Entries in columns share the same domain
3. Each Row is Unique
4. The Sequence of columns has no significance
5. The Sequence of rows has no significance
6. Each column has a unique name
![Page 8: The Relational Model UC Berkeley Extension pmcdermott@msn.com Copyright © 2008 Patrick McDermott.](https://reader035.fdocuments.in/reader035/viewer/2022072116/56649ef15503460f94c02212/html5/thumbnails/8.jpg)
Characteristics of a Relation 1. Rows contain data about an entity 2. Columns contain data about attributes of
the entity3. Cells of the table hold a single value 4. All entries in a column are of the same
kind5. Each column has a unique name 6. The order of the columns is unimportant7. The order of the rows is unimportant 8. No two rows may be identical