Jordan University of Science & Technology Computer Science Department CS 728: Advanced Database Systems Midterm Exam First 2009/2010

Size: px
Start display at page:

Download "Jordan University of Science & Technology Computer Science Department CS 728: Advanced Database Systems Midterm Exam First 2009/2010"

Transcription

1 Jordan University of Science & Technology Computer Science Department CS 728: Advanced Database Systems Midterm Exam First 2009/2010 Student Name: ID: Part 1: Multiple-Choice Questions (17 questions, 1 point each) 1. Select the TRUE statement concerning normalization. a. Performance is increased. b. Data consistency is improved. c. Redundancy is increased. d. The number of tables is reduced. e. Functional dependencies increase. 2. A lack of normalization can lead to which one of the following problems: a. Deadlock b. Lost Updates c. Insertion problems d. Deferred updates e. Deletion of data 3. Each of the following is an argument which might be used to support the use of relations which are not fully normalized. Select the weakest argument. a. A fully normalized database may have too many tables b. Full normalization may compromise existing applications/systems c. Full normalization may make some queries too complicated d. A fully normalised database may result in tables which are too large e. A fully normalized database may perform too slowly 4. If a non-key attribute of a table can be null, that table automatically violates which normal form (choose the lowest one): NONE 1NF 2NF 3NF BCNF 4NF 5NF 5. If an attribute of a table can have multiple values, that table automatically violates which normal form (choose the lowest one): NONE 1NF 2NF 3NF BCNF 4NF 5NF 6. Given the following relation and dependences, state which normal form the relation is in. R(p,q,r,s,t) p,q -> r,s,t r,s -> p,q,t t -> s a. 1NF b. 2NF c. 3NF d. BCNF e. Unnormalized

2 7. Which of the following is the highest normal form by which the R relation can be classified? R(patient, consultant, hospital, address, date, time) Given patient, consultant -> hospital, address, date, time hospital -> address a. 1NF b. Unnormalised c. 2NF d. BCNF e. 3NF 8. Assume the relation R(A, B, C,D, E) is in at least 3NF. Which of the following functional dependencies must be FALSE? a. A, B -> C b. A, C -> E c. A, B -> D d. C, D -> E e. None of the above 9. Consider the relational schema R(A,B,C,D,E) with non-key functional dependencies C,D -> E and B -> C. Select the strongest statement that can be made about the schema R a. R is in third normal form b. R is in second normal form c. R is in BCNF normal form d. R is in first normal form e. None of the above 10. Consider the following functional dependencies: a, b -> c, d e -> c b -> e, f Given the same functional dependencies as shown above, which option shows the relations normalized to 3NF of: R(a, b, c, d, e, f) a. R(a,b,c,d,e,f) R(e,c) R(b,e,f) b. R(a,b,c,d) R(c,e) R(e,f,b) c. R(a,b,c,d) R(c,e) R(b,e,f) d. R(a,b,d) R(e,c) R(b,e,f) e. R(a,b,c,d,e,f)

3 11. Given the following relation and dependencies, select the option that is the result of fully normalizing the relation to BCNF. R(a,b,c,d,e) a -> c d -> c,e a. R1(a,c) R2(d,e) R(a,b,d) b. R1(a,c) R2(d,c,e) R(a,b,d) c. R1(d,c,e) R(a,b,d) d. R(a,b,c,d,e) e. None of the above 12. If a relation schema contains two different multi-valued dependencies, that table automatically violates which normal form (choose the lowest one): NONE 1NF 2NF 3NF BCNF 4NF 5NF 13. In spatial databases, what does MBR refer to? a. Minimum Box Rectangle b. Minimum Box Region c. Minimum Bounding Region d. Minimum Bounding Rectangle e. Minimum Bounding Box 14. The two steps (in order) that are performed when answering a spatial query using MBR are a. filtering and refinement steps b. refinement and filtering steps c. filtering and screening steps b. screening and filtering steps 15. The first step(s) in the knowledge discovery process is/are a. data selection b. visualization c. data mining d. data transformation e. data cleaning and integration 16. The measure of interestingness used by association rule mining that is based on how frequently an itemset appears in data is called a. correlation b. confidence c. support d. importance e. none of the above 17. Association rule mining is an example of a. Descriptive data mining b. Unsupervised learning c. Predictive data mining d. Learning by example e. NOA

4 1. Part 2: Essay Questions (83 points all) a. Is the following decomposition of Book lossless? Why or why not? 4 R1(A, T, P), R2(I, P, Y ), R3(I, T) I A T P Y R 1 b 11 b 12 b 13 b 14 b 15 R 2 b 21 b 22 b 23 b 24 b 25 R 3 b 31 b 32 b 33 b 34 b 35 TP I AP T I ATP TP I AP T I ATP I A T P Y R 1 b 11 a 2 a 3 a 4 b 15 R 2 a 1 b 22 b 23 a 4 a 5 R 3 a 1 b 32 a 3 b 34 b 35 No changes to table S No changes to table S Table S is changed to I A T P Y R 1 b 11 a 2 a 3 a 4 b 15 R 2 a 1 b 22 a 3 a 4 a 5 R 3 a 1 b 22 a 3 a 4 b 35 Table S is changed to I A T P Y R 1 a 1 a 2 a 3 a 4 b 15 R 2 a 1 b 22 a 3 a 4 a 5 R 3 a 1 b 22 a 3 a 4 b 35 No changes to table S Table S is changed to I A T P Y R 1 a 1 a 2 a 3 a 4 b 15 R 2 a 1 a 2 a 3 a 4 a 5 R 3 a 1 a 2 a 3 a 4 b 35 Since row 2 is all "a" symbols, then the decomposition is lossless.

