Database Systems Redundancy, normalization
|
|
- Harold Sanders
- 6 years ago
- Views:
Transcription
1 Database Systems Redundancy, normalization Bence Molnár
2 Problems of relational DB schema
3 Bad example! Invalid value (no candidate key) Name FirstName Age ID IdNr Gipsz Jakab Jakab Hallgató Bálint Béla Gipsz Jakab Jakab redundancy (even if it would be a key, it's duplicated)
4 Bad example! Duplicated tuple inconsistency Name FirstName Age ID IDNr. Gipsz Jakab Jakab Hallgató Bálint Béla Gipsz Jakab Jakab Unable to filter on last name
5 Difficult points Enforce consistency: DB shouldn't contain contradictory information Enforce data validity: Data value should be a part of an exact set of values. Minimizing/eliminate redundancy: Multiple storage of same data Difficult to enforce data consistency Avoid duplicated tuples (if needed/possible) Avoid duplicated data storage (if needed/possible)
6 Solutions? Enforce consistency: normalization Enforce data validity: selection of proper data type Minimizing/eliminating redundancy: normalization Avoid duplicated tuples: key definition Avoid multiple data storage: careful designing, normalization
7 Redundancy, anomalies
8 Redundancy Redundancy is the source of following anomalies Update anomalies Insertion anomalies Deletion anomalies
9 Update anomalies Name John Doe John Doe Elon Musk Age Bought Chocolate Beer Beer Once I going to update John Does name I have to update it in multiple tuples!
10 Insertion anomalies Name John Doe John Doe Elon Musk age Bought Chocolate Beer Beer Age was mistyped (typo), unable to achieve reliable information.
11 Deletion anomalies Name John Doe John Doe Elon Musk Age Bought Chocolate Beer Beer If all rows corresponding to John Doe is deleted, his age information lost and no more available!
12 Avoiding redundancy To avoid redundancy, table structure must be normalized during DB design. During normalization we achieve different normalization levels and normal forms. To understand normal forms, first functional dependencies should be introduced.
13 Functional dependencies
14 Functional dependencies If two tuples of R agree on some attributes (A), then they must also agree on other attribute, B. B functionally depends on A. Name John Doe John Doe Age Name Age Syntax Bought Chocolate Beer
15 Functional dependency Candidate Key Note: functional dependency is a generalization of candidate key: If one or more attribute functionally defines all other attributes, than those attributes are superkey. If this set is minimal, than it's a candidate key
16 Functional dependencies Example Give the set of functional dependencies! Employees(IDNr, Name, Salary, Position) IDNr. Name, Salary, Position
17 Functional dependencies Example Give the set of functional dependencies! Employees(IDNr, Name, Salary, Position) IDNr. Name, Salary, Position Position Salary (?) Results(ClassName, NeptunID, Name, Grade)
18 Functional dependencies Example Give the set of functional dependencies! Employees(IDNr, Name, Salary, Position) IDNr. Name, Salary, Position Position Salary (?) Results(ClassName, NeptunID, Name, Grade) ClassName, NeptunID Grade
19 Normal forms
20 First normal form (1NF) Each tuples is different (has candidate key) Has a key which all attribute functionally depends on. Key can be all attribute of the relation Column number and order is the same for all tuples Each column may contain only one attribute All attribute has single value It's not trivial question of DB design
21 Second normal form (2NF) Definition of 2NF: fulfilled to 1NF + All not candidate key fully functional depending on candidate key and not depends on any subset of candidate key Full functional dependency: not functionally dependent on any proper subset of attributes If candidate key is a single attribute, it's OK
22 Decomposition (2NF) Neptun ABCD1 ABCD2 ABCD1 Neptun ABCD1 ABCD2 IDNr. 100AA 101AA 100AA Exam Result IDNr. 100AA 101AA Neptun ABCD1 ABCD2 ABCD1 Exam Result 4 5 3
23 Third normal form (3NF) Definition of 3NF: Fulfilled to 3NF + All attribute that excluded from candidate key full functionally depends on candidate key and only on it. There is no transitional dependency.
24 Decomposition (3NF) BoughtID 1 2 BoughtID 1 2 Bought Chocolate Beer Bought Chocolate Beer Price Product Chocolate Beer Price
25 Higher level of normalizations In practice 3NF is generally satisfactory 3NF ensures in most cases redundancy free DB BCNF, 4NF, 5NF Cons of higher levels: Fragmented table schema Complicated queries Reduces the efficiency of queries
26 In practice To increase efficiency normalization is not strictly performed in some cases.
27 Case Study
28 WebDLT Web based photogrammetry application 3D coordinates are calculable if it can be identified at least on two photos Image coordinates and other data is stored in DB MySQL DBMS + PhpMyAdmin + PHP + HTML + CSS
29
30 Input: User data Image coordinates (2D) Calculation results Output: Image points per project 3D points per project Validation information
31 E/R diagram
32 Relational DB schema diagram
33
34 Queries πprid,pname(σuid=10(projects projects_users)) πpoints_2d.pid(σpid=100&phid=200&prid=2(points_2d points)) σeid=100&prid=2(edges edges.pid1=points.pidpoints)
35 References
36 Exercise I. Given Specification Raw data E/R diagram Relational DB schema diagram Queries In text (by words) Relational algebra
37 Thank You!
FUNCTIONAL DEPENDENCIES
FUNCTIONAL DEPENDENCIES CS 564- Spring 2018 ACKs: Dan Suciu, Jignesh Patel, AnHai Doan WHAT IS THIS LECTURE ABOUT? Database Design Theory: Functional Dependencies Armstrong s rules The Closure Algorithm
More informationDATABASE MANAGEMENT SYSTEMS
www..com Code No: N0321/R07 Set No. 1 1. a) What is a Superkey? With an example, describe the difference between a candidate key and the primary key for a given relation? b) With an example, briefly describe
More informationA subquery is a nested query inserted inside a large query Generally occurs with select, from, where Also known as inner query or inner select,
Sub queries A subquery is a nested query inserted inside a large query Generally occurs with select, from, where Also known as inner query or inner select, Result of the inner query is passed to the main
More informationNormalization. Murali Mani. What and Why Normalization? To remove potential redundancy in design
1 Normalization What and Why Normalization? To remove potential redundancy in design Redundancy causes several anomalies: insert, delete and update Normalization uses concept of dependencies Functional
More informationCOSC Dr. Ramon Lawrence. Emp Relation
COSC 304 Introduction to Database Systems Normalization Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Normalization Normalization is a technique for producing relations
More informationRelational Database Design. Announcements. Database (schema) design. CPS 216 Advanced Database Systems. DB2 accounts have been set up
Relational Database Design CPS 216 Advanced Database Systems Announcements 2 DB2 accounts have been set up Let me know if you have not received an email from me regarding your account Recitation session
More informationDraw A Relational Schema And Diagram The Functional Dependencies In The Relation >>>CLICK HERE<<<
Draw A Relational Schema And Diagram The Functional Dependencies In The Relation I need to draw relational schema and dependency diagram showing transitive and partial Functional dependency and normalization
More informationApplied Databases. Sebastian Maneth. Lecture 5 ER Model, normal forms. University of Edinburgh - January 25 th, 2016
Applied Databases Lecture 5 ER Model, normal forms Sebastian Maneth University of Edinburgh - January 25 th, 2016 Outline 2 1. Entity Relationship Model 2. Normal Forms Keys and Superkeys 3 Superkey =
More informationPart II: Using FD Theory to do Database Design
Part II: Using FD Theory to do Database Design 32 Recall that poorly designed table? part manufacturer manaddress seller selleraddress price 1983 Hammers R Us 99 Pinecrest ABC 1229 Bloor W 5.59 8624 Lee
More informationApplied Databases. Sebastian Maneth. Lecture 5 ER Model, Normal Forms. University of Edinburgh - January 30 th, 2017
Applied Databases Lecture 5 ER Model, Normal Forms Sebastian Maneth University of Edinburgh - January 30 th, 2017 Outline 2 1. Entity Relationship Model 2. Normal Forms From Last Lecture 3 the Lecturer
More informationBabu Banarasi Das National Institute of Technology and Management
Babu Banarasi Das National Institute of Technology and Management Department of Computer Applications Question Bank (Short-to-Medium-Answer Type Questions) Masters of Computer Applications (MCA) NEW Syllabus
More informationCS317 File and Database Systems
CS317 File and Database Systems http://dilbert.com/strips/comic/2010-08-24/ Lecture 8 Introduction to Normalization October 17, 2017 Sam Siewert Exam #1 Questions? Reminders Working on Grading Ex #3 -
More informationTHE RELATIONAL DATABASE MODEL
THE RELATIONAL DATABASE MODEL Introduction to relational DB Basic Objects of relational model Properties of relation Representation of ER model to relation Keys Relational Integrity Rules Functional Dependencies
More informationSchema Refinement: Dependencies and Normal Forms
Schema Refinement: Dependencies and Normal Forms Grant Weddell Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Spring 2016 CS 348 (Intro to DB Mgmt)
More informationCSE 544 Principles of Database Management Systems. Magdalena Balazinska Fall 2009 Lecture 3 - Schema Normalization
CSE 544 Principles of Database Management Systems Magdalena Balazinska Fall 2009 Lecture 3 - Schema Normalization References R&G Book. Chapter 19: Schema refinement and normal forms Also relevant to this
More informationCSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2009 Lecture 4 - Schema Normalization
CSE 544 Principles of Database Management Systems Magdalena Balazinska Winter 2009 Lecture 4 - Schema Normalization References R&G Book. Chapter 19: Schema refinement and normal forms Also relevant to
More informationIn This Lecture. Normalisation to BCNF. Lossless decomposition. Normalisation so Far. Relational algebra reminder: product
In This Lecture Normalisation to BCNF Database Systems Lecture 12 Natasha Alechina More normalisation Brief review of relational algebra Lossless decomposition Boyce-Codd normal form (BCNF) Higher normal
More informationFunctional Dependencies and Finding a Minimal Cover
Functional Dependencies and Finding a Minimal Cover Robert Soulé 1 Normalization An anomaly occurs in a database when you can update, insert, or delete data, and get undesired side-effects. These side
More informationCSE 562 Database Systems
Goal CSE 562 Database Systems Question: The relational model is great, but how do I go about designing my database schema? Database Design Some slides are based or modified from originals by Magdalena
More informationAnnouncements (January 20) Relational Database Design. Database (schema) design. Entity-relationship (E/R) model. ODL (Object Definition Language)
Announcements (January 20) 2 Relational Database Design Review for Codd paper due tonight via email Follow instructions on course Web site Reading assignment for next week (Ailamaki et al., VLDB 2001)
More informationThis lecture. Databases -Normalization I. Repeating Data. Redundancy. This lecture introduces normal forms, decomposition and normalization.
This lecture Databases -Normalization I This lecture introduces normal forms, decomposition and normalization (GF Royle 2006-8, N Spadaccini 2008) Databases - Normalization I 1 / 23 (GF Royle 2006-8, N
More informationSchema Refinement: Dependencies and Normal Forms
Schema Refinement: Dependencies and Normal Forms Grant Weddell David R. Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Spring 2012 CS 348 (Intro to
More informationNormalisation theory
Normalisation theory Introduction to Database Design 2012, Lecture 7 Challenging exercises E-R diagrams example Normalisation theory, motivation Functional dependencies Boyce-Codd normal form (BCNF) 3rd
More informationNormalisation Chapter2 Contents
Contents Objective... 64 Superkey & Candidate Keys... 65 Primary, Alternate and Foreign Keys... 65 Functional Dependence... 67 Using Instances... 70 Normalisation Introduction... 70 Normalisation Problems...
More informationSchema Refinement: Dependencies and Normal Forms
Schema Refinement: Dependencies and Normal Forms M. Tamer Özsu David R. Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Fall 2012 CS 348 Schema Refinement
More informationFinal Review. Zaki Malik November 20, 2008
Final Review Zaki Malik November 20, 2008 Basic Operators Covered Renaming If two relations have the same attribute, disambiguate the attributes by prefixing the attribute with the name of the relation
More informationDatabases -Normalization I. (GF Royle, N Spadaccini ) Databases - Normalization I 1 / 24
Databases -Normalization I (GF Royle, N Spadaccini 2006-2010) Databases - Normalization I 1 / 24 This lecture This lecture introduces normal forms, decomposition and normalization. We will explore problems
More informationNormalization in DBMS
Unit 4: Normalization 4.1. Need of Normalization (Consequences of Bad Design-Insert, Update & Delete Anomalies) 4.2. Normalization 4.2.1. First Normal Form 4.2.2. Second Normal Form 4.2.3. Third Normal
More informationEECS 647: Introduction to Database Systems
EECS 647: Introduction to Database Systems Instructor: Luke Huan Spring 2009 Stating Points A database A database management system A miniworld A data model Conceptual model Relational model 2/24/2009
More informationNormalisation. Normalisation. Normalisation
Normalisation Normalisation Main objective in developing a logical data model for relational database systems is to create an accurate and efficient representation of the data, its relationships, and constraints
More informationCS403- Database Management Systems Solved Objective Midterm Papers For Preparation of Midterm Exam
CS403- Database Management Systems Solved Objective Midterm Papers For Preparation of Midterm Exam Question No: 1 ( Marks: 1 ) - Please choose one Which of the following is NOT a feature of Context DFD?
More informationA7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS
A7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be answered
More informationChapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Example of a Relation attributes (or columns) tuples (or rows) 2.2 Attribute Types The
More informationFunctional Dependencies, Normalization. Rose-Hulman Institute of Technology Curt Clifton
Functional Dependencies, Normalization Rose-Hulman Institute of Technology Curt Clifton Or Fixing Broken Database Designs This material will almost certainly appear on Exam II next week. Outline Functional
More informationNORMAL FORMS. CS121: Relational Databases Fall 2017 Lecture 18
NORMAL FORMS CS121: Relational Databases Fall 2017 Lecture 18 Equivalent Schemas 2 Many different schemas can represent a set of data Which one is best? What does best even mean? Main goals: Representation
More informationDatabase Normalization
Database Normalization Todd Bacastow IST 210 1 Overview Introduction The Normal Forms Relationships and Referential Integrity Real World Exercise 2 Keys in the relational model Superkey A set of one or
More informationDatabase Normalization
Database Normalization Asst. Prof. Dr. Kanda Runapongsa Saikaew (krunapon@kku.ac.th) Department of Computer Engineering Khon Kaen University 1 Overview What and why normalization Background to normalization
More informationDatabase Foundations. 3-9 Validating Data Using Normalization. Copyright 2015, Oracle and/or its affiliates. All rights reserved.
Database Foundations 3-9 Roadmap Conceptual and Physical Data Models Business Rules Entities Attributes Unique Identifiers Relationships Validating Relationships Tracking Data Changes over Time Validating
More informationDatabase Systems. Bence Molnár
Database Systems Bence Molnár SQL History Beginning of 70s IBM SEQUEL (Structured English QUery Language) Structured/Standard Query Language In 1986 ANSI, 1987 ISO standard SQL2 ('92), SQL3 ('99),... Development
More informationDatabase Normalization. (Olav Dæhli 2018)
Database Normalization (Olav Dæhli 2018) 1 What is normalization and why normalize? Normalization: A set of rules to decompose relations (tables) into smaller relations (tables), without loosing any data
More informationDistributed KIDS Labs 1
Distributed Databases @ KIDS Labs 1 Distributed Database System A distributed database system consists of loosely coupled sites that share no physical component Appears to user as a single system Database
More informationRelational model. Jaroslav Porubän, Miroslav Biňas, Milan Nosáľ (c)
Relational model Jaroslav Porubän, Miroslav Biňas, Milan Nosáľ (c) 2011-2016 Relational database model Data are represented as a mathematical relation (subset of cartesian product) of attribute domains
More informationWentworth Institute of Technology COMP2670 Databases Spring 2016 Derbinsky. Normalization. Lecture 9
Lecture 9 1 Outline 1. Context 2. Objectives 3. Functional Dependencies 4. Normal Forms 1NF 2NF 3NF 2 Database Design and Implementation Process 3 Theory and process by which to evaluate and improve relational
More informationFunctional dependency theory
Functional dependency theory Introduction to Database Design 2012, Lecture 8 Course evaluation Recalling normal forms Functional dependency theory Computing closures of attribute sets BCNF decomposition
More informationFUNCTIONAL DEPENDENCIES CHAPTER , 15.5 (6/E) CHAPTER , 10.5 (5/E)
FUNCTIONAL DEPENDENCIES CHAPTER 15.1-15.2, 15.5 (6/E) CHAPTER 10.1-10.2, 10.5 (5/E) 4 LECTURE OUTLINE Design guidelines for relation schemas Functional dependencies Definition and interpretation Formal
More informationCase Study: Lufthansa Cargo Database
Case Study: Lufthansa Cargo Database Carsten Schürmann 1 Today s lecture More on data modelling Introduction to Lufthansa Cargo Database Entity Relationship diagram Boyce-Codd normal form 2 From Lecture
More informationDATABASE MANAGEMENT SYSTEM SHORT QUESTIONS. QUESTION 1: What is database?
DATABASE MANAGEMENT SYSTEM SHORT QUESTIONS Complete book short Answer Question.. QUESTION 1: What is database? A database is a logically coherent collection of data with some inherent meaning, representing
More informationThe Relational Data Model
The Relational Data Model Lecture 6 1 Outline Relational Data Model Functional Dependencies Logical Schema Design Reading Chapter 8 2 1 The Relational Data Model Data Modeling Relational Schema Physical
More informationCS 2451 Database Systems: Database and Schema Design
CS 2451 Database Systems: Database and Schema Design http://www.seas.gwu.edu/~bhagiweb/cs2541 Spring 2018 Instructor: Dr. Bhagi Narahari Relational Model: Definitions Review Relations/tables, Attributes/Columns,
More informationRelational Model and Relational Algebra A Short Review Class Notes - CS582-01
Relational Model and Relational Algebra A Short Review Class Notes - CS582-01 Tran Cao Son January 12, 2002 0.1 Basics The following definitions are from the book [1] Relational Model. Relations are tables
More informationDatabase Design Theory and Normalization. CS 377: Database Systems
Database Design Theory and Normalization CS 377: Database Systems Recap: What Has Been Covered Lectures 1-2: Database Overview & Concepts Lecture 4: Representational Model (Relational Model) & Mapping
More informationCS411 Database Systems. 05: Relational Schema Design Ch , except and
CS411 Database Systems 05: Relational Schema Design Ch. 3.1-3.5, except 3.4.2-3.4.3 and 3.5.3. 1 How does this fit in? ER Diagrams: Data Definition Translation to Relational Schema: Data Definition Relational
More informationChapter 10. Normalization. Chapter Outline. Chapter Outline(contd.)
Chapter 10 Normalization Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant Information in Tuples and Update Anomalies 1.3 Null
More informationIn This Lecture. Exam revision. Main topics. Exam format. Particular topics. How to revise. Exam format Main topics How to revise
In This Lecture Exam format Main topics How to revise Database Systems Lecture 18 Natasha Alechina Exam format Answer three questions out of five Each question is worth 25 points I will only mark three
More informationCarnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Overview - detailed. Goal. Faloutsos & Pavlo CMU SCS /615
Faloutsos & Pavlo 15-415/615 Carnegie Mellon Univ. Dept. of Computer Science 15-415/615 - DB Applications Lecture #17: Schema Refinement & Normalization - Normal Forms (R&G, ch. 19) Overview - detailed
More informationDatabase Systems. Database design Bence Molnár
Database Systems Database design Bence Molnár molnar.bence@epito.bme.hu Last session Redundancy, Anomalies: Functional consistency insertion, deletion, modification dependency Normalization Table and normal
More informationDATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEM For COMPUTER SCIENCE DATABASE MANAGEMENT. SYSTEM SYLLABUS ER model. Relational model: relational algebra, tuple calculus, SQL. Integrity constraints, normal forms. File organization,
More informationRedundancy:Dependencies between attributes within a relation cause redundancy.
Normalization Normalization: It is the process of removing redundant data from your tables in order to improve storage efficiency, data integrity and scalability. This improvement is balanced against an
More informationCS403- Database Management Systems Solved MCQS From Midterm Papers. CS403- Database Management Systems MIDTERM EXAMINATION - Spring 2010
CS403- Database Management Systems Solved MCQS From Midterm Papers April 29,2012 MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01 CS403- Database Management Systems MIDTERM EXAMINATION - Spring
More informationCMU SCS CMU SCS CMU SCS CMU SCS whole nothing but
Faloutsos & Pavlo 15-415/615 Carnegie Mellon Univ. Dept. of Computer Science 15-415/615 - DB Applications Lecture #17: Schema Refinement & Normalization - Normal Forms (R&G, ch. 19) Overview - detailed
More informationDistributed Database Systems By Syed Bakhtawar Shah Abid Lecturer in Computer Science
Distributed Database Systems By Syed Bakhtawar Shah Abid Lecturer in Computer Science 1 Distributed Database Systems Basic concepts and Definitions Data Collection of facts and figures concerning an object
More informationRyan Marcotte CS 475 (Advanced Topics in Databases) March 14, 2011
Ryan Marcotte www.cs.uregina.ca/~marcottr CS 475 (Advanced Topics in Databases) March 14, 2011 Outline Introduction to XNF and motivation for its creation Analysis of XNF s link to BCNF Algorithm for converting
More informationFunctional Dependencies & Normalization for Relational DBs. Truong Tuan Anh CSE-HCMUT
Functional Dependencies & Normalization for Relational DBs Truong Tuan Anh CSE-HCMUT 1 2 Contents 1 Introduction 2 Functional dependencies (FDs) 3 Normalization 4 Relational database schema design algorithms
More informationCS211 Lecture: Database Design
CS211 Lecture: Database Design Objectives: last revised November 21, 2006 1. To introduce the anomalies that result from redundant storage of data 2. To introduce the notion of functional dependencies
More informationUnit 3 : Relational Database Design
Unit 3 : Relational Database Design Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Content Relational Model: Basic concepts, Attributes and Domains, CODD's Rules, Relational
More informationRelational Design: Characteristics of Well-designed DB
1. Minimal duplication Relational Design: Characteristics of Well-designed DB Consider table newfaculty (Result of F aculty T each Course) Id Lname Off Bldg Phone Salary Numb Dept Lvl MaxSz 20000 Cotts
More informationCISC 3140 (CIS 20.2) Design & Implementation of Software Application II
CISC 3140 (CIS 20.2) Design & Implementation of Software Application II Instructor : M. Meyer Email Address: meyer@sci.brooklyn.cuny.edu Course Page: http://www.sci.brooklyn.cuny.edu/~meyer/ CISC3140-Meyer-lec4
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
CHAPTER 14 Basics of Functional Dependencies and Normalization for Relational Databases Slide 14-2 Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1 Semantics of the Relation Attributes
More informationDesign Theory for Relational Databases
By Marina Barsky Design Theory for Relational Databases Lecture 15 Functional dependencies: formal definition X Y is an assertion about a relation R that whenever two tuples of R agree on all the attributes
More informationLectures 12: Design Theory I. 1. Normal forms & functional dependencies 2/19/2018. Today s Lecture. What you will learn about in this section
Today s Lecture Lectures 12: Design Theory I Professor Xiannong Meng Spring 2018 Lecture and activity contents are based on what Prof Chris Ré used in his CS 145 in the fall 2016 term with permission 1.
More informationThe data structures of the relational model Attributes and domains Relation schemas and database schemas
The data structures of the relational model Attributes and domains Relation schemas and database schemas databases First normal form (1NF) Running Example Pubs-Drinkers-DB: Pubs (name, location) Drinkers
More informationChapter 3. The Relational database design
Chapter 3 The Relational database design Chapter 3 - Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations and relations in the relational
More informationRelational Model History. COSC 416 NoSQL Databases. Relational Model (Review) Relation Example. Relational Model Definitions. Relational Integrity
COSC 416 NoSQL Databases Relational Model (Review) Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Relational Model History The relational model was proposed by E. F. Codd
More information8) A top-to-bottom relationship among the items in a database is established by a
MULTIPLE CHOICE QUESTIONS IN DBMS (unit-1 to unit-4) 1) ER model is used in phase a) conceptual database b) schema refinement c) physical refinement d) applications and security 2) The ER model is relevant
More informationDatabase Constraints and Design
Database Constraints and Design We know that databases are often required to satisfy some integrity constraints. The most common ones are functional and inclusion dependencies. We ll study properties of
More informationDatabase Languages. A DBMS provides two types of languages: Language for accessing & manipulating the data. Language for defining a database schema
SQL 1 Database Languages A DBMS provides two types of languages: DDL Data Definition Language Language for defining a database schema DML Data Manipulation Language Language for accessing & manipulating
More informationSchema Normalization. 30 th August Submitted By: Saurabh Singla Rahul Bhatnagar
Schema Normalization 30 th August 2011 Submitted By: Saurabh Singla 09010146 Rahul Bhatnagar 09010136 Normalization Consider the following ER diagram with some FD: Instructor iid A Student sid Department
More informationPart 7: Relational Normal Forms
7. Relational Normal Forms 7-1 Part 7: Relational Normal Forms References: Elmasri/Navathe: Fundamentals of Database Systems, 3rd Ed., Ch. 14, Functional Dependencies and Normalization for Relational Databases
More informationData about data is database Select correct option: True False Partially True None of the Above
Within a table, each primary key value. is a minimal super key is always the first field in each table must be numeric must be unique Foreign Key is A field in a table that matches a key field in another
More informationDatabase Management System
Database Management System Lecture 4 Database Design Normalization and View * Some materials adapted from R. Ramakrishnan, J. Gehrke and Shawn Bowers Today s Agenda Normalization View Database Management
More informationRunning Example Tables name location
Running Example Pubs-Drinkers-DB: The data structures of the relational model Attributes and domains Relation schemas and database schemas databases Pubs (name, location) Drinkers (name, location) Sells
More information5 Normalization:Quality of relational designs
5 Normalization:Quality of relational designs 5.1 Functional Dependencies 5.1.1 Design quality 5.1.2 Update anomalies 5.1.3 Functional Dependencies: definition 5.1.4 Properties of Functional Dependencies
More informationDatabases. Jörg Endrullis. VU University Amsterdam
Databases Jörg Endrullis VU University Amsterdam The Relational Model Overview 1. Relational Model Concepts: Schema, State 2. Null Values 3. Constraints: General Remarks 4. Key Constraints 5. Foreign Key
More informationSteps in normalisation. Steps in normalisation 7/15/2014
Introduction to normalisation Normalisation Normalisation = a formal process for deciding which attributes should be grouped together in a relation Normalisation is the process of decomposing relations
More informationReview: Attribute closure
CS445 - Introduction to Database Management Systems Fall Semester 2015 LECTURE 10 Functional Dependencies, Normalization Part II TEXTBOOK REFERENCE: CHAPTER 19 CS445 DATABASES: LECTURE 10 1 Review: Attribute
More informationNormal Forms. Winter Lecture 19
Normal Forms Winter 2006-2007 Lecture 19 Equivalent Schemas Many schemas can represent a set of data Which one is best? What does best even mean? Main goals: Representation must be complete Data should
More informationChapter 14. Chapter 14 - Objectives. Purpose of Normalization. Purpose of Normalization
Chapter 14 - Objectives Chapter 14 Normalization The purpose of normalization. How normalization can be used when designing a relational database. The potential problems associated with redundant data
More informationBirkbeck. (University of London) BSc/FD EXAMINATION. Department of Computer Science and Information Systems. Database Management (COIY028H6)
Birkbeck (University of London) BSc/FD EXAMINATION Department of Computer Science and Information Systems Database Management (COIY028H6) CREDIT VALUE: 15 credits Date of examination: Monday 9th June 2014
More informationCSCI 403: Databases 13 - Functional Dependencies and Normalization
CSCI 403: Databases 13 - Functional Dependencies and Normalization Introduction The point of this lecture material is to discuss some objective measures of the goodness of a database schema. The method
More informationTechno India Batanagar Computer Science and Engineering. Model Questions. Subject Name: Database Management System Subject Code: CS 601
Techno India Batanagar Computer Science and Engineering Model Questions Subject Name: Database Management System Subject Code: CS 601 Multiple Choice Type Questions 1. Data structure or the data stored
More informationLecture 11 - Chapter 8 Relational Database Design Part 1
CMSC 461, Database Management Systems Spring 2018 Lecture 11 - Chapter 8 Relational Database Design Part 1 These slides are based on Database System Concepts 6th edition book and are a modified version
More informationThe Relational Model Constraints and SQL DDL
The Relational Model Constraints and SQL DDL Week 2-3 Weeks 2-3 MIE253-Consens 1 Schedule Week Date Lecture Topic 1 Jan 9 Introduction to Data Management 2 Jan 16 The Relational Model 3 Jan. 23 Constraints
More informationChapter 14 Outline. Normalization for Relational Databases: Outline. Chapter 14: Basics of Functional Dependencies and
Ramez Elmasri, Shamkant B. Navathe(2016) Fundamentals of Database Systems (7th Edition), pearson, isbn 10: 0-13-397077-9;isbn-13:978-0-13-397077-7. Chapter 14: Basics of Functional Dependencies and Normalization
More informationMIDTERM EXAMINATION Spring 2010 CS403- Database Management Systems (Session - 4) Ref No: Time: 60 min Marks: 38
Student Info StudentID: Center: ExamDate: MIDTERM EXAMINATION Spring 2010 CS403- Database Management Systems (Session - 4) Ref No: 1356458 Time: 60 min Marks: 38 BC080402322 OPKST 5/28/2010 12:00:00 AM
More informationFunctional Dependencies CS 1270
Functional Dependencies CS 1270 Constraints We use constraints to enforce semantic requirements on a DBMS Predicates that the DBMS must ensure to be always true. Predicates are checked when the DBMS chooses
More informationRelational Database Design Theory. Introduction to Databases CompSci 316 Fall 2017
Relational Database Design Theory Introduction to Databases CompSci 316 Fall 2017 2 Announcements (Thu. Sep. 14) Homework #1 due next Tuesday (11:59pm) Course project description posted Read it! Mixer
More informationThe Relational Model
The Relational Model What is the Relational Model Relations Domain Constraints SQL Integrity Constraints Translating an ER diagram to the Relational Model and SQL Views A relational database consists
More informationHomework 6: FDs, NFs and XML (due April 13 th, 2016, 4:00pm, hard-copy in-class please)
Virginia Tech. Computer Science CS 4604 Introduction to DBMS Spring 2016, Prakash Homework 6: FDs, NFs and XML (due April 13 th, 2016, 4:00pm, hard-copy in-class please) Reminders: a. Out of 100 points.
More informationChapter 8: Relational Database Design
Chapter 8: Relational Database Design Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 8: Relational Database Design Features of Good Relational Design Atomic Domains
More informationElmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 10-2
Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 10-2 Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant
More information