July 14, 2015ICS 424: recap1 Relational Database Design: Recap of ICS 324.

Slides:



Advertisements
Similar presentations
SQL Lecture 10 Inst: Haya Sammaneh. Example Instance of Students Relation  Cardinality = 3, degree = 5, all rows distinct.
Advertisements

Module 2 Designing a Logical Database Model. Module Overview Guidelines for Building a Logical Database Model Planning for OLTP Activity Evaluating Logical.
The Relational Model System Development Life Cycle Normalisation
Modeling the Data: Conceptual and Logical Data Modeling
Chapter 3 The Relational Model Transparencies © Pearson Education Limited 1995, 2005.
ETEC 100 Information Technology
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Basic (Flat) Relational Model.
Fundamentals, Design, and Implementation, 9/e Chapter 4 The Relational Model and Normalization.
Fundamentals, Design, and Implementation, 9/e Chapter 5 Database Design.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Chapter 3. 2 Chapter 3 - Objectives Terminology of relational model. Terminology of relational model. How tables are used to represent data. How tables.
Entity-Relationship Model and Diagrams (continued)
1 Relational Model. 2 Relational Database: Definitions  Relational database: a set of relations  Relation: made up of 2 parts: – Instance : a table,
1 Minggu 2, Pertemuan 3 The Relational Model Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 5 The Relational Model and Normalization.
1 Pertemuan 04 MODEL RELASIONAL Matakuliah: >/ > Tahun: > Versi: >
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.
The Relational Database Model
Chapter 3 The Relational Model and Normalization
1 Relational model concepts Key constraints Referential integrity constraint Steen Jensen, autumn 2013.
Lecture 2 The Relational Model. Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations.
Chapter 4 The Relational Model Pearson Education © 2014.
© Pearson Education Limited, Chapter 2 The Relational Model Transparencies.
Relational Model Session 6 Course Name: Database System Year : 2012.
Chapter 4 The Relational Model.
Chapter 3 The Relational Model Transparencies Last Updated: Pebruari 2011 By M. Arief
Relational Data Model, R. Ramakrishnan and J. Gehrke with Dr. Eick’s additions 1 The Relational Model Chapter 3.
Database Management System Lecture 6 The Relational Database Model – Keys, Integrity Rules.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Concepts and Terminology Introduction to Database.
Fundamentals, Design, and Implementation, 9/e. Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 4/2 Copyright.
Chapter 3 The Relational Model. 2 Chapter 3 - Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
Logical Database Design Relational Model. Logical Database Design Logical database design: process of transforming conceptual data model into a logical.
MIS 3053 Database Design & Applications The University of Tulsa Professor: Akhilesh Bajaj RM/SQL Lecture 1 ©Akhilesh Bajaj, 2000, 2002, 2003, All.
Copyright © Curt Hill The Relational Model of Database Basic organization and terms.
CSCI 3140 Module 3 – Logical Database Design for the Relational Model Theodore Chiasson Dalhousie University.
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,
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
The Relational Model Pertemuan 03 Matakuliah: M0564 /Pengantar Sistem Basis Data Tahun : 2008.
Relational Database. Database Management System (DBMS)
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,
11/07/2003Akbar Mokhtarani (LBNL)1 Normalization of Relational Tables Akbar Mokhtarani LBNL (HENPC group) November 7, 2003.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
Dr. Mohamed Osman Hegaz1 Logical data base design (2) Normalization.
CSE314 Database Systems Lecture 3 The Relational Data Model and Relational Database Constraints Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
Normalization MIS335 Database Systems. Why Normalization? Optimizing database structure Removing duplications Accelerating the instructions Data integrity!
1 DATABASE TECHNOLOGIES (Part 2) BUS Abdou Illia, Fall 2015 (September 9, 2015)
The Relational Model. 2 Relational Model Terminology u A relation is a table with columns and rows. –Only applies to logical structure of the database,
3 1 Database Systems The Relational Database Model.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
CHAPTER 2 : RELATIONAL DATA MODEL Prepared by : nbs.
The Relational Model © Pearson Education Limited 1995, 2005 Bayu Adhi Tama, M.T.I.
McGraw-Hill/Irwin Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 6 Modeling the Data: Conceptual and Logical Data Modeling.
Chapter 3 The Relational Model. Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between mathematical.
Chapter 4 The Relational Model Pearson Education © 2009.
Quiz Questions Q.1 An entity set that does not have sufficient attributes to form a primary key is a (A) strong entity set. (B) weak entity set. (C) simple.
Translation of ER-diagram into Relational Schema
Chapter 3 The Relational Model.
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
The Relational Model Transparencies
Database solutions Chosen aspects of the relational model Marzena Nowakowska Faculty of Management and Computer Modelling Kielce University of Technology.
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 3 The Relational Model
Presentation transcript:

July 14, 2015ICS 424: recap1 Relational Database Design: Recap of ICS 324

July 14, 2015ICS 424: recap 2 Lecture objectives Briefly mention topics covered in ICS 334.

