Lecture 1 of Advanced Databases Basic Concepts Instructor: Mr.Ahmed Al Astal.

Slides:



Advertisements
Similar presentations
Functional Dependencies and Normalization for Relational Databases
Advertisements

primary key constraint foreign key constraint
METU Department of Computer Eng Ceng 302 Introduction to DBMS Further Dependencies by Pinar Senkul resources: mostly froom Elmasri, Navathe and other books.
Chapter 3 Notes. 3.1 Functional Dependencies A functional dependency is a statement that – two tuples of a relation that agree on some particular set.
Ch 10, Functional Dependencies and Normal forms
+ Review: Normalization and data anomalies CSCI 2141 W2013 Slide set modified from courses.ischool.berkeley.edu/i257/f06/.../Lecture06_257.ppt.
Functional Dependencies and Normalization for Relational Databases.
Functional Dependencies and Normalization for Relational Databases
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Logical Model Agenda - Informal Mapping ER-Diagram to Schemas
METU Department of Computer Eng Ceng 302 Introduction to DBMS Functional Dependencies and Normalization for Relational Databases by Pinar Senkul resources:
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
1 Functional Dependency and Normalization Informal design guidelines for relation schemas. Functional dependencies. Normal forms. Normalization.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Databases 6: Normalization
Chapter 8 Normalization for Relational Databases Copyright © 2004 Pearson Education, Inc.
Announcements Homework 1 due Friday. Slip it under my office door (1155) or put in my mailbox on 5 th floor. Program 2 has been graded ;-( Program 3 out.
Chapter 10 Functional Dependencies and Normalization for Relational Databases.
Chapter 10 Functional Dependencies and Normalization for Relational Databases Copyright © 2004 Pearson Education, Inc.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 10 Functional Dependencies and Normalization for Relational Databases.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 6 NORMALIZATION FOR RELATIONAL DATABASES Instructor Ms. Arwa Binsaleh.
King Saud University College of Computer & Information Sciences Computer Science Department CS 380 Introduction to Database Systems Functional Dependencies.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Normalization for Relational Databases.
Your name here. Improving Schemas and Normalization What are redundancies and anomalies? What are functional dependencies and how are they related to.
DatabaseIM ISU1 Chapter 10 Functional Dependencies and Normalization for RDBs Fundamentals of Database Systems.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Topic 10 Functional Dependencies and Normalization for Relational Databases Faculty of Information Science and Technology Mahanakorn University of Technology.
Instructor: Churee Techawut Functional Dependencies and Normalization for Relational Databases Chapter 4 CS (204)321 Database System I.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 4 Normalization.
Top-Down Database Design Mini-world Requirements Conceptual schema E1 E2 R Relation schemas ?
Functional Dependencies and Normalization for Relational Databases.
Chapter 10 Functional Dependencies and Normalization for Relational Databases Copyright © 2004 Pearson Education, Inc.
Chapter 10 Functional Dependencies and Normalization for Relational Databases Copyright © 2004 Pearson Education, Inc.
Chapter 10 Functional Dependencies and Normalization for Relational Databases Copyright © 2004 Pearson Education, Inc.
Functional Dependencies and Normalization for Relational Databases
Chapter Functional Dependencies and Normalization for Relational Databases.
Functional Dependencies and Normalization Jose M. Peña
Ihr Logo Fundamentals of Database Systems Fourth Edition El Masri & Navathe Chapter 10 Functional Dependencies and Normalization for Relational Databases.
Ihr Logo Fundamentals of Database Systems Fourth Edition El Masri & Navathe Chapter 10 Functional Dependencies and Normalization for Relational Databases.
Logical Database Design (1 of 3) John Ortiz Lecture 6Logical Database Design (1)2 Introduction  The logical design is a process of refining DB schema.
11/07/2003Akbar Mokhtarani (LBNL)1 Normalization of Relational Tables Akbar Mokhtarani LBNL (HENPC group) November 7, 2003.
1 Functional Dependencies and Normalization Chapter 15.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Lecture 8: Database Concepts May 4, Outline From last lecture: creating views Normalization.
Deanship of Distance Learning Avicenna Center for E-Learning 1 Session - 7 Sequence - 2 Normalization Functional Dependencies Presented by: Dr. Samir Tartir.
1 CSE 480: Database Systems Lecture 18: Normal Forms and Normalization.
Chapter 7 Functional Dependencies Copyright © 2004 Pearson Education, Inc.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.
Al-Imam University Girls Education Center Collage of Computer Science 1 st Semester, 1432/1433H Chapter 10_part 1 Functional Dependencies and Normalization.
Chapter 8 Relational Database Design. 2 Relational Database Design: Goals n Reduce data redundancy (undesirable replication of data values) n Minimize.
11/06/97J-1 Principles of Relational Design Chapter 12.
1 CS 430 Database Theory Winter 2005 Lecture 8: Functional Dependencies Second, Third, and Boyce-Codd Normal Forms.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 10 Functional Dependencies and Normalization for Relational Databases.
Al-Imam University Girls Education Center Collage of Computer Science 1 nd Semester, 1432/1433H Chapter 10_part2 Functional Dependencies and Normalization.
Functional Dependencies and Normalization for Relational Databases 1 Chapter 15 تنبيه : شرائح العرض (Slides) هي وسيلة لتوضيح الدرس واداة من الادوات في.
Chapter 10 Functional Dependencies and Normalization for Relational Databases Copyright © 2004 Pearson Education, Inc.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Chapter 14 Functional Dependencies and Normalization Informal Design Guidelines for Relational Databases –Semantics of the Relation Attributes –Redundant.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
10/3/2017.
Functional Dependency and Normalization
Introduction to the database systems (1)
Functional Dependencies and Normalization for Relational Databases
Normalization Functional Dependencies Presented by: Dr. Samir Tartir
Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases.
Functional Dependencies and Normalization for Relational Databases
Database Management systems Subject Code: 10CS54 Prepared By:
Relational Database Design
Presentation transcript:

Lecture 1 of Advanced Databases Basic Concepts Instructor: Mr.Ahmed Al Astal

 Page 2 Basic Concepts Introduction and basic definitions ER Modeling. ER-Relational Schema Mapping Database Languages. FDs and Normalization. Agenda

 Page 3 Basic Concepts Database : A set of related data. Database management Systems (DBMS): software package/ system to facilitate the creation and maintenance of a computerized database. Database System: The DBMS software together with the data itself. Sometimes, the applications are also included. Introduction and basic definitions

 Page 4 Basic Concepts Database Administrator (DBA). Database Designer. End Users Application Programmers. Database Users

 Page 5 Basic Concepts ER Model: is a logical model that used for describing Entities and the relationships between these entities. ER Symbols: ER Modeling Meaning ENTITY TYPE WEAK ENTITY TYPE RELATIONSHIP TYPE IDENTIFYING RELATIONSHIP TYPE ATTRIBUTE Symbol Meaning KEY ATTRIBUTE MULTIVALUED ATTRIBUTE COMPOSITE ATTRIBUTE DERIVED ATTRIBUTE Symbol

 Page 6 Basic Concepts

 Page 7 Basic Concepts  Mapping of Regular Entity Types  Mapping of Weak Entity Types  Mapping of Binary 1:1 Relation Types  Mapping of Binary 1:N Relationship Types.  Mapping of Binary M:N Relationship Types.  Mapping of Multi-valued attributes.  Mapping of N-ary Relationship Types ER to Relational Mapping

 Page 8 Basic Concepts  Procedural Languages: Relational Algebra, Relational Calculus, Cobol,…. Non Procedural Languages: SQL  DDL: Create, Alter Table, Drop Table  DML: Select, Update, Delete Database Languages

 Page 9 Basic Concepts Functional dependencies (FDs) are used to specify formal measures of the "goodness" of relational designs. FDs are constraints that are derived from the meaning and interrelationships of the data attributes. SSN  ENAME Level, Experience_Years  Salary FDs & Normalization

 Page 10 Basic Concepts IR1. (Reflexive) If Y ⊇ X, then X -> Y IR2. (Augmentation) If X  Y, then XZ  YZ (Notation: XZ stands for X U Z) IR3. (Transitive) If X  Y and Y  Z, then X -> Z Inference Rules for FDs

 Page 11 Basic Concepts Some additional inference rules that are useful: (Decomposition) If X  YZ, then X  Y and X  Z (Union) If X  Y and X  Z, then X  YZ (Pseudo transitivity) If X  Y and WY  Z, then WX  Z Inference Rules for FDs

 Page 12 Basic Concepts Normalization: The process of decomposing unsatisfactory "bad" relations by breaking up their attributes into smaller relations  First Normal Form.  Second Normal Form.  Third Normal Form.  BCNF Normalization

 Page 13 Basic Concepts  Disallows -composite attributes -Multi-valued attributes -nested relations; attributes whose values for an individual tuple are non-atomic First Normal Form

 Page 14 Basic Concepts Given a relation R and a set of FDs F hold on R, R is in BCNF (i.e. R is a good relation) iff for each FD in the form α -> β in F : α must be a super key If any FD fails then we divide the relation into tow relation R1(α, β), R2(R- β). BCNF (Boyce-Coded Normal Form)

 Page 15 Basic Concepts Given a relation R and a set of FDs F hold on R, R is in 3NF iff for each FD in the form α  β in F at least one of the following conditions satisfies: -α must be a key for R OR -Each attribute in β is Prime attribute If any FD fails then we divide the relation into tow relations: R1(α, Non Prime Attributes in β ), R2(R- Non Prime Attributes in β ). Third Normal Form 3NF

 Page 16 Basic Concepts Given a relation R and a set of FDs F hold on R, R is in 3NF iff for each FD in the form α  β in F at least one of the following conditions satisfies: -α must be a key for R OR -Each attribute in β is Prime attribute -α is not a subset of any key If any FD fails then we divide the relation into tow relations: R1(α, Non Prime Attributes in β ), R2(R- Non Prime Attributes in β ). Third Normal Form 2NF