5 b. Does the decomposition in a preserve all functional dependencies in F +? If so, simply state Yes. If not, give a functional dependency that is not preserved. 4 No, because TP I is not preserved. Here is why. Restrictions of F + to each relation in the decomposition: R 1 = ATP: {AP T; TP A} R 2 = IPY: {I P} R 3 = IT: {I T} Testing FD preservation: test each FD in F to see if it is implied by the restricted FDs above. TP I: (TP) + = TPA so TP I is not preserved. AP T: (AP) + = APT so AP T is preserved. I ATP: I + = IATP so I ATP is preserved. Another justification: F + = {TP I, TP A, AP T, I A, I T, I P} (π R1 (F) π R2 (F) π R3 (F)) + = (AP T, TP A, I P, I T) + {AP T, TP A, I P, I T, I A} F + c. Consider replacing F by an alternative set of functional dependencies G: 4 AP-> IT I -> ATP Is the effect of G the same as the effect of F? In other words, does G + = F +? Why or why not? Under these FDs (G), we have TP + = TP, so TP I is not implied, hence G + F +. (TP) + (AP) + I + Under F = TPIA = APIT = IATP (TP) + (AP) + I + Under G = TP = APIT = IATP 2.

6 a. Consider the following database instance D 1 of R: 4 Is D 1 consistent with the dependencies specified above? Why or why not? No, because the instant D 1 violates (does not preserve) the dependency S D. We have Novell (S) paying dividends (D) $0.05 and $0.10. b. Give a lossless decomposition of R into Boyce-Codd Normal Form. 4 The Key of R is IS, since (IS) + = R. F + = F {I O} Solution I: 1. Decompose R by I B into R 1 = IB and R 2 = IOSQD. 2. R 1 is in BCNF. 3. Decompose R 2 by S D into R 3 = SD and R 4 = IOSQ. 4. R 3 is in BCNF. 5. Decompose R 4 by I O into R 5 = IO and R 6 = ISQ. 6. R 5 is in BCNF. 7. R 6 is in BCNF. Solution II: {BO, IB, SD, ISQ}, which does preserve functional dependencies. c. Does your answer to Question b preserve all given and implied functional dependencies? If No, state which dependencies that are not preserved. 4 Solution I: does not preserve FD B O Solution II: does preserve all FDs 3. Consider the following function dependencies for a relation R(X, Y, Z, W): 4 WX -> Y X -> Z Z -> WY Give a derivation of X -> Y from the given functional dependencies above. Justify your steps with Armstrong s axioms. Z -> WY Z -> Y X -> Z X -> Y

7 4. Consider a relation R(A, B, C, D, E, F, G, H) with Functional Dependencies 21 AB E C D F GH B F (a) Consider R 1 (A, B, C, D) with the above functional dependencies. What would be a candidate key for R 1? Solution I: A + = A Not a key B + = B Not a key C + = CD Not a key (AB) + = AB Not a key (ABC) + = ABCD = R 1 is a key Solution II: Assum that the key K is ABCD K - D ABCD = R 1 K - DC AB R 1 K - DA BCD R 1 (b) (c) (d) K - DB ACD R 1 So the key is K D = ABC Is R 1 (A, B, C, D) in second normal form? If not, say why. No, because of C D (partial dependency), D is not fully dependent on the key ABC. Is R 1 (A, B, C, D) and R 2 (A, B, E) a lossless join decomposition of R (A, B, C, D, E)? Explain why or why not. Since the decomposition is binary, we can test the lossless property using the following rules: If R 1 R 2 R 1 - R 2 or R 2 - R 1 then it is lossless. Since R 1 R 2 = AB, R 2 - R 1 = E, and AB E, then decomposition is lossless. Is R 1 (A, B, C, D), R 2 (A, B, E), R 3 (F, G, H) and R 4 (B, F) a dependency preserving decomposition? Explain why or why not. Yes. AB E is covered by R 2

8 C D is covered by R 1 F GH is covered by R 3 B F is covered by R 4 Another justification: F + = {AB E, C D, F GH, B FGH} (π R1 (F) π R2 (F) π R3 (F) π R4 (F)) + = (C D, AB E, F GH, B F) + (e) {AB E, C D, F GH, B FGH} = F + Now start with these functional dependencies: AB E C D F GH FG GH B FG Find a minimal covering of these functional dependencies. Then use it to synthesize a set of dependency preserving, 3NF relations with a lossless join. I.e. use algorithm 11.4 from the text book. Minimal Covering: Step 1. Write the FDs with singleton RHSs AB E C D F G FG G F H FG H B F B G Step 2. Remove redundant LHS attributes. FG G becomes F G FG H becomes F H Step 3. Remove redundant FDs Remove one copy of F G Remove one copy of F H Also remove B G The minimal covering is {AB E, C D, F G, F H, B F} Now on to the 3NF algorithm: Step 1 is done. Step 2, write down relations: R1(A, B, E), R2(C, D), R3(F, G, H) and R4(B, F) Step 3, no relation is a key for the whole thing. Add another relation R5(A, B, C)

9 5. List three spatial data types. 3 a. point b. line c. region 6. What are the three spatial operators? Give an example of each operator. 6 a. Topological operators: Overlap b. Direction operators: North c. Distance operators: Near 7. List two types of spatial queries. Give an example of each one. 4 a. Spatial Range Queries Find all cities within 50 miles of Madison Find me buildings that are adjacent to the Railway Stations? b. Nearest-Neighbor Queries Find the 10 cities nearest to Madison Find me the nearest fire station to Clementi Ave. 3? c. Window Range Query Find me data points that satisfy the conditions x1 < A1 < x2, y1 <A2 <y2? d. Spatial Join Queries: Find all cities near a lake 8. Any member of R-Tree family has a set of characteristics. List 3 of these characteristics. 3 it is a height-balanced tree structure it is based on MBR approximation of spatial objects it guarantees that the storage utilization is at least 50% it takes paging into account

