Week 4 (Wednesday and Friday)

Week 4(Wednesday - 1 Relational Model Relational Model The foundation of present day databases Session 4 y Relational model ◦ Enables us to view

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 8/3/2009 1 Relational Model Relational Model The foundation of present day databases Session 4 y Relational model ◦ Enables us to view data logically rather than physically ◦ Similar to the simpler file concept of data storage A Logical View of Data A Logical View of Data y Table ◦ Has advantages of structural and data independence ◦ Resembles a file from conceptual point of view ◦ Easier to understand than its hierarchical and network database predecessors Characteristics of Tables Characteristics of Tables y Table : two-dimensional structure composed of rows and columns y Contains a group of related entities Æ an entity set ◦ The terms entity set and table are often used interchangeably 8/3/2009 2 Characteristics of Tables Characteristics of Tables (cont.) cont.) y Think of a table as a persistent relation : y A relation whose contents can be permanently saved for future use Example Example Keys Keys y Consist of one or more attributes that determine other attributes y Primary key (PK) is an attribute (or a combination of attributes) that uniquely identifies any given entity (row) y Key’s role is based on determination ◦ If you know the value of attribute A, you can look up (determine) the value of attribute B 8/3/2009 3 Keys Keys (cont. cont.) y Key attribute ◦ Any attribute that is part of a key y Composite key ◦ Composed of more than one attribute y Superkey y Superkey ◦ Any key that uniquely identifies each entity y Candidate key ◦ A superkey without redundancies Null Values Null Values y No data entry ◦ Not permitted in primary key ◦ Should be avoided in other attributes y Can represent ◦ An unknown attribute value An unknown attribute value ◦ A known, but missing, attribute value ◦ A “not applicable” condition y Can create problems in logic and when using formulae y Null is not zero Controlled Redundancy Controlled Redundancy y Makes the relational database work y Tables within the database share common attributes that enable us to link tables together (primary and foreign keys) y Multiple occurrences of values in a table are not redundant when they are required to make the relationship work y (Unwanted) redundancy is unnecessary duplication of data 8/3/2009 4 Example Example Keys Keys (cont.) cont.) y Foreign key (FK) ◦ An attribute whose values match primary key values in the related table y Referential integrity ◦ FK contains a value that refers to an existing...
View Full Document

This note was uploaded on 09/27/2009 for the course SEB 323 - S taught by Professor Professor during the Three '09 term at Deakin.

Page1 / 19

Week 4(Wednesday - 1 Relational Model Relational Model The foundation of present day databases Session 4 y Relational model ◦ Enables us to view

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online