The Relational Database Model & The Database Development Process

Slides:



Advertisements
Similar presentations
Relational Database. Relational database: a set of relations Relation: made up of 2 parts: − Schema : specifies the name of relations, plus name and type.
Advertisements

BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 5/1 Copyright © 2004 Please……. No Food Or Drink in the class.
SQL Lecture 10 Inst: Haya Sammaneh. Example Instance of Students Relation  Cardinality = 3, degree = 5, all rows distinct.
The Relational Database Model – some relations you might want to avoid!!!
The Relational Database Model
Relational Databases Chapter 4.
THE RELATIONAL DATABASE MODEL & THE DATABASE DEVELOPMENT PROCESS Fact of the Week: According to a Gartner study in ‘06, Microsoft SQL server had the highest.
Monday, 08 June 2015Dr. Mohamed Osman1 What is Database Administration A high level function (technical Function) that is responsible for ► physical DB.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 8.
ETEC 100 Information Technology
Fundamentals, Design, and Implementation, 9/e Chapter 5 Database Design.
Relational Model Stores data as tables –Each column contains values about the same attribute –Each column has a distinct name –Each row contains values.
Database Design Concepts INFO1408 Term 2 week 1 Data validation and Referential integrity.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
SQL DDL constraints Restrictions on the columns and tables 1SQL DDL Constraints.
Business Driven Technology Unit 2 Exploring Business Intelligence Copyright © 2015 McGraw-Hill Education. All rights reserved. No reproduction or distribution.
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.
The Relational Model Codd (1970): based on set theory Relational model: represents the database as a collection of relations (a table of values --> file)
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
Database Architecture The Relational Database Model.
Chapter 14 & 15 Conceptual & Logical Database Design Methodology
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.
Lecture 2 The Relational Model. Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations.
© Pearson Education Limited, Chapter 2 The Relational Model Transparencies.
1 Introduction to modeling Relational modelling Slides for this part are based on Chapters 11 from Halpin, T. & Morgan, T. 2008, Information Modeling and.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Fundamentals of Relational Database Yong Choi School of Business CSUB, Bakersfield.
1 CSE 480: Database Systems Lecture 5: Relational Data Model.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
GUS: 0262 Fundamentals of GIS Lecture Presentation 3: Relational Data Model Jeremy Mennis Department of Geography and Urban Studies Temple University.
10/17/2012ISC471/HCI571 Isabelle Bichindaritz 1 Technologies Databases.
Data Integrity An empty database is a correct database.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
Relational Data Model Ch. 7.1 – 7.3 John Ortiz Lecture 3Relational Data Model2 Why Study Relational Model?  Most widely used model.  Vendors: IBM,
MIS 327 Database Management system 1 MIS 327: DBMS Dr. Monther Tarawneh Dr. Monther Tarawneh Week 2: Basic Concepts.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
IS 325 Notes for Wednesday August 28, Data is the Core of the Enterprise.
Database Concepts. Data :Collection of facts in raw form. Information : Organized and Processed data is information. Database : A Collection of data files.
IST 220 Introduction to Databases Course Wrap-up.
Database Application Design and Data Integrity AIMS 3710 R. Nakatsu.
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.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
1 SQL - II Data Constraints –Applying data constraints Types of data constraints –I/O constraints The PRIMARY KEY constraints The FOREIGN KEY constraints.
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.
1 CS 430 Database Theory Winter 2005 Lecture 4: Relational Model.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
Relational Database Model & Database Development Process IST359 M005 Yang Wang 342 Hinds
Database Systems Logical Data Modelling Tutor:Ian Perry Tel: Web:
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.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
Week 2 Lecture The Relational Database Model Samuel ConnSamuel Conn, Faculty Suggestions for using the Lecture Slides.
Database Planning Database Design Normalization.
1 The Relational Data Model David J. Stucki. Relational Model Concepts 2 Fundamental concept: the relation  The Relational Model represents an entire.
1 Agenda TMA02 M876 Block 4. 2 Model of database development data requirements conceptual data model logical schema schema and database establishing requirements.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
Relational Model Database Management Systems, 3rd ed., Ramakrishnan and Gehrke, Chapter 3.
Chapter 5 Database Design
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 4 Relational Model Characteristics
Chapter 4 Relational Databases
Constraints.
Presentation transcript:

The Relational Database Model & The Database Development Process The little reed, bending to the force of the wind, soon stood upright again when the storm had passed over. ~ Aesop ~

Learning Objectives Describe the Relational Model Define relational terms and understand the terminology in practice. Understand these relational terms through practice Explain the System Development Life Cycle (SDLC) Explain the Database Life Cycle (DBLC)

Fundamental Axioms of DBMSs Users communicate with computer applications (websites, etc) Computer applications communicate with DBMSs. Users do not communicate with DBMSs directly. As a result DBMSs although they can be used interactively, are not used interactively. A DBMS is not a replacement for sound database design principles.

The Relational Database Model Many DBMS applications implement the Relational Model, but none of them enforce it. This permits rookie database designers to shoot themselves in the foot. And many have (including yours truly). The Relational Model has: (Codd’s 3 rules) 1)Data Independence Clear separation between data and metadata 2) Data Consistency Minimal redundancy; the data adopts the “DRY” principle 3) Easy to use You don’t have to understand the implementation to use it.

You can build a poorly-designed DB in a DBMS Do you see problems with this database design? Think Codd: Independence? Consistency? Ease-of-Use? Change Sally Jones’s phone #? How many ‘Software’ in the database? Add New Employee Bob Smith? Delete Dave Smith (no longer works here)

Activity: Relational Terminology Identify Each of These : Table Relation Row Column Tuple Attribute Physical Domain Logical Domain

DBMS : Physical Domain Different “flavors” of DBMSs use different data types.

DBMS: Logical Domain Default Value – a value entered into an attribute for a row when one isn’t specified. Check Constraint – an expression which must be evaluated prior to the insertion of a row. Eg. Employee_hourly_wage >= 0 Unique Constraint – ensures duplicate values are not inserted into a column. (Secondary Keys should have unique constraints) Lookup table – a separate table containing all of the acceptable values for a given column, typically varchar (Think drop down list) The column you’re trying to constrain is a FK to the lookup table.

Example: Lookup Table CategoryID Book Hardware Software Foreign Key

Activity: The Relational Table Relation name? Attributes? Does any column uniquely identify a row? Physical Domain? Logical Domain? Relation Name? Attributes? Physical Domain of Columns? Logical Domain of Columns? Candidate Keys?

Activity: Find the keys Candidate? Primary? Secondary? Foreign? Surrogate? What would be the candidates for super, candidate, primary, secondary, and foreign keys in the above example?

Rule for joining tables One more time. Tables Rule for joining tables Columns: Phys. Domain. Log Domain? Null? Keys: Candidate? Primary? Foreign, Surrogate, Secondary?

Activity: Which of these is a good PK? Candidate keys? Best primary key? Why? Should a Surrogate key be used?

The Natural Join at Work

Activity: Where’s the Integrity? Which of the 4 tables exhibit Entity Integrity? Which of the 3 relationships exhibit Referential Integrity? Answers: Entity Integrity = Tables B, C Referential Integrity = Relationships A=>B, B=>D

Example: Implementation of a 1-M Relationship

Example: Implementation of a M-N Relationship This M-M Relationship has been resolved into two 1-M relationships

Example:Null and Flags Nulls typically cause problems in Varchar and Numeric, and bit fields 103 and 105 are null for different reasons! Null makes sense for this column Flags used to represent different status

Data Models: Abstraction Levels Conceptual Highly Abstract Hardware and Software Independent Logical Somewhat Abstract Hardware Independent Software Dependent Internal External Not Abstract (Concrete) Hardware and Software Dependent Physical

Systems Development Lifecycle I Planning II Analysis III Design IV Implementation V Maintenance & Support Time Resources Conceptual Model Logical Model Internal / External Model SDLC / DBLC Physical Model

The Relational Database Model & The Database Development Process Questions?