10 9. Draw the R-tree for the following set of rectangles. 3 B 1 E 4 2 F G H 9 C A: B C B: E F C: G H E F G H 7 8 9

11 10. Consider the following set of spatial objects and the corresponding R-tee. How many pages (nodes, I/O) are read in order to search for object #5? 3 1 a 6 b c d x f 14 y e g x y a b c d e f g 1,2,3 6,7 4,5 8,9 10, 11 12, 13, 14 15, 16 4 pages 11. What is the main difference between classification and clustering? 3 Clustering (Unsupervised learning) vs. Classification (Supervised learning) No prior knowledge (Number of clusters, Meaning of clusters) 12. List three factors that affect classification based on decision trees. 3 Choosing Splitting Attributes Ordering of Splitting Attributes Splits Predicates Tree Structure Stopping Criteria Training Data 13. List three methods used to represent the distance between clusters 3 Single/Complete/Average Link Centroid Medoid 14. Consider the following set of transactions. What is the support of PeanutButter & Jelly? 3 1/5 = 20%

Databases -Normalization III. (N Spadaccini 2010 and W Liu 2012) Databases - Normalization III 1 / 31

Databases -Normalization III. (N Spadaccini 2010 and W Liu 2012) Databases - Normalization III 1 / 31 Databases -Normalization III (N Spadaccini 2010 and W Liu 2012) Databases - Normalization III 1 / 31 This lecture This lecture describes 3rd normal form. (N Spadaccini 2010 and W Liu 2012) Databases -

More information

Lecture Notes on Database Normalization

Lecture Notes on Database Normalization Lecture Notes on Database Normalization Chengkai Li Department of Computer Science and Engineering The University of Texas at Arlington April 15, 2012 I decided to write this document, because many students

More information

Database Design and Normalization

Database Design and Normalization Database Design and Normalization Chapter 10 (Week 11) EE562 Slides and Modified Slides from Database Management Systems, R. Ramakrishnan 1 Computing Closure F + Example: List all FDs with: - a single

More information

Design of Relational Database Schemas

Design of Relational Database Schemas Design of Relational Database Schemas T. M. Murali October 27, November 1, 2010 Plan Till Thanksgiving What are the typical problems or anomalies in relational designs? Introduce the idea of decomposing

More information

Relational Database Design

Relational Database Design Relational Database Design To generate a set of relation schemas that allows - to store information without unnecessary redundancy - to retrieve desired information easily Approach - design schema in appropriate

More information

Database Design and Normalization

Database Design and Normalization Database Design and Normalization CPS352: Database Systems Simon Miner Gordon College Last Revised: 9/27/12 Agenda Check-in Functional Dependencies (continued) Design Project E-R Diagram Presentations

More information

Database Management Systems. Redundancy and Other Problems. Redundancy

Database Management Systems. Redundancy and Other Problems. Redundancy Database Management Systems Winter 2004 CMPUT 391: Database Design Theory or Relational Normalization Theory Dr. Osmar R. Zaïane Lecture 2 Limitations of Relational Database Designs Provides a set of guidelines,

More information

Theory behind Normalization & DB Design. Satisfiability: Does an FD hold? Lecture 12

Theory behind Normalization & DB Design. Satisfiability: Does an FD hold? Lecture 12 Theory behind Normalization & DB Design Lecture 12 Satisfiability: Does an FD hold? Satisfiability of FDs Given: FD X Y and relation R Output: Does R satisfy X Y? Algorithm: a.sort R on X b.do all the

More information

COSC344 Database Theory and Applications. Lecture 9 Normalisation. COSC344 Lecture 9 1

COSC344 Database Theory and Applications. Lecture 9 Normalisation. COSC344 Lecture 9 1 COSC344 Database Theory and Applications Lecture 9 Normalisation COSC344 Lecture 9 1 Overview Last Lecture Functional Dependencies This Lecture Normalisation Introduction 1NF 2NF 3NF BCNF Source: Section

More information

Schema Refinement and Normalization

Schema Refinement and Normalization Schema Refinement and Normalization Module 5, Lectures 3 and 4 Database Management Systems, R. Ramakrishnan 1 The Evils of Redundancy Redundancy is at the root of several problems associated with relational

More information

DATABASE NORMALIZATION

DATABASE NORMALIZATION DATABASE NORMALIZATION Normalization: process of efficiently organizing data in the DB. RELATIONS (attributes grouped together) Accurate representation of data, relationships and constraints. Goal: - Eliminate

More information

Carnegie Mellon Univ. Dept. of Computer Science 15-415 - Database Applications. Overview - detailed. Goal. Faloutsos CMU SCS 15-415

Carnegie Mellon Univ. Dept. of Computer Science 15-415 - Database Applications. Overview - detailed. Goal. Faloutsos CMU SCS 15-415 Faloutsos 15-415 Carnegie Mellon Univ. Dept. of Computer Science 15-415 - Database Applications Lecture #17: Schema Refinement & Normalization - Normal Forms (R&G, ch. 19) Overview - detailed DB design

More information

Limitations of E-R Designs. Relational Normalization Theory. Redundancy and Other Problems. Redundancy. Anomalies. Example

Limitations of E-R Designs. Relational Normalization Theory. Redundancy and Other Problems. Redundancy. Anomalies. Example Limitations of E-R Designs Relational Normalization Theory Chapter 6 Provides a set of guidelines, does not result in a unique database schema Does not provide a way of evaluating alternative schemas Normalization

More information

Schema Design and Normal Forms Sid Name Level Rating Wage Hours