July 14, 2015ICS 424: recap 3 - Lecture outline Recap The main steps in DB Design Requirement collection and analysis Conceptual data model Logical data model (in our case - Relational data Model) Physical data model Relational Data model

July 14, 2015ICS 424: recap 4 - The main Steps in DB Design Requirement collection and analysis How the data is collected and analyzed. Data modeling How data should be organized and stored in the database. Includes: Conceptual data model Logical data model physical data model Functional modeling How the data is processed.

July 14, 2015ICS 424: recap 5 -- Requirement collection and analysis The goals are: To determine the data requirements of the DB in terms of primitive objects To classify and describe the information about these objects To identify and classify the relationships among the objects To determine the types of transactions that will be executed on the DB and the interactions between the data and the transactions To identify rules governing the integrity of the data Requirement analysis can be gathered by data modeler from: Existing documents Users Existing systems

July 14, 2015ICS 424: recap Example Required: A database to record students’ enrollment in ICS courses. Assume that after requirement analysis we identified the following 3 entities. Course Enroll Student

July 14, 2015ICS 424: recap 7 -- Conceptual data model Objectives: To identify entities: To identify the highest-level relationships among entities. No attribute is specified

July 14, 2015ICS 424: recap Example: Enroll student 3 main entities: Student, Enroll, Course course

July 14, 2015ICS 424: recap 9 -- Logical data model Objective: Describe the data in as much detail as possible, without regard to how they will be physically implemented in the database. Features include: Entities and relationships among them. All attributes for each entity are specified. The primary key for each entity specified. Foreign keys are specified. Many-to-many relationships are resolved Normalization occurs at this level.

July 14, 2015ICS 424: recap Example: Student Course CID Name GPA SID Enroll YOB Name Note: Because relational data model is a logical data model, it should be discussed together with the logical data model. But I prefer discussing it after the physical data model.

July 14, 2015ICS 424: recap Physical Data Model Features: Specification all tables and columns Foreign keys are used to identify relationships between tables Denormalization may occur based on user requirements Physical considerations may cause the physical data model to be quite different from the logical data model Steps: Convert entities into tables Convert relationships into foreign keys Convert attributes into columns Modify the physical data model based on physical constraints / requirements

July 14, 2015ICS 424: recap 12 - The Relational Data Model The logical model behind the relational DB (RDB). Data is always represented as relations (2-dim. tables). Basic Concepts: Relation Attribute Schema Tuple Keys Constraints Functional dependency Normalization

July 14, 2015ICS 424: recap Relation The way to represent data is through relations. A relation is a two-dimensional table. The order of rows and columns can be exchanged, and it is still the same relation. Example: CIDTitle ICS 102Java ICS 202Data structures ICS 334Databases Course Relation name Relation

July 14, 2015ICS 424: recap Attribute An attribute is the name of a column in a relation. It usually describes the meaning of the content in the column. Example: Attributes CIDTitle ICS 102Java ICS 202Data structures ICS 334Databases Course

July 14, 2015ICS 424: recap Schema A schema is a description of a class of relation. It consists of the name of the relation and the set of attributes in the relation. That it is a set of attributes means that the attributes are unordered. Example: Schema for the above relation: Course(CID, Title) CIDTitle ICS 102Java ICS 202Data structures ICS 334Databases Course

July 14, 2015ICS 424: recap Tuple A tuple is a row in a table. A relation can be seen as a set of tuples. Example: A relation with 3 tuples CIDTitle ICS 102Java ICS 202Data structures ICS 334Databases Course

July 14, 2015ICS 424: recap Keys Superkey: A combination of attributes that can be uniquely used to identify a record. A table may have many superkeys Candidate key: A superkey but without extraneous data. A table can have one or more candidate keys Primary key One of the candidate keys is chosen to be the primary key. There can only be one primary key in a table Alternate key All the candidate keys, minus the primary key. The number of alternate keys in a table is one less than the number of candidate keys.

July 14, 2015ICS 424: recap constraints NOT NULL No null values are allowed in an attribute specified as NOT NULL UNIQUE No duplicate values are allowed in a column specified as UNIQUE. Primary key Must be UNIQUE and NOT NULL Foreign key Must refer to a value of a candidate key in the parent table Can be null Can be duplicate

July 14, 2015ICS 424: recap Functional dependency A functional dependency occurs when one or more attributes in a relation uniquely determine other attribute(s). If A and B are attributes, this can be written A --> B which would be the same as stating "B is functionally dependent upon A." Attribute A is the determinant and attribute B is the functionally dependent. If the determinant is part of the primary key (and not the whole key), then the dependency is called partial dependency. If both the determinant and the functionally dependent attributes are non key attributes, then the dependency is called transitive dependency.

July 14, 2015ICS 424: recap Normalization UNF (Un Normalized form) A relation is in UNF if it contains at least one multi-valued attribute INF A relation is in 1NF if it has no multi-valued attribute. 2NF A relations is in 2NF if it is in 1NF and has no partial dependency. 3NF A relation is in 3NF if its is in 2NF and contains no transitive dependency. BCNF A relation is in BCNF if and only if, every determinant is a candidate key.

July 14, 2015ICS 424: recap 21 END