Exam 2 CS 265 Spring 2018 Name: KEY. I will not use notes, other exams, or any source other than my own brain on this exam: (please sign)
|
|
- Pauline Hart
- 6 years ago
- Views:
Transcription
1 Exam CS 65 Spring 018 Name: KEY I will not use notes, other exams, or any source other than my own brain on this exam: (please sign 1. (5 pts Consider the relational schema, R = [C, S, J, D, P, Q, V, K ] with FDs K is not on RHS of any FD; J,P à C So K must be part of any key S,D à P J à S C à S,J,D,P,Q,V Give all keys for this relational schema. JPK, CK, JDK 3 pt for one, 4 for two, 5 for all three -1 for each of any others Key(s:. (5 pts Consider the relation P with 5 attributes, P = [ C, D, E, F, G ]. You are given the following functional dependencies C,D à E and F,G à C,D. Give a dependency-preserving decomposition of P where each relation of the decomposition is in BCNF. Your decomposition should have as few relations as possible, while still satisfying the specifications of the problem. C D E F G CD à E F, G not on RHS of any FD. So F,G must be part of any key. Attribute closure of F,G is all attributes, so F,G is the only key C D E F G FG à CD This splits on an FD That does not violate BCNF. In any case, its not dependency preserving ( pt only C D E F G C D F G C D F G E All that is needed in ellipse (5 pts 8 minutes
2 3. (5 pts Consider the relation R with 7 attributes, R = [ A, B, C, D, E, F]. You are given the following functional dependencies: Q = {A à B A, B, C, D, à E C, F à A, B}. pts for ACDàE pts for CFàA 1 pt for AàB - for any extras Give a minimal set of FDs equivalent to Q. If Q is already a minimal set, then say so. BE CLEAR! Can LHS of any FD be simplified? ABCD can be simplified to ACD, because B can be inferred from A CF can t be simplified; C cannot be inferred from F, or vice versa Can B be inferred from A without AàB? No keep AàB Can E be inferred from CD without ACDàE? No keep ACDàE Can A be inferred from CF without CFàA? No keep CFàA Can B be inferred from CF without CFàB? Yes CFàAàB, so CFàB redundant Minimal set in green: AàB, ACD à E, CFàA 4. (5 pts Consider the relation P with 5 attributes, R = [ A, B, C, D, E ]. You are given the two functional dependencies: A à B B à C Circle all true statements. (g [A, B], [A, C, D, E] is a dependency preserving decomposition (a [A, B] is in BCNF (b [B, C] is in BCNF (h [A, B, D, E], [B, C] is a dependency preserving decomposition (c [A, D, E] is in BCNF (i [A, B], [A, D, E], [B, C] is a dependency preserving decomposition (d [A, C, D, E] is in BCNF (j {A à B, B à C} is a minimal set of FDs (e (f [A, B, D, E] is in BCNF [A, B, C, D, E] is in BCNF (k 5 points for all 6 and nothing else -1 for each missing -1 for each extra [A, B], [C, D, E] is a lossless decomposition 8 minutes
3 4. Consider the relation P with 5 attributes, R = [ A, B, C, D, E ]. You are given the functional dependencies: A à B B à C. Circle all true statements. (a [A, B] is in BCNF AàB and A a key ADE is the only key (b [B, C] is in BCNF BàC and B a key Explana,ons for Ques,on 4 A B C D E A à B (c [A, D, E] is in BCNF No FDs assignable, thus no violation of BCNF A B A C D E (d [A, C, D, E] is in BCNF AàC (transitivity but A not key of [A C D E] (e (f [A, B, D, E] is in BCNF AàB and A NOT a key [A, B, C, D, E] is in BCNF AàB and BàC,and neither A or B a key A B C D E B à C (g [A, B], [A, C, D, E] is a dependency preserving decomposition BàC not covered B C A B D E A à B (h [A, B, D, E], [B, C] is a dependency preserving decomposition AàB and BàC both covered (i [A, B], [A, D, E], [B, C] is a dependency preserving decomposition AàB and BàC both covered (j {A à B, B à C} is a minimal set of FDs (k [A, B], [C, D, E] is a lossless decomposition No basis for info preserving join
4 5. (5 pts Consider the UML fragment to the right and identify (circle all equivalent table translations (i.e., those translations that faithfully enforce the constraints implied by the UML without regard to elegance from those given below. You might receive partial credit for a brief explanation of your choices. UNIQUE(y implies that y NOT NULL, but not vice versa. PK stands for PRIMARY KEY. FK stands for FOREIGN KEY. X x1 PK R r Z z1 PK (A (B (C (D (E CREATE TABLE X ( x1, PK (x1, FK (x1 refs R CREATE TABLE R ( x1, r1, z1 NOT NULL, PK(x1, FK (z1 refs Z, FK (x1 refs X CREATE TABLE Z ( z1, PK (z1 - points CREATE TABLE X ( x1, PK (x1 CREATE TABLE R ( x1, r1, z1 NOT NULL, PK(x1, FK (z1 refs Z, FK (x1 refs X CREATE TABLE Z ( z1 PK (z1 CREATE TABLE XR ( x1, r1, z1, PK(x1, FK (z1 refs Z CREATE TABLE Z ( z1, PK(z1 CREATE TABLE XR ( x1, r1, z1 NOT NULL, PK(x1, FK (z1 refs Z CREATE TABLE Z ( z1, PK(z1-1 points 3 points for one right choice and 5 pts for both CREATE TABLE XR ( x1, r1, z1, PK(x1, UNIQUE(z1, FK (z1 refs Z CREATE TABLE Z ( z1, PK(z1 - points (F None of the above 0 points if circled, with or without other choices 5 minutes
5 6. (5 pts Circle all options that would correctly enforce a Complete Coverage constraint of Tab (in Tab1 and Tab in an SQL translation of the following UML fragment. Tab Tkey PK Tattr Tab1 Tab a CREATE ASSERTION CompleteCoverageOfTab1AndTab CHECK (SELECT COUNT (DISTINCT Tab.Tkey FROM Tab = (SELECT COUNT (DISTINCT Tab1.Tkey FROM Tab1 + (SELECT COUNT(DISTINCT Tab.Tkey FROM Tab b CREATE ASSERTION CompleteCoverageOfTab1AndTab CHECK (NOT EXISTS (SELECT Tab.Tkey FROM Tab EXCEPT SELECT Tab1.Tkey FROM Tab1 EXCEPT SELECT Tab.Tkey FROM Tab 3 points for one; 4 points for two; 5 points for three; - for (a c CREATE ASSERTION CompleteCoverageOfTab1AndTab CHECK (NOT EXISTS (SELECT Tab.Tkey FROM Tab EXCEPT (SELECT Tab1.Tkey FROM Tab1 UNION SELECT Tab.Tkey FROM Tab d CREATE ASSERTION CompleteCoverageOfTab1AndTab CHECK (NOT EXISTS (SELECT Tab.Tkey FROM Tab WHERE Tab.Tkey NOT IN (SELECT Tab1.Tkey FROM Tab1 AND Tab.Tkey NOT IN (SELECT Tab.Tkey FROM Tab e None of the above the primary keys for Tab1 and Tab are not specified. 0 points for this 5 minutes
6 7. (5 pts Vanderbilt s academic record system (VARS of the future shares much in common with the system of today, but there will be notable differences. In the database to support VARS, the following are specified. Each academic Program (e.g., CS, History includes at least one Course. Each Course is included in 0 or more Programs. Each Course is composed of at least one Module (or mini-course; each Module is included in 0 or more Courses. Each Module is created by exactly one Individual; each Individual creates 0 or more Modules. Each Module has 0 or more other Prerequisite Modules; each Module may be a Prerequisite to 0 or more other Modules. Each Module is Equivalent to 0 or more other Modules. Each Individual designs 0 or more Courses; each Course is designed by at least one Individual. Each Individual endorses 0 or more Courses; each Course is endorsed by 0 or more Individuals. Complete the following UML snippet by adding cardinalities, associations, and/or classes, so that it satisfies all constraints in the specification above. ModulePreReq PreReq PostReq Program Course Module 1..* Pname PK Cname PK mid PK Includes ComposedOf Mname -0.5 for each error in cardinality, and for similar errors Design Endorse 1..* 1..* Individual iid PK iname Creates Module or 1..1 ModuleEquiv 8 minutes
7 8. (5 pts Consider the two tables below. Write a CREATE VIEW statement that lists the average water readings for each building of each day, but only for daily averages computed over more than values. The view, call it Maintenance, should list ReadingDate, BuildingName, and the average reading for that date/building, listed as AverageValue. CREATE TABLE WaterSensor ( BuildingName VARCHAR(35 NOT NULL, WaterSensorID INTEGER, WaterSensorOnLineDate DATE, PRIMARY KEY (WaterSensorID; CREATE TABLE WReading ( WaterSensorID INTEGER, WReadingDate DATE, WReadingTime TIME, WValue INTEGER NOT NULL, PRIMARY KEY (WaterSensorID, WReadingDate, WReadingTime, FOREIGN KEY (WaterSensorID REFERENCES WaterSensor; op,onal CREATE VIEW Maintenance (ReadingDate, BuildingName, AverageValue AS SELECT WR.WReadingDate, WS.BuildingName, AVERAGE(WR.HRWReadingValue AS AverageValue FROM WaterSensor WS, WReading WR WHERE WS.WaterSensorID = WR.WaterSensorID GROUP BY WR.WReadingDate, WS.BuildingName HAVING COUNT(* > - for first missing or incorrect clause, and -1 for each a^er that (can use JOIN keyword in the FROM clause 5 minutes
8 9. (5 pts Consider the relational schema Student (StuID, Name Instructor (InsID, Name Assessment (StuID, InsID, Rating, Term and a view called AssessmentSummary CREATE VIEW AssessmentSummary AS SELECT DISTINCT A.StuID, S.Name, A.Rating FROM Assessment A, Student S WHERE A.StuID = S.StuID AND Term = Fall09 Write an INSTEAD OF TRIGGER that implements UPDATEs to the StuID attribute of AssessmentSummary by updating Student.StuID and Assessment.StuID for the corresponding student. Update all Assessment tuples with the old StuID, not just the ones contributing to the view. Don't worry about updates to other attributes. CREATE TRIGGER updateassessmentsummary INSTEAD OF UPDATE OF StuID ON AssessmentSummary FOR EACH ROW /* implied by SQLite */ BEGIN UPDATE Student SET StuID = New.StuID WHERE StuID = Old.StuID; UPDATE Assessment SET StuID = New.StuID WHERE StuID = Old.StuID; END; -1 for each error Make sure that Old and New references are correct Finish the trigger 5 minutes
9 10. (5 pts Consider the B+ tree below * 9* 37* 41* 45* 53* 61* 65* 73* 81* 89* 94* Note that this tree does not show data nodes, and you do not need to see the data nodes to answer this question. At each leaf, N* is an index of the form <N, <page id, slot #>>, where N is the value of the search key. Show the tree that results from inserting a record with search key 84 (do not use redistribution. If you can do so clearly and unambiguously, then you can circle and label subtrees in this diagram that do not change and use those labels in your answer on the next page. Answer on the next page 8 minutes
10 64 Only correct tree * 9* 37* 41* 45* 53* 61* 65* 73* 81* 84* 89* 94* - if 84 or 81 does not appear at leaf -3 at least for any tree that isn t 4 levels. Use discretion on partial credit. Make sure that there are no syntax errors, or constraint errors (e.g., make sure that a value V, such as 67, does not appear to the right subtree of a value larger than V, such as 81.
11 Intermediate steps * 9* 84* 37* 41* 45* 53* 61* 65* 73* 81* 89* 94* 73* 81* 84* (will be passed up, and split the root by middle value of * 89* 94* 73* 81* 84* * 89* 94* 73* 81* 84* 11
12 11. (5 pts Consider the extendible hash table to the left. Assume Hash(x = x. Show the result of inserting the following keys in order: 41, for each misplaced key (order within a bin not important Answer here 8 minutes
13 Insert Insert Intermediate answer 13
CS x265 Exam 3 Spring ALL questions 5 points, except question 11 I will not use a source other than my brain on this exam: (please sign)
CS x265 Exam 3 Spring 2017 Name: KEY ALL questions 5 points, except question 11 I will not use a source other than my brain on this exam: (please sign) 1. (5 points) Consider the following definitions,
More informationMidterm Examination CS 265 Spring 2015 Name: KEY Total on any question cannot exceed 5 and cannot be less than 0 JPK, CK, JDK
Midterm Examination CS 265 Spring 2015 Name: KEY Total on any question cannot exceed 5 and cannot be less than 0 I will not use notes, other exams, or any source other than my own brain on this exam: (please
More informationMidterm Examination CS 265 Spring 2015 Name: I will not use notes, other exams, or any source other than my own brain on this exam: (please sign)
Midterm Examination CS 265 Spring 2015 Name: I will not use notes, other exams, or any source other than my own brain on this exam: (please sign 1. (5 pts You have two relations R = [C, F, G] and P = [B,
More informationI will not use a source other than my brain on this exam: (please sign)
Final Exam (CS 265 47 points Name: KEY I will not use a source other than my brain on this exam: (please sign 1. (2 pts Consider CAREFULLY the following table definitions. Remember that these definitions
More informationMidterm Examination CS 265 Spring 2016 Name: I will not use notes, other exams, or any source other than my own brain on this exam: (please sign)
Midterm Examination CS 265 Spring 2016 Name: I will not use notes, other exams, or any source other than my own brain on this exam: (please sign 1. (5 pts Consider the relational schema, R = [A B C D E
More informationPresentation on Functional Dependencies CS x265
Presentation on Functional Dependencies CS x265 This presentation assumes that you have previously viewed Watch videos (90 min) and answer questions from DB8 Relational Design Theory (https://class.stanford.edu/courses/db/rd/selfpaced/courseware/ch-relational_design_theory/)
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 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 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 informationThink about these queries for exam
Think about these queries for exam Write SQL queries specified below in a manner that is consistent with the table definitions. a) Write a SQL query that lists all of the individual water readings recorded
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: 9 June 2016 Duration
More informationHomework 3: Relational Database Design Theory (100 points)
CS 122A: Introduction to Data Management Spring 2018 Homework 3: Relational Database Design Theory (100 points) Due Date: Wed, Apr 25 (5:00 PM) Submission All HW assignments should be turned in with a
More informationEECS-3421a: Test #2 Queries
2016 November 9 EECS-3421a: Test #2 w/ answers 1 of 16 EECS-3421a: Test #2 Queries Electrical Engineering & Computer Science Lassonde School of Engineering York University Family Name: Given Name: Student#:
More informationRelational Database Design (II)
Relational Database Design (II) 1 Roadmap of This Lecture Algorithms for Functional Dependencies (cont d) Decomposition Using Multi-valued Dependencies More Normal Form Database-Design Process Modeling
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 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 informationExam 1 CS x265 Spring 2018 Name: KEY. I will not use notes, other exams, or any source other than my own brain on this exam:
Exam 1 CS x265 Spring 2018 Name: KEY I will not use notes, other exams, or any source other than my own brain on this exam: To students: To request a regrade or to otherwise appeal your score, submit a
More informationExample Examination. Allocated Time: 100 minutes Maximum Points: 250
CS542 EXAMPLE EXAM Elke A. Rundensteiner Example Examination Allocated Time: 100 minutes Maximum Points: 250 STUDENT NAME: General Instructions: This test is a closed book exam (besides one cheat sheet).
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 informationLecture #8 (Still More Relational Theory...!)
Introduction to Data Management Lecture #8 (Still More Relational Theory...!) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Announcements v
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 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 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 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 informationDatabase Management Systems Paper Solution
Database Management Systems Paper Solution Following questions have been asked in GATE CS exam. 1. Given the relations employee (name, salary, deptno) and department (deptno, deptname, address) Which of
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 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 informationMidterm Exam #1 Version A CS 122A Winter 2017
NAME: SEAT NO.: STUDENT ID: Midterm Exam #1 Version A CS 122A Winter 2017 Max. Points: 100 (Please read the instructions carefully) Instructions: - The total time for the exam is 50 minutes; be sure to
More informationDatabase Systems. Basics of the Relational Data Model
Database Systems Relational Design Theory Jens Otten University of Oslo Jens Otten (UiO) Database Systems Relational Design Theory INF3100 Spring 18 1 / 30 Basics of the Relational Data Model title year
More informationFor the Dorm Energy Monitoring DB design, some constraints are given and some are absent. You are asked to fill in some of these absent constraints.
Assignment A-w4 Spring 2018 Name: For the Dorm Energy Monitoring DB design, some constraints are given and some are absent. You are asked to fill in some of these absent constraints. 1. Fill Foreign Key
More informationCSE344 Final Exam Winter 2017
CSE344 Final Exam Winter 2017 March 16, 2017 Please read all instructions (including these) carefully. This is a closed book exam. You are allowed two pages of note sheets that you can write on both sides.
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 informationChapter 16. Relational Database Design Algorithms. Database Design Approaches. Top-Down Design
Chapter 16 Relational Database Design Algorithms Database Design Approaches Top-Down design (Starting with conceptual design) Bottom-Up Design (relational synthesis) 2 Top-Down Design Design conceptual
More informationSchema Refinement & Normalization Theory 2. Week 15
Schema Refinement & Normalization Theory 2 Week 15 1 How do we know R is in BCNF? If R has only two attributes, then it is in BCNF If F only uses attributes in R, then: R is in BCNF if and only if for
More information(At most 8 combina7ons of B,C,D composite values) AND (BCDà E) means (At most 8 values for E)
Study group exercises In a3endance: KEY 1. Suppose you have a rela=on P ( A, B, C, D, E, F ), with func=onal dependencies (FDs) A à B, BCD à E, E à F Suppose there are at most 2 different possible values
More information1 (10) 2 (8) 3 (12) 4 (14) 5 (6) Total (50)
Student number: Signature: UNIVERSITY OF VICTORIA Faculty of Engineering Department of Computer Science CSC 370 (Database Systems) Instructor: Daniel M. German Midterm Oct 21, 2004 Duration: 60 minutes
More informationUNIT 3 DATABASE DESIGN
UNIT 3 DATABASE DESIGN Objective To study design guidelines for relational databases. To know about Functional dependencies. To have an understanding on First, Second, Third Normal forms To study about
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 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 informationCS 474, Spring 2016 Midterm Exam #2
CS 474, Spring 2016 Midterm Exam #2 Name: e-id: @dukes.jmu.edu By writing your name, you acknowledge the following honor code statement: I have neither given nor received unauthorized assistance on this
More informationLecture 6a Design Theory and Normalization 2/2
CompSci 516 Data Intensive Computing Systems Lecture 6a Design Theory and Normalization 2/2 Instructor: Sudeepa Roy 1 HW1 deadline: Announcements Due on 09/21 (Thurs), 11:55 pm, no late days Project proposal
More informationSCHEMA REFINEMENT AND NORMAL FORMS
19 SCHEMA REFINEMENT AND NORMAL FORMS Exercise 19.1 Briefly answer the following questions: 1. Define the term functional dependency. 2. Why are some functional dependencies called trivial? 3. Give a set
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 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 informationThe appendix contains information about the Classic Models database. Place your answers on the examination paper and any additional paper used.
Name: Student Number: Instructions: Do all 9 questions. There is a total of 87 marks. The appendix contains information about the Classic Models database. Place your answers on the examination paper and
More informationChapter 10. Chapter Outline. Chapter Outline. 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 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 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 information6 February 2014 CSE-3421M Test #1 w/ answers p. 1 of 14. CSE-3421M Test #1. Design
6 February 2014 CSE-3421M Test #1 w/ answers p. 1 of 14 CSE-3421M Test #1 Design Sur / Last Name: Given / First Name: Student ID: Instructor: Parke Godfrey Exam Duration: 75 minutes Term: Winter 2014 Answer
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 informationADVANCED DATABASES ; Spring 2015 Prof. Sang-goo Lee (11:00pm: Mon & Wed: Room ) Advanced DB Copyright by S.-g.
4541.564; Spring 2015 Prof. Sang-goo Lee (11:00pm: Mon & Wed: Room 301-203) ADVANCED DATABASES Copyright by S.-g. Lee Review - 1 General Info. Text Book Database System Concepts, 6 th Ed., Silberschatz,
More informationCS 564 Final Exam Fall 2015 Answers
CS 564 Final Exam Fall 015 Answers A: STORAGE AND INDEXING [0pts] I. [10pts] For the following questions, clearly circle True or False. 1. The cost of a file scan is essentially the same for a heap file
More informationMidterm Exam #1 Version B CS 122A Winter 2017
NAME: SEAT NO.: STUDENT ID: Midterm Exam #1 Version B CS 122A Winter 2017 Max. Points: 100 (Please read the instructions carefully) Instructions: - The total time for the exam is 50 minutes; be sure to
More informationCS2300: File Structures and Introduction to Database Systems
CS2300: File Structures and Introduction to Database Systems Lecture 9: Relational Model & Relational Algebra Doug McGeehan 1 Brief Review Relational model concepts Informal Terms Formal Terms Table Relation
More informationHomework 6. Question Points Score Query Optimization 20 Functional Dependencies 20 Decompositions 30 Normal Forms 30 Total: 100
Carnegie Mellon University Department of Computer Science 15-415/615- Database Applications C. Faloutsos & A. Pavlo, Spring 2015 Prepared by Vinay & Jiayu DUE DATE: Tuesday, 3/24/2015, 1:30pm Homework
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 informationCS 338 Functional Dependencies
CS 338 Functional Dependencies Bojana Bislimovska Winter 2016 Outline Design Guidelines for Relation Schemas Functional Dependency Set and Attribute Closure Schema Decomposition Boyce-Codd Normal Form
More informationCSC 261/461 Database Systems Lecture 13. Fall 2017
CSC 261/461 Database Systems Lecture 13 Fall 2017 Announcement Start learning HTML, CSS, JavaScript, PHP + SQL We will cover the basics next week https://www.w3schools.com/php/php_mysql_intro.asp Project
More informationAttach extra pages as needed. Write your name and ID on any extra page that you attach. Please, write neatly.
UCLA Computer Science Department Fall 2003 Instructor: C. Zaniolo TA: Fusheng Wang Student Name and ID: CS143 Final EXAM: Closed Book, 3 Hours Attach extra pages as needed. Write your name and ID on any
More informationV. Database Design CS448/ How to obtain a good relational database schema
V. How to obtain a good relational database schema Deriving new relational schema from ER-diagrams Normal forms: use of constraints in evaluating existing relational schema CS448/648 1 Translating an E-R
More informationDatabase Systems Relational Model. A.R. Hurson 323 CS Building
Relational Model A.R. Hurson 323 CS Building Relational data model Database is represented by a set of tables (relations), in which a row (tuple) represents an entity (object, record) and a column corresponds
More informationDatabase design III. Quiz time! Using FDs to detect anomalies. Decomposition. Decomposition. Boyce-Codd Normal Form 11/4/16
Lecture 3 Quiz time! Database design III Functional dependencies cont. BCNF and 3NF What s wrong with this schema? {(, 2, Databases, Steven Van Acker ), (, 4, Databases, Rogardt Heldal )} Redundancy! Using
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 informationInformal Design Guidelines for Relational Databases
Outline Informal Design Guidelines for Relational Databases Semantics of the Relation Attributes Redundant Information in Tuples and Update Anomalies Null Values in Tuples Spurious Tuples Functional Dependencies
More informationMore Normalization Algorithms. CS157A Chris Pollett Nov. 28, 2005.
More Normalization Algorithms CS157A Chris Pollett Nov. 28, 2005. Outline 3NF Decomposition Algorithms BCNF Algorithms Multivalued Dependencies and 4NF Dependency-Preserving Decomposition into 3NF Input:
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 informationNormalization 03. CSE3421 notes
Normalization 03 CSE3421 notes 1 Example F: A B (1) ABCD E (2) EF G (3) EF H (4) ACDF EG (5) Calculate the minimal cover of F. 2 Step 1: Put F in standard form FDs (1) (4) are already in standard form.
More informationFundamentals of Database Systems
Fundamentals of Database Systems Assignment: 3 Due Date: 23st August, 2017 Instructions This question paper contains 15 questions in 6 pages. Q1: Consider the following relation and its functional dependencies,
More informationSolutions to Final Examination
Prof. Li-Yan Yuan CMPUT 391: Database Management Systems Solutions to Final Examination April 23, 2007 It is a close-book examination and the time for the test is 120 minutes. There are ten (10) questions
More informationMidterm Exam (Version B) CS 122A Spring 2017
NAME: SOLUTION SEAT NO.: STUDENT ID: Midterm Exam (Version B) CS 122A Spring 2017 Max. Points: 100 (Please read the instructions carefully) Instructions: - The total time for the exam is 80 minutes; be
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 informationFunctional Dependencies and. Databases. 1 Informal Design Guidelines for Relational Databases. 4 General Normal Form Definitions (For Multiple Keys)
1 / 13 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant d Information in Tuples and Update Anomalies 1.3 Null Values in Tuples 1.4 Spurious Tuples
More informationIntroduction to Database Systems. Announcements CSE 444. Review: Closure, Key, Superkey. Decomposition: Schema Design using FD
Introduction to Database Systems CSE 444 Lecture #9 Jan 29 2001 Announcements Mid Term on Monday (in class) Material in lectures Textbook Chapter 1.1, Chapter 2 (except 2.1 and ODL), Chapter 3 (except
More informationConcepts from
1 Concepts from 3.1-3.2 Functional dependencies Keys & superkeys of a relation Reasoning about FDs Closure of a set of attributes Closure of a set of FDs Minimal basis for a set of FDs 2 Plan How can we
More informationFrom Murach Chap. 9, second half. Schema Refinement and Normal Forms
From Murach Chap. 9, second half The need for normalization A table that contains repeating columns Schema Refinement and Normal Forms A table that contains redundant data (same values repeated over and
More informationChapter 14. Database Design Theory: Introduction to Normalization Using Functional and Multivalued Dependencies
Chapter 14 Database Design Theory: Introduction to Normalization Using Functional and Multivalued Dependencies Copyright 2012 Ramez Elmasri and Shamkant B. Navathe Chapter Outline 1 Informal Design Guidelines
More informationUnit IV. S_id S_Name S_Address Subject_opted
Page no: 1 Unit IV Normalization of Database Database Normalizations is a technique of organizing the data in the database. Normalization is a systematic approach of decomposing tables to eliminate data
More informationDatabase Management
Database Management - 2011 Model Answers 1. a. A data model should comprise a structural part, an integrity part and a manipulative part. The relational model provides standard definitions for all three
More informationUniversity of California, Berkeley. (2 points for each row; 1 point given if part of the change in the row was correct)
University of California, Berkeley CS 186 Intro to Database Systems, Fall 2012, Prof. Michael J. Franklin MIDTERM II - Questions This is a closed book examination but you are allowed one 8.5 x 11 sheet
More informationIMPORTANT: Circle the last two letters of your class account:
Fall 2002 University of California, Berkeley College of Engineering Computer Science Division EECS Prof. Michael J. Franklin MIDTERM AND SOLUTIONS CS 186 Introduction to Database Systems NAME: Norm L.
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 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 informationE-R diagrams and database schemas. Functional dependencies. Definition (tuple, attribute, value). A tuple has the form
E-R diagrams and database schemas Functional dependencies Definition (tuple, attribute, value). A tuple has the form {A 1 = v 1,..., A n = v n } where A 1,..., A n are attributes and v 1,..., v n are their
More informationSchema And Draw The Dependency Diagram
Given That Information Write The Relational Schema And Draw The Dependency Diagram below, write the relational schema, draw its dependency diagram, and identify all You can assume that any given product
More informationMaterial You Need to Know
Review Quiz 2 Material You Need to Know Normalization Storage and Disk File Layout Indexing B-trees and B+ Trees Extensible Hashing Linear Hashing Decomposition Goals: Lossless Joins, Dependency preservation
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 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 informationIntroduction to Data Management. Lecture #7 (Relational Design Theory)
Introduction to Data Management Lecture #7 (Relational Design Theory) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Announcements v HW#2 is
More informationThe Relational Model. Chapter 3. Comp 521 Files and Databases Fall
The Relational Model Chapter 3 Comp 521 Files and Databases Fall 2012 1 Why Study the Relational Model? Most widely used model by industry. IBM, Informix, Microsoft, Oracle, Sybase, etc. It is simple,
More information14 October 2015 EECS-3421A Test #1 p. 1 of 14. EECS-3421A Test #1. Design
14 October 2015 EECS-3421A Test #1 p. 1 of 14 EECS-3421A Test #1 Design Sur / Last Name: Given / First Name: Student ID: Instructor: Parke Godfrey Exam Duration: 75 minutes Term: Fall 2015 Answer the following
More informationIntroduction to Data Management. Lecture 16 (SQL: There s STILL More...) It s time for another installment of...
Introduction to Data Management Lecture 16 (SQL: There s STILL More...) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 It s time for another
More informationDatabase Management System Prof. Partha Pratim Das Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur
Database Management System Prof. Partha Pratim Das Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture - 19 Relational Database Design (Contd.) Welcome to module
More informationIntermediate SQL ( )
CSL 451 Introduction to Database Systems Intermediate SQL (4.1-4.4) Department of Computer Science and Engineering Indian Institute of Technology Ropar Narayanan (CK) Chatapuram Krishnan! Summary Join
More informationSchema Refinement and Normal Forms
Schema Refinement and Normal Forms Chapter 19 Quiz #2 Next Wednesday Comp 521 Files and Databases Fall 2010 1 The Evils of Redundancy Redundancy is at the root of several problems associated with relational
More informationMidterm 2: CS186, Spring 2015
Midterm 2: CS186, Spring 2015 Prof. J. Hellerstein You should receive a double-sided answer sheet and an 8-page exam. Mark your name and login on both sides of the answer sheet, and in the blanks above.
More informationIMPORTANT: Circle the last two letters of your class account:
Fall 2004 University of California, Berkeley College of Engineering Computer Science Division EECS MIDTERM II CS 186 Introduction to Database Systems Prof. Michael J. Franklin NAME: D.B. Guru STUDENT ID:
More information[18 marks] Consider the following schema for tracking customers ratings of books for a bookstore website.
Question 1. [18 marks] Consider the following schema for tracking customers ratings of books for a bookstore website. Books(ISBN, title, author, year, length). ISBN is a string used internationally for
More informationAdministrivia. Physical Database Design. Review: Optimization Strategies. Review: Query Optimization. Review: Database Design
Administrivia Physical Database Design R&G Chapter 16 Lecture 26 Homework 5 available Due Monday, December 8 Assignment has more details since first release Large data files now available No class Thursday,
More informationCOMP7640 Assignment 2
COMP7640 Assignment 2 Due Date: 23:59, 14 November 2014 (Fri) Description Question 1 (20 marks) Consider the following relational schema. An employee can work in more than one department; the pct time
More informationReview. S V T Ma Mo N A S. Mo Ma T
N: Name A: Address S: SSN V: VRN T: Type Ma: Manufacturer (or Make) Mo: Model (Probably) Preferred decomposition N A S S à N, A Review Mega or universal rela/on N A S V T Ma Mo S à N, A S V T Ma Mo Mo
More information