Schema Design and Normal Forms Sid Name Level Rating Wage Hours Entity-Relationship Diagram Schema Design and Sid Name Level Rating Wage Hours Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke 1 Database Management Systems, 2 nd Edition. R. Ramakrishnan

More information

Normalisation to 3NF. Database Systems Lecture 11 Natasha Alechina

Normalisation to 3NF. Database Systems Lecture 11 Natasha Alechina Normalisation to 3NF Database Systems Lecture 11 Natasha Alechina In This Lecture Normalisation to 3NF Data redundancy Functional dependencies Normal forms First, Second, and Third Normal Forms For more

More information

Week 11: Normal Forms. Logical Database Design. Normal Forms and Normalization. Examples of Redundancy

Week 11: Normal Forms. Logical Database Design. Normal Forms and Normalization. Examples of Redundancy Week 11: Normal Forms Database Design Database Redundancies and Anomalies Functional Dependencies Entailment, Closure and Equivalence Lossless Decompositions The Third Normal Form (3NF) The Boyce-Codd

More information

Quiz 3: Database Systems I Instructor: Hassan Khosravi Spring 2012 CMPT 354

Quiz 3: Database Systems I Instructor: Hassan Khosravi Spring 2012 CMPT 354 Quiz 3: Database Systems I Instructor: Hassan Khosravi Spring 2012 CMPT 354 1. [10] Show that each of the following are not valid rules about FD s by giving a small example relations that satisfy the given

More information

Relational Database Design Theory

Relational Database Design Theory Relational Database Design Theory Informal guidelines for good relational designs Functional dependencies Normal forms and normalization 1NF, 2NF, 3NF BCNF, 4NF, 5NF Inference rules on functional dependencies

More information

Relational Normalization Theory (supplemental material)

Relational Normalization Theory (supplemental material) Relational Normalization Theory (supplemental material) CSE 532, Theory of Database Systems Stony Brook University http://www.cs.stonybrook.edu/~cse532 2 Quiz 8 Consider a schema S with functional dependencies:

More information

Theory of Relational Database Design and Normalization

Theory of Relational Database Design and Normalization Theory of Relational Database Design and Normalization (Based on Chapter 14 and some part of Chapter 15 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 3) 1 Informal Design Guidelines for

More information

Chapter 10. Functional Dependencies and Normalization for Relational Databases

Chapter 10. Functional Dependencies and Normalization for Relational Databases Chapter 10 Functional Dependencies and Normalization for Relational Databases Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant

More information

DATABASE SYSTEMS. Chapter 7 Normalisation

DATABASE SYSTEMS. Chapter 7 Normalisation DATABASE SYSTEMS DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT Chapter 7 Normalisation 1 (Rob, Coronel & Crockett 978184480731) In this chapter, you will learn: What normalization

More information

Functional Dependencies and Normalization

Functional Dependencies and Normalization Functional Dependencies and Normalization 5DV119 Introduction to Database Management Umeå University Department of Computing Science Stephen J. Hegner hegner@cs.umu.se http://www.cs.umu.se/~hegner Functional

More information

RELATIONAL DATABASE DESIGN

RELATIONAL DATABASE DESIGN RELATIONAL DATABASE DESIGN g Good database design - Avoiding anomalies g Functional Dependencies g Normalization & Decomposition Using Functional Dependencies g 1NF - Atomic Domains and First Normal Form

More information

CSCI-GA.2433-001 Database Systems Lecture 7: Schema Refinement and Normalization

CSCI-GA.2433-001 Database Systems Lecture 7: Schema Refinement and Normalization CSCI-GA.2433-001 Database Systems Lecture 7: Schema Refinement and Normalization Mohamed Zahran (aka Z) mzahran@cs.nyu.edu http://www.mzahran.com View 1 View 2 View 3 Conceptual Schema At that point we

More information

CS143 Notes: Normalization Theory

CS143 Notes: Normalization Theory CS143 Notes: Normalization Theory Book Chapters (4th) Chapters 7.1-6, 7.8, 7.10 (5th) Chapters 7.1-6, 7.8 (6th) Chapters 8.1-6, 8.8 INTRODUCTION Main question How do we design good tables for a relational

More information

normalisation Goals: Suppose we have a db scheme: is it good? define precise notions of the qualities of a relational database scheme

normalisation Goals: Suppose we have a db scheme: is it good? define precise notions of the qualities of a relational database scheme Goals: Suppose we have a db scheme: is it good? Suppose we have a db scheme derived from an ER diagram: is it good? define precise notions of the qualities of a relational database scheme define algorithms

More information

Database Design and Normal Forms

Database Design and Normal Forms Database Design and Normal Forms Database Design coming up with a good schema is very important How do we characterize the goodness of a schema? If two or more alternative schemas are available how do

More information

Normalisation 1. Chapter 4.1 V4.0. Copyright @ Napier University

Normalisation 1. Chapter 4.1 V4.0. Copyright @ Napier University Normalisation 1 Chapter 4.1 V4.0 Copyright @ Napier University Normalisation Overview discuss entity integrity and referential integrity describe functional dependency normalise a relation to first formal

More information

Chapter 10. Functional Dependencies and Normalization for Relational Databases. Copyright 2007 Ramez Elmasri and Shamkant B.

Chapter 10. Functional Dependencies and Normalization for Relational Databases. Copyright 2007 Ramez Elmasri and Shamkant B. Chapter 10 Functional Dependencies and Normalization for Relational Databases Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Chapter Outline 1 Informal Design Guidelines for Relational Databases

More information

Chapter 7: Relational Database Design

Chapter 7: Relational Database Design Chapter 7: Relational Database Design Database System Concepts, 5th Ed. See www.db book.com for conditions on re use Chapter 7: Relational Database Design Features of Good Relational Design Atomic Domains

