Relational Database Model

Slides:



Advertisements
Similar presentations
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Advertisements

ITS232 Introduction To Database Management Systems
The Relational Database Model
The Relational Database Model. 2 Objectives How relational database model takes a logical view of data Understand how the relational model’s basic components.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
Chapter 5 Normalization of Database Tables
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Establishing Table Structures Chapter 7 Database Design for Mere Mortals.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
The Relational Database Model
3 The Relational Model MIS 304 Winter Class Objectives That the relational database model takes a logical view of data That the relational model’s.
The Relational Database Model
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
CSCI 3140 Module 2 – Conceptual Database Design Theodore Chiasson Dalhousie University.
Module III: The Normal Forms. Edgar F. Codd first proposed the process of normalization and what came to be known as the 1st normal form. The database.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
The Relational Database Model
(Spring 2015) Instructor: Craig Duckett Lecture 10: Tuesday, May 12, 2015 Mere Mortals Chap. 7 Summary, Team Work Time 1.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
CIS 210 Systems Analysis and Development Week 6 Part II Designing Databases,
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Database Systems, 9th Edition 1.  In this chapter, students will learn: That the relational database model offers a logical view of data About the relational.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 3 The Relational Database Model.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 3 The Relational Database Model.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
Department of Mathematics Computer and Information Science1 CS 351: Database Systems Christopher I. G. Lanclos Chapter 3: The Relational Database Model.
Chapter 10 Designing Databases. Objectives:  Define key database design terms.  Explain the role of database design in the IS development process. 
NORMALIZATION. What is Normalization  The process of effectively organizing data in a database  Two goals  To eliminate redundant data  Ensure data.
3 1 Database Systems The Relational Database Model.
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
Description and exemplification use of a Data Dictionary. A data dictionary is a catalogue of all data items in a system. The data dictionary stores details.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
Chapter 3 The Relational Database Model. Database Systems, 10th Edition 2 * Relational model * View data logically rather than physically * Table * Structural.
1 CS 430 Database Theory Winter 2005 Lecture 7: Designing a Database Logical Level.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
Database Planning Database Design Normalization.
Decision Analysis Fall Term 2015 Marymount University School of Business Administration Professor Suydam Week 10 Access Basics – Tutorial B; Introduction.
Understanding Data Storage
Client/Server Databases and the Oracle 10g Relational Database
The Relational Database Model
(Winter 2017) Instructor: Craig Duckett
Information Systems Today: Managing in the Digital World
DESIGNING DATABASE APPLICATIONS
Functional Dependencies
CIS 155 Table Relationship
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 4 Relational Model Characteristics
Lecture 2 The Relational Model
Modern Systems Analysis and Design Third Edition
Chapter 4 Relational Databases
Chapter 3 The Relational Database Model
MANAGING DATA RESOURCES
Normalization Referential Integrity
Chapter 6 Normalization of Database Tables
Database Systems: Design, Implementation, and Management Ninth Edition
Database.
The Relational Database Model
Database Design Hacettepe University
DCT 2053 DATABASE CONCEPT Chapter 2.2 CONTINUE
The ultimate in data organization
Chapter 17 Designing Databases
Database Systems: Design, Implementation, and Management
Database Design Chapter 7.
Presentation transcript:

Relational Database Model Tables By Bob Larson

Relational Database Model Introduced by E. F. Codd in 1970 A Logical View of Data Enables developer to view data logically rather than physically Greater logical simplicity tends to yield simpler and more effective database design methodologies

Tables Cornerstone of Relational DBMS Advantages – structural and data independence Conceptually Resembles a file Note a file is actually a physical structure Easier to understand than its hierarchical and network database predecessors

Table Characteristics

Keys – Key Attributes (Fields) Consists of one or more attributes that determine appropriateness of other attributes Primary Key (PK) – Attribute or a combination of attributes that uniquely identifies each entity (row) 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

Keys Types

Keys – Primary & Foreign

Null Values No data entry – Not the same as zero (0) Can represent An unknown attribute value A known, but missing, attribute value A “not applicable” condition Not permitted in primary key Should be avoided in other fields (when possible) Create problems with math functions such as COUNT, AVERAGE, and SUM Can create logical problems when relational tables are linked