More information

Introduction Decomposition Simple Synthesis Bernstein Synthesis and Beyond. 6. Normalization. Stéphane Bressan. January 28, 2015

Introduction Decomposition Simple Synthesis Bernstein Synthesis and Beyond. 6. Normalization. Stéphane Bressan. January 28, 2015 6. Normalization Stéphane Bressan January 28, 2015 1 / 42 This lecture is based on material by Professor Ling Tok Wang. CS 4221: Database Design The Relational Model Ling Tok Wang National University of

More information

Unit 3.1. Normalisation 1 - V2.0 1. Normalisation 1. Dr Gordon Russell, Copyright @ Napier University

Unit 3.1. Normalisation 1 - V2.0 1. Normalisation 1. Dr Gordon Russell, Copyright @ Napier University Normalisation 1 Unit 3.1 Normalisation 1 - V2.0 1 Normalisation Overview discuss entity integrity and referential integrity describe functional dependency normalise a relation to first formal form (1NF)

More information

Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases

Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Outline Informal Design Guidelines

More information

Chapter 7: Relational Database Design

Chapter 7: Relational Database Design Chapter 7: Relational Database Design Pitfalls in Relational Database Design Decomposition Normalization Using Functional Dependencies Normalization Using Multivalued Dependencies Normalization Using Join

More information

Introduction to Database Systems. Normalization

Introduction to Database Systems. Normalization Introduction to Database Systems Normalization Werner Nutt 1 Normalization 1. Anomalies 1. Anomalies 2. Boyce-Codd Normal Form 3. 3 rd Normal Form 2 Anomalies The goal of relational schema design is to

More information

Functional Dependencies and Finding a Minimal Cover

Functional 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 information

Why Is This Important? Schema Refinement and Normal Forms. The Evils of Redundancy. Functional Dependencies (FDs) Example (Contd.)

Why Is This Important? Schema Refinement and Normal Forms. The Evils of Redundancy. Functional Dependencies (FDs) Example (Contd.) Why Is This Important? Schema Refinement and Normal Forms Chapter 19 Many ways to model a given scenario in a database How do we find the best one? We will discuss objective criteria for evaluating database

More information

Chapter 10 Functional Dependencies and Normalization for Relational Databases

Chapter 10 Functional Dependencies and Normalization for Relational Databases Chapter 10 Functional Dependencies and Normalization for Relational Databases Copyright 2004 Pearson Education, Inc. Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of

More information

Chapter 8. Database Design II: Relational Normalization Theory

Chapter 8. Database Design II: Relational Normalization Theory Chapter 8 Database Design II: Relational Normalization Theory The E-R approach is a good way to start dealing with the complexity of modeling a real-world enterprise. However, it is only a set of guidelines

More information

Functional Dependency and Normalization for Relational Databases

Functional Dependency and Normalization for Relational Databases Functional Dependency and Normalization for Relational Databases Introduction: Relational database design ultimately produces a set of relations. The implicit goals of the design activity are: information

More information

Relational Database Design: FD s & BCNF

Relational Database Design: FD s & BCNF CS145 Lecture Notes #5 Relational Database Design: FD s & BCNF Motivation Automatic translation from E/R or ODL may not produce the best relational design possible Sometimes database designers like to

More information

Schema Refinement, Functional Dependencies, Normalization

Schema Refinement, Functional Dependencies, Normalization Schema Refinement, Functional Dependencies, Normalization MSCI 346: Database Systems Güneş Aluç, University of Waterloo Spring 2015 MSCI 346: Database Systems Chapter 19 1 / 42 Outline 1 Introduction Design

More information

CS 377 Database Systems. Database Design Theory and Normalization. Li Xiong Department of Mathematics and Computer Science Emory University

CS 377 Database Systems. Database Design Theory and Normalization. Li Xiong Department of Mathematics and Computer Science Emory University CS 377 Database Systems Database Design Theory and Normalization Li Xiong Department of Mathematics and Computer Science Emory University 1 Relational database design So far Conceptual database design

More information

Normalization in Database Design

Normalization in Database Design in Database Design Marek Rychly mrychly@strathmore.edu Strathmore University, @ilabafrica & Brno University of Technology, Faculty of Information Technology Advanced Databases and Enterprise Systems 14

More information

Introduction to Databases, Fall 2005 IT University of Copenhagen. Lecture 5: Normalization II; Database design case studies. September 26, 2005

Introduction to Databases, Fall 2005 IT University of Copenhagen. Lecture 5: Normalization II; Database design case studies. September 26, 2005 Introduction to Databases, Fall 2005 IT University of Copenhagen Lecture 5: Normalization II; Database design case studies September 26, 2005 Lecturer: Rasmus Pagh Today s lecture Normalization II: 3rd

More information

Database Management System

Database Management System UNIT -6 Database Design Informal Design Guidelines for Relation Schemas; Functional Dependencies; Normal Forms Based on Primary Keys; General Definitions of Second and Third Normal Forms; Boyce-Codd Normal

More information

Objectives of Database Design Functional Dependencies 1st Normal Form Decomposition Boyce-Codd Normal Form 3rd Normal Form Multivalue Dependencies

Objectives of Database Design Functional Dependencies 1st Normal Form Decomposition Boyce-Codd Normal Form 3rd Normal Form Multivalue Dependencies Objectives of Database Design Functional Dependencies 1st Normal Form Decomposition Boyce-Codd Normal Form 3rd Normal Form Multivalue Dependencies 4th Normal Form General view over the design process 1

More information

Database Sample Examination

Database Sample Examination Part 1: SQL Database Sample Examination (Spring 2007) Question 1: Draw a simple ER diagram that results in a primary key/foreign key constraint to be created between the tables: CREATE TABLE Salespersons

More information

Graham Kemp (telephone 772 54 11, room 6475 EDIT) The examiner will visit the exam room at 15:00 and 17:00.

Graham Kemp (telephone 772 54 11, room 6475 EDIT) The examiner will visit the exam room at 15:00 and 17:00. CHALMERS UNIVERSITY OF TECHNOLOGY Department of Computer Science and Engineering Examination in Databases, TDA357/DIT620 Tuesday 17 December 2013, 14:00-18:00 Examiner: Results: Exam review: Grades: Graham

More information

Database Constraints and Design

Database 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 information

Chapter 6. Database Tables & Normalization. The Need for Normalization. Database Tables & Normalization

Chapter 6. Database Tables & Normalization. The Need for Normalization. Database Tables & Normalization Chapter 6 Database Tables & Normalization Objectives: to learn What normalization is and what role it plays in the database design process About the normal forms 1NF, 2NF, 3NF, BCNF, and 4NF How normal

More information

Normalization of Database

Normalization of Database Normalization of Database UNIT-4 Database Normalisation is a technique of organizing the data in the database. Normalization is a systematic approach of decomposing tables to eliminate data redundancy

More information

Theory of Relational Database Design and Normalization

Theory of Relational Database Design and Normalization Theory of Relational Database Design and Normalization (Based on Chapter 14 and some part of Chapter 15 in Fundamentals of Database Systems by Elmasri and Navathe) 1 Informal Design Guidelines for Relational

More information

Limitations of DB Design Processes

Limitations of DB Design Processes Normalization CS 317/387 1 Limitations of DB Design Processes Provides a set of guidelines, does not result in a unique database schema Does not provide a way of evaluating alternative schemas Pitfalls:

More information

Design Theory for Relational Databases: Functional Dependencies and Normalization

Design Theory for Relational Databases: Functional Dependencies and Normalization Design Theory for Relational Databases: Functional Dependencies and Normalization Juliana Freire Some slides adapted from L. Delcambre, R. Ramakrishnan, G. Lindstrom, J. Ullman and Silberschatz, Korth

More information

Announcements. SQL is hot! Facebook. Goal. Database Design Process. IT420: Database Management and Organization. Normalization (Chapter 3)

Announcements. SQL is hot! Facebook. Goal. Database Design Process. IT420: Database Management and Organization. Normalization (Chapter 3) Announcements IT0: Database Management and Organization Normalization (Chapter 3) Department coin design contest deadline - February -week exam Monday, February 1 Lab SQL SQL Server: ALTER TABLE tname

More information

Normal forms and normalization

Normal forms and normalization Normal forms and normalization An example of normalization using normal forms We assume we have an enterprise that buys products from different supplying companies, and we would like to keep track of our

More information

How To Find Out What A Key Is In A Database Engine

How To Find Out What A Key Is In A Database Engine Database design theory, Part I Functional dependencies Introduction As we saw in the last segment, designing a good database is a non trivial matter. The E/R model gives a useful rapid prototyping tool,

More information

Data Mining: Partially from: Introduction to Data Mining by Tan, Steinbach, Kumar

Data Mining: Partially from: Introduction to Data Mining by Tan, Steinbach, Kumar Data Mining: Association Analysis Partially from: Introduction to Data Mining by Tan, Steinbach, Kumar Association Rule Mining Given a set of transactions, find rules that will predict the occurrence of

More information

BCA. Database Management System

BCA. Database Management System BCA IV Sem Database Management System Multiple choice questions 1. A Database Management System (DBMS) is A. Collection of interrelated data B. Collection of programs to access data C. Collection of data

More information

DBMS. Normalization. Module Title?

DBMS. Normalization. Module Title? Normalization Database Normalization Database normalization is the process of removing redundant data from your tables in to improve storage efficiency, data integrity (accuracy and consistency), and scalability

More information

Normalisation. Why normalise? To improve (simplify) database design in order to. Avoid update problems Avoid redundancy Simplify update operations

Normalisation. Why normalise? To improve (simplify) database design in order to. Avoid update problems Avoid redundancy Simplify update operations Normalisation Why normalise? To improve (simplify) database design in order to Avoid update problems Avoid redundancy Simplify update operations 1 Example ( the practical difference between a first normal

More information

Introduction to normalization. Introduction to normalization

Introduction to normalization. Introduction to normalization Introduction to normalization Lecture 4 Instructor Anna Sidorova Agenda Presentation Review of relational models, in class exersise Introduction to normalization In-class exercises Discussion of HW2 1

More information

An Algorithmic Approach to Database Normalization

An Algorithmic Approach to Database Normalization An Algorithmic Approach to Database Normalization M. Demba College of Computer Science and Information Aljouf University, Kingdom of Saudi Arabia bah.demba@ju.edu.sa ABSTRACT When an attempt is made to

More information

LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen 2007-05-24

LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen 2007-05-24 LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen 2007-05-24 1. A database schema is a. the state of the db b. a description of the db using a

More information

Part I: Entity Relationship Diagrams and SQL (40/100 Pt.)

Part I: Entity Relationship Diagrams and SQL (40/100 Pt.) Part I: Entity Relationship Diagrams and SQL (40/100 Pt.) Q.1.1) Translate the following E-R Schema to SQL-DDL tables using the CREATE Table Statement and check constraints, if needed: LatinName EnglishName

More information

Normalization. CIS 331: Introduction to Database Systems

Normalization. CIS 331: Introduction to Database Systems Normalization CIS 331: Introduction to Database Systems Normalization: Reminder Why do we need to normalize? To avoid redundancy (less storage space needed, and data is consistent) To avoid update/delete

More information

Normalization in OODB Design