Field (Column) Redundancy (?) Controlled redundancy: Makes the relational database work Database tables share common attributes only to enable the tables to be linked Multiple occurrences of a field in a database is not redundant when required to make the relationship work Redundancy exists only when there is unnecessary duplication of attribute values (? - click)

Entity Integrity Rules

Integrity Rules

Database Normalization Process of efficiently organizing data in a database Two goals: Eliminate redundant data (storing same data in multiple tables) Reduce the amount of space a database consumes Ensure data dependencies make sense (only storing related data in a table) Ensure that data is logically stored Database community developed a guidelines Normal forms Numbered from one (lowest or 1NF) through five (5NF) Typical applications use 1NF, 2NF, and 3NF (occasional 4NF) Fifth normal form is very rarely seen and won't be Important to point out that they are guidelines only Occasionally, it becomes necessary to meet business requirements

Normal Forms (1-4) First normal form (1NF) Second normal form (2NF) Eliminate duplicative columns from the same table Create separate tables for each group of related data Identify each row with a unique column or set of columns (the primary key) Second normal form (2NF) Meet all the requirements of the first normal form Remove subsets of data that apply to multiple rows of a table and place them in separate tables Create relationships between these new tables and their predecessors through foreign keys Third normal form (3NF) Meet all the requirements of the second normal form Remove columns that are not dependent upon the primary key Fourth normal form (4NF) Meet all the requirements of the third normal form Remove columns with multi-valued dependencies Guidelines are cumulative For a database to be in 2NF, it must meet the criteria of a 1NF database

Table Normalized

Indexes (Index Fields) Used to logically access rows in a table Index key Index’s reference point Points to data location identified by the key Unique index Index in which the index key can have only one pointer value (row) associated with it Each index is associated with only one table

Table Types Data (Entities / Nouns) Transaction (Events / Verbs) Subset Validation

Data Tables Sometimes called inventory tables Generally your object (entity) tables Important persons, places, or things Not the processing of those things Clearly relationships between the tables But no common (link) fields

Transaction Tables Sometimes called linking, event or junction tables Used to link data tables which can’t be linked directly Event tables linked at a point in time when something happened

Subset Tables Includes fields directly related to another data table Cruise Example Security Example Includes fields directly related to another data table Can’t be included in the original data table For security reasons They would represent multiple entries in a single field Often we discovered as we start entering test data

Validation Tables Helps maintain data integrity for a field Used for field lookups and combo boxes on forms Limits user choices to a drop-down list Not data tables because they are secondary in importance We didn’t build the database to track states or department codes

Problem Fields (Don’ts) Calculated field – can be computed by mathematical calculation or text concatenation Waste of storage space (redundant), No assurance the calculated value is updated when the user changes the input field(s) Multipart field – contains that should be two or more fields Extra work when you want to analyze your data Multivalue field – multiple correct entries for the field Create a separate subset table with each value in its own record. Derived field – contents of one or more fields absolutely predicts the contents of another Should be dropped from the table

Table Name Guidelines Keep it short, simple and descriptive without using acronyms, abbreviations or codes Do not include object names like File, Records, Table and List Use the plural form of the name Do not use names that refer to or imply more than one subject Materials and Supplies – should be two fields Do not use names that unnecessarily restrict the scope of your data Names that imply a time frame, regional location or organizational status – Manufacturing Employees

Field Name Guidelines Keep it unique Should be unique in entire DBMS except to link Keep it short, simple and descriptive Use the singular form of the name Do not use names that refer to or imply more than one attribute or subject Avoid codes and acronyms Use abbreviations only if their meaning is absolutely clear

The Data Dictionary/Catalog Provides detailed accounting of all tables found within the user/designer-created database Contains (at least) all the attribute names and characteristics for each table in the system Contains metadata—data about data Sometimes described as “the database designer’s database” because it records the design decisions about tables and their structures Terms “system catalog” and “data dictionary” are often used interchangeably

A Sample Data Dictionary

Fin…