Normalization in OODB Design Normalization in OODB Design Byung S. Lee Graduate Programs in Software University of St. Thomas St. Paul, Minnesota bslee@stthomas.edu Abstract When we design an object-oriented database schema, we need

More information

6.830 Lecture 3 9.16.2015 PS1 Due Next Time (Tuesday!) Lab 1 Out today start early! Relational Model Continued, and Schema Design and Normalization

6.830 Lecture 3 9.16.2015 PS1 Due Next Time (Tuesday!) Lab 1 Out today start early! Relational Model Continued, and Schema Design and Normalization 6.830 Lecture 3 9.16.2015 PS1 Due Next Time (Tuesday!) Lab 1 Out today start early! Relational Model Continued, and Schema Design and Normalization Animals(name,age,species,cageno,keptby,feedtime) Keeper(id,name)

More information

CHAPTER-24 Mining Spatial Databases

CHAPTER-24 Mining Spatial Databases CHAPTER-24 Mining Spatial Databases 24.1 Introduction 24.2 Spatial Data Cube Construction and Spatial OLAP 24.3 Spatial Association Analysis 24.4 Spatial Clustering Methods 24.5 Spatial Classification

More information

A. TRUE-FALSE: GROUP 2 PRACTICE EXAMPLES FOR THE REVIEW QUIZ:

A. TRUE-FALSE: GROUP 2 PRACTICE EXAMPLES FOR THE REVIEW QUIZ: GROUP 2 PRACTICE EXAMPLES FOR THE REVIEW QUIZ: Review Quiz will contain very similar question as below. Some questions may even be repeated. The order of the questions are random and are not in order of

More information

R-trees. R-Trees: A Dynamic Index Structure For Spatial Searching. R-Tree. Invariants

R-trees. R-Trees: A Dynamic Index Structure For Spatial Searching. R-Tree. Invariants R-Trees: A Dynamic Index Structure For Spatial Searching A. Guttman R-trees Generalization of B+-trees to higher dimensions Disk-based index structure Occupancy guarantee Multiple search paths Insertions

More information

C# Cname Ccity.. P1# Date1 Qnt1 P2# Date2 P9# Date9 1 Codd London.. 1 21.01 20 2 23.01 2 Martin Paris.. 1 26.10 25 3 Deen London.. 2 29.

C# Cname Ccity.. P1# Date1 Qnt1 P2# Date2 P9# Date9 1 Codd London.. 1 21.01 20 2 23.01 2 Martin Paris.. 1 26.10 25 3 Deen London.. 2 29. 4. Normalisation 4.1 Introduction Suppose we are now given the task of designing and creating a database. How do we produce a good design? What relations should we have in the database? What attributes

More information

Functional Dependencies

Functional Dependencies BCNF and 3NF Functional Dependencies Functional dependencies: modeling constraints on attributes stud-id name address course-id session-id classroom instructor Functional dependencies should be obtained

More information

Normalisation and Data Storage Devices

Normalisation and Data Storage Devices Unit 4 Normalisation and Data Storage Devices Structure 4.1 Introduction 4.2 Functional Dependency 4.3 Normalisation 4.3.1 Why do we Normalize a Relation? 4.3.2 Second Normal Form Relation 4.3.3 Third

More information

Chapter 5: FUNCTIONAL DEPENDENCIES AND NORMALIZATION FOR RELATIONAL DATABASES

Chapter 5: FUNCTIONAL DEPENDENCIES AND NORMALIZATION FOR RELATIONAL DATABASES 1 Chapter 5: FUNCTIONAL DEPENDENCIES AND NORMALIZATION FOR RELATIONAL DATABASES INFORMAL DESIGN GUIDELINES FOR RELATION SCHEMAS We discuss four informal measures of quality for relation schema design in

More information

DATABASE DESIGN: NORMALIZATION NOTE & EXERCISES (Up to 3NF)

DATABASE DESIGN: NORMALIZATION NOTE & EXERCISES (Up to 3NF) DATABASE DESIGN: NORMALIZATION NOTE & EXERCISES (Up to 3NF) Tables that contain redundant data can suffer from update anomalies, which can introduce inconsistencies into a database. The rules associated

More information

Normalization. Normalization. Normalization. Data Redundancy

Normalization. Normalization. Normalization. Data Redundancy Normalization Normalization o Main objective in developing a logical data model for relational database systems is to create an accurate representation of the data, its relationships, and constraints.

More information

MCQs~Databases~Relational Model and Normalization http://en.wikipedia.org/wiki/database_normalization

MCQs~Databases~Relational Model and Normalization http://en.wikipedia.org/wiki/database_normalization http://en.wikipedia.org/wiki/database_normalization Database normalization is the process of organizing the fields and tables of a relational database to minimize redundancy. Normalization usually involves

More information

Topic 5.1: Database Tables and Normalization

Topic 5.1: Database Tables and Normalization Topic 5.1: Database Tables and Normalization What is Normalization? Normalization is a process for evaluating and correcting table structures to minimize data redundancies, thereby helping to eliminate

More information

Chapter 5: Logical Database Design and the Relational Model Part 2: Normalization. Introduction to Normalization. Normal Forms.

Chapter 5: Logical Database Design and the Relational Model Part 2: Normalization. Introduction to Normalization. Normal Forms. Chapter 5: Logical Database Design and the Relational Model Part 2: Normalization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden Robert C. Nickerson ISYS

More information

TYPICAL QUESTIONS & ANSWERS

TYPICAL QUESTIONS & ANSWERS TYPICAL QUESTIONS & ANSWERS PART -I OBJECTIVE TYPE QUESTIONS Each Question carries 2 marks. Choosethe correct or the best alternative in the following: Q.1 Which of the following relational algebra operations

More information

Boyce-Codd Normal Form

Boyce-Codd Normal Form 4NF Boyce-Codd Normal Form A relation schema R is in BCNF if for all functional dependencies in F + of the form α β at least one of the following holds α β is trivial (i.e., β α) α is a superkey for R

More information

CIS 631 Database Management Systems Sample Final Exam

CIS 631 Database Management Systems Sample Final Exam CIS 631 Database Management Systems Sample Final Exam 1. (25 points) Match the items from the left column with those in the right and place the letters in the empty slots. k 1. Single-level index files

More information

DATABASE DESIGN: Normalization Exercises & Answers

DATABASE DESIGN: Normalization Exercises & Answers DATABASE DESIGN: Normalization Exercises & Answers (a) The table shown in Figure 1 is susceptible to update anomalies. Provide examples of insertion, deletion, and modification anomalies. Answers: This

More information

Lecture 2 Normalization

Lecture 2 Normalization MIT 533 ระบบฐานข อม ล 2 Lecture 2 Normalization Walailuk University Lecture 2: Normalization 1 Objectives The purpose of normalization The identification of various types of update anomalies The concept

More information

Introduction to Database Systems. Chapter 4 Normal Forms in the Relational Model. Chapter 4 Normal Forms

Introduction to Database Systems. Chapter 4 Normal Forms in the Relational Model. Chapter 4 Normal Forms Introduction to Database Systems Winter term 2013/2014 Melanie Herschel melanie.herschel@lri.fr Université Paris Sud, LRI 1 Chapter 4 Normal Forms in the Relational Model After completing this chapter,

More information

http://www.castlelearning.com/review/teacher/assignmentprinting.aspx 5. 2 6. 2 1. 10 3. 70 2. 55 4. 180 7. 2 8. 4

http://www.castlelearning.com/review/teacher/assignmentprinting.aspx 5. 2 6. 2 1. 10 3. 70 2. 55 4. 180 7. 2 8. 4 of 9 1/28/2013 8:32 PM Teacher: Mr. Sime Name: 2 What is the slope of the graph of the equation y = 2x? 5. 2 If the ratio of the measures of corresponding sides of two similar triangles is 4:9, then the

More information

The process of database development. Logical model: relational DBMS. Relation

The process of database development. Logical model: relational DBMS. Relation The process of database development Reality (Universe of Discourse) Relational Databases and SQL Basic Concepts The 3rd normal form Structured Query Language (SQL) Conceptual model (e.g. Entity-Relationship

More information

Effective Pruning for the Discovery of Conditional Functional Dependencies

Effective Pruning for the Discovery of Conditional Functional Dependencies Effective Pruning for the Discovery of Conditional Functional Dependencies Jiuyong Li 1, Jiuxue Liu 1, Hannu Toivonen 2, Jianming Yong 3 1 School of Computer and Information Science, University of South

More information

DATABASE MANAGEMENT SYSTEMS. Question Bank:

DATABASE MANAGEMENT SYSTEMS. Question Bank: DATABASE MANAGEMENT SYSTEMS Question Bank: UNIT 1 1. Define Database? 2. What is a DBMS? 3. What is the need for database systems? 4. Define tupule? 5. What are the responsibilities of DBA? 6. Define schema?

More information

Notes. Information Systems. Higher Still. Higher. www.hsn.uk.net. HSN31010 Database Systems First Normal Form. Contents

Notes. Information Systems. Higher Still. Higher. www.hsn.uk.net. HSN31010 Database Systems First Normal Form. Contents Higher Information Systems First Normal Form Contents Normalising to First Normal Form 1 What is Normalising? 1 Normal Forms 1 The Process 1 Worked Example 2 Why do we Normalise? 4 These notes were created

More information

Theory I: Database Foundations

Theory I: Database Foundations Theory I: Database Foundations 19. 19. Theory I: Database Foundations 07.2012 1 Theory I: Database Foundations 20. Formal Design 20. 20: Formal Design We want to distinguish good from bad database design.

More information

CSE 444 Midterm Test

CSE 444 Midterm Test CSE 444 Midterm Test Autum 2008 Name: Total time: 50 Question 1 /40 Question 2 /30 Question 3 /30 Total /100 1 1. SQL [40 points] We have a database of documents. Each document consists of several sections,

More information

Question 1. Relational Data Model [17 marks] Question 2. SQL and Relational Algebra [31 marks]

Question 1. Relational Data Model [17 marks] Question 2. SQL and Relational Algebra [31 marks] EXAMINATIONS 2005 MID-YEAR COMP 302 Database Systems Time allowed: Instructions: 3 Hours Answer all questions. Make sure that your answers are clear and to the point. Write your answers in the spaces provided.

More information

Chapter 20: Data Analysis

Chapter 20: Data Analysis Chapter 20: Data Analysis Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 20: Data Analysis Decision Support Systems Data Warehousing Data Mining Classification

More information

Module 5: Normalization of database tables

Module 5: Normalization of database tables Module 5: Normalization of database tables Normalization is a process for evaluating and correcting table structures to minimize data redundancies, thereby reducing the likelihood of data anomalies. The

More information

Teaching Database Modeling and Design: Areas of Confusion and Helpful Hints

Teaching Database Modeling and Design: Areas of Confusion and Helpful Hints Journal of Information Technology Education Volume 6, 2007 Teaching Database Modeling and Design: Areas of Confusion and Helpful Hints George C. Philip, Ph. D. College of Business, The University of Wisconsin

More information

Association Rule Mining

Association Rule Mining Association Rule Mining Association Rules and Frequent Patterns Frequent Pattern Mining Algorithms Apriori FP-growth Correlation Analysis Constraint-based Mining Using Frequent Patterns for Classification

More information