DBS 2006: 1 st week. DBS 2006: Plan. DB Life-Cycle: Requirement analysis. Data modelling: Conceptual Design. Logical Schema Design
|
|
- Noah McDaniel
- 6 years ago
- Views:
Transcription
1 DBS 006: Plan DBS 006: 1 st week DB Life-Cycle: Data modelling: 1 systematic design of DB 3-3 weeks Physical Schema Design Database usage: access to the stored data using SQL interactively or via application program -3 weeks Database system implementation 6 weeks 5 4 Maintenance and Administration Physical Schema Design Administration Requirement Analysis : Problem analysis Conceptual Database Design Entity, attribute, relationship Integrity constraints Weak entities Temporal data Generalization 1 1
2 Example DBS 006: nd week [ ] We have [ ] video tapes that we need to keep track of. Since a few weeks, we also have DVDs. Each of our video tapes has a tape number. For each movie, we need to know its title and category, director and year. We do have multiple copies of many of our movies. We give each movie a specific id, and then track which movie a tape contains. A tape may be either Beta or VHS Format. We always have at least one tape for each movie we track, and each tape is always a copy of a single, specific movie. Our tapes are adapted to the movie lengths, so we don t have any movies which require multiple tapes. The movies are stored on shelf according to their category sorted by movie title. We are frequently asked for movies starring specific actors. [ ] Customers like to know each actor s real birth name and age. We track only actors who appear in the movies in our inventory. [ ] Rentals are for one or more days, each movie with an individual price per day. Furthermore we additionally charge 1 $ per beta format tape, $ for a DVD and another $ for movies longer than hours. [abbreviated] DB Life-Cycle: : Physical Schema Design Administration Relational data model Principles for mapping entities and relationships to relations 3 4
3 Example 1 Example Design the ER diagrams. Mark the keys and the cardinalities (min-max notation). Design the ER diagrams. Mark the keys and the cardinalities (min-max notation). a) Exhibitions are organised by museums. Each exhibition is organized by one museum and features one or more artists. A museum has a name and an address; exhibitions have a unique title, a start and an end date. For the artists, we store names and addresses. b) Exhibitions are shown in several museums, even in the same museum (again) at different times. For each showing, the start and an end date are recorded. Each exhibition features one or more artists. A museum has a name and an address; exhibitions have a title. For the artists, we store names and addresses. a) Employees work in departments. For the employees, we have to store the unique social security number, name, and income. Each department has its own building (and a unique address). Departments have numbers and a maximal number of employees. For each employee, we store the information about when they commenced working in the department. b) Employees work in departments. Each department has is spread over several buildings. Each building a unique address. For each employee, we store the building they are working in. Departments have numbers and a maximal number of employees per building
4 Example 3 Example 3 possible ER-Design This is a database about actors. For each actor, we store their name and address. Actors star in movies. For the movies we store the title, the year, the length, and the producing studio s name. Movies are produced in studios; for the studios we store the name and address. Actors are employed by one studio at a time. This studio does not have to be the studio that producers the movie the actors stars in. Each studio is owned by one or more actors. They own the studio since a given (first) purchase date, which does not have to be the same for all owners. Each studio is managed by a business manager. They are not actors. Each studio may have had several business managers over the years. In the database, the start and end date of each business managers employment is kept. qualification stagename (0,*) (1,*) own purchase date Manager Actor (1,*) play (0,*) Movie (1,1) produce (1,*) Studio (1,*) length year title SID Employee name birthday (1,1) pay (1,*) has (1,1) Employment startdate enddate 7 8 4
5 Example DBS006: 8th week charge Format director category year id Application & Database Design: name (0,*) title Price_per_day belong_to length id (1,1) Tape (1,1) (1,*) hold Movie (0,*) is_in (0,*) Application Design Phys. Schema Design from (1,1) Rental until Address First_name Last_name have Telephone Mem_no (1,1) (0,*) Customer play (1,*) Actor birthday stage_name real_name 9 Relational Algebra Union, Difference Selection, Projection Cartesian Product Joins Operator tree 10 5
6 Video Example Video Example Video DB Schema: Video DB Schema (part): Movie(id, title, category, year, director, price_per_day, length) Tape(id, format, movie_id) Format(name, charge) Movie(id, title, category, year, director, price_per_day, length) Tape(id, format, movie_id) Format(name, charge) Actor(stage_name, real_name, birthday) Actor(stage_name, real_name, birthday) Play(movie_id, actor_name) Play(movie_id, actor_name) Queries: Customer(mem_no, last_name, first_name, address, telephone) Rental(tape_id, member, from, until) 1. List of all DVDs (Tapes). Id and titel of all movies that are available on DVD 3. List of Actors of which movies are available on DVD 4. Movies that are available in all formats 5. Movies of which are at least two starring actors in the DB
7 Inhalt Mi, Applikation & Database Design: DBS 006: 4 th week Application & Database Design: Application Design Phys. Schema Design Application Design Phys. Schema Design Relationales Kalkül Tuple Kalkül Domain Kalkül Sichere Ausdrücke Equivalenz relationer Sprachen (DBMS specific): SQL as data definition language Definition of relations using SQL Definition of constraints
8 DBS 006: 5 th week Application & Database Design: Example: CREATE TABLE Movie ( id INTEGER PRIMARY KEY, title VARCHAR(60) NOT NULL, category CHAR(10), year DATE, director VARCHAR(30), pricepday DECIMAL(4,), length INTEGER, CONSTRAINT plausible_year CHECK ( ), CONSTRAINT allowedprice CHECK ( ) ); Application Design Phys. Schema Design SQL as DML: SQL-query structure Simple SQL queries Queries using Joins Nested queries CREATE TABLE Tape( id INTEGER PRIMARY KEY, format CHAR(5) NOT NULL, movie_id INTEGER NOT NULL, CONSTRAINT tapenotempty FOREIGN KEY (movie_id) REFERENCES Movie(id) ON DELETE CASCADE, CONSTRAINT formatcheck FOREIGN KEY (format) REFERENCES Format(name) ON DELETE SET NULL );
9 Example: Example: CREATE TABLE Format( Name CHAR(5) primary key, Charge DECIMAL (3,) ); CREATE TABLE Actor ( stage_name VARCHAR(30)NOT NULL UNIQUE, real_name VARCHAR(30), birthday DATE ); CREATE TABLE Customer ( mem_no INTEGER PRIMARY KEY, last_name VARCHAR (30) NOT NULL, first_name VARCHAR(0), address VARCHAR (60), telephone VARCHAR (15) ); CREATE TABLE Play ( movie_id INTEGER, actor_name VARCHAR(30), CONSTRAINT pkstarr PRIMARY KEY (movie_id, actor_name), CONSTRAINT foreignkeymovieid FOREIGN KEY (movie_id) REFERENCES Movie (id), CONSTRAINT foreignkeystagename FOREIGN KEY (actor_name) REFERENCES Actor(stage_name) ); CREATE TABLE Rental( tape_id INTEGER, mem_no INTEGER, from_date DATE NOT NULL, until_date DATE, PRIMARY KEY (tape_id, mem_no, from_date), CONSTRAINT fk_tape FOREIGN KEY (tape_id) REFERENCES Tape(id), CONSTRAINT fk_customer FOREIGN KEY (mem_no) REFERENCES Customer(mem_no) );
10 Example Video DB Schema : Inhalt Fr, Applikation & Database Design: Movie(id, title, category, year, director, pricepday, length) Tape(id, format, movie_id) Format(name, charge) Actor(stage_name, real_name, birthday) Play(movie_id, actor_name) Queries: Application Design Phys. Schema Design 1. Liste aller DVDs (Tapes). Id und Titel aller Filme, die auf DVD vorliegen 3. Schauspieler von denen Filme auf DVD vorliegen 4. Filme, die in allen Formaten vorliegen 5. Filme, zu denen mindestens Schauspieler in der DB sind SQL als DML: Anfragen mit Joins Geschachtelte Anfragen
11 DBS 006: 6 th week Application & Database Design: Example Video DB Schema: Application Design Phys. Schema Design Movie(id, title, category, year, director, pricepday, length) Tape(id, format, movie_id) Format(name, charge) Actor(stage_name, real_name, birthday) Play(movie_id, actor_name) More Queries: SQL as DML: Nested queries Aggregate functions Grouping Transitive closure 6. Movies for which there are 3 actors in the DB 7. Movies that have the most actors in the DB 8. Overall Charge of all the tapes in the DB Without extra charge With extra charge Views and temporary tables 1 11
12 Example Video DB Schema: DBS 006: 7 th week Application & Database Design: Movie(id, title, category, year, director, pricepday, length) Tape(id, format, movie_id) Format(name, charge) Actor(stage_name, real_name, birthday) Play(movie_id, actor_name) More Queries: Application Design Phys. Schema Design 9. Average number of movies per actor 10. Number of movies per actor 11. List of actors with more than the average number of movies Prerequisites for DB access with SQL System aspects of SQL SQL environment Access control 3 4 1
13 DBS 006: 7 th week Application & Database Design: DBS 006: 7 th week Application & Database Design: Application Design Phys. Schema Design Application Design Phys. Schema Design SQL in Programs Module Embedded SQL Cursor-Concept SQL in Programs SQL und Java SQLJ JDBC Introduction Transactions
14 DBS 006: 8 th week Example: Application & Database Design: Find all functional dependencies: From application semantics: Customer (C-Nr, company, ZIP, City, Street, no) Salesperson (Name, city, ZIP, firstname, sales) Application Design Phys. Schema Design From representative data: R Design Quality: Functional Dependencies A B 3 C Super keys? Candidate keys? D 3 5 E
15 Example: R(A,B,C,D,E) F:{C B C D D B E ABCD C BD D BC CD B CB D} (1) () (3) (4) (5) (6) (7) (8) Armstrong Axioms: Reflexivity rule: If Y X then X Y Augmentation rule: If X Y and set of attributes Z then X Z Y Z Transitivity rule: If X Y and Y Z then X Z Find closure of attributes A, B, C,... AB, BC,... ABC, ABCD Candidate keys? Super keys?
16 Example: R(A,B,C,D,E) F:{C B C D D B E ABCD C BD D BC CD B CB D} (1) () (3) (4) (5) (6) (7) (8) DBS 006 Application & Database Design: Application Design Phys. Schema Design Find transitive closure Find minimal cover Design Quality: Functional dependencies Transitive closure Minimal cover Normal forms Lossless join
17 Example: Example: Determine normal form Re-arrange tables using Synthesis R(A,B,C,D,E) Decomposition Min F:{C BD D C E AC} R(A,B,C,D,E) S(A,B,C,D,E) Min F:{C BD D C E AC} Min F:{AB CDE CD A E AB} S(A,B,C,D,E) Min F:{AB CDE CD A E AB}
18 Normal forms: First normal form (1NF) Basic property of relation All attributes have atomic domain DBS: weekly plan Application & Database Design: Second normal form (NF) non-key A R candidate keys X R : X {A} Third normal form (3NF) 1. A X, i.e. trivial FD. A candidate key 3. X superkey in R BCNF 1. A X, i.e. trivial FD. X superkey in R Application Design Phys. Schema Design Physical Schema Design: Storage Structures Disk Properties Disk Access DB Block Structure
19 DBS: this week and next Example Application & Database Design: Consider table course Application Design Phys. Schema Design - course(title, number, room, lecturer) - with n tuples - Structure: - char(0), - integer (= 4 Bytes), - integer, - char(0) - Assumption: - fits completely into main memory Physical Schema Design: Tree-based Indexes: ISAM B+ Tree B+ Tree with data leaves - Parameter: - Information flow: 5 MB/s - Block size 4 KB - PCTFREE=30% - Ignore block header size - Average access time main memory: 10ns Estimate the time to load the table
20 Example Estimate Number of Blocks B: - Tuple size: = 48 Bytes - Data per block: 4*104Bytes * 0,7 867 Bytes - Numver of tuples per block: Bytes / 48 Bytes 59 - # Blocks B: n/59 B n Example B+ Tree Insert Search Key 60: Estimate time to load table - Transfer time: T/if B * 4 * 104 Bytes / 5 * 104 * 104 Bytes*s -1 = 0.16 * B / 104 msec 0.16 * B ms - Worst case: 0.16 *n m - Best case: 0.16 *n/59 m * n ms - Average Access time to disk Seek time + Rotation time + T/if - Worst case: 6ms+3ms *n ms - Best case: 6ms+3ms *n ms Example: 1000 tuples - Worst case: 6ms+3ms+160 ms = 169ms - Best case: 6ms+3ms+3ms = 1ms
21 Example B+ Tree 41 Example B+ Tree 4 1 Insert Search Keys 10, 105, 30, 340, 400, 401: Delete 60:
22 DBS weekly plan Application & Database Design: Example Create an extensible Hash-Index: H(K)= k mod 11 Bucket size 4 Data keys: - Insert 1 - Insert 55 Application Design Phys. Schema Design Physical Schema Design: Simple and extensible Hash Bitmap Index Function-based Index - Insert 69 - Insert 7 - Insert 18 - Insert Insert Insert 4 - Delete 7 - Delete 55 Cluster (Table und Index) 43 44
23 DBS weekly plan Application & Database Design: DBS weekly plan Database management: Database System User / Programmer Application program Software to process queries Software to access stored data DBMS Software Application Design Phys. Schema Design Physical Schema Design: Query processing Query optimization Stored Data Stored DB definition (Meta-data) Database Transactions- Concurrency: Serializability theory Locking mechanisms Deadlock: wait-for-graph, timeout Timestamps
24 Example Example Test the following schedules for conflict-serializability Create the schedule of a strict PL (-phase-locking) scheduler for Give an equivalent serial schedule (if exists) 1. r1(a), w1(a), r(a), w(a), r1(b), w1(b), r(b), w(b), c,c1. r1(a), w1(a), r(a), w(a), r(b), w(b), c, r1(b), w1(b), c1 3. T1: R(X), T:W(X), T1:W(X), T: Commit, T1: Commit 4. r1(x), r1(y), w1(x), r(y), w3(y), w1(x), r(y), c1, c, c3 S: r1[y], r3[u], r[u], w1[y], w[x], w1[x], w[z], w3[x], c1, c, c
25 Example Create the schedule of a strict PL (-phase-locking) scheduler Show waiting-graph (wait-for-graph) Show deadlock resolving using wait/die wound/wait S: r1[y], r3[u], w[x], r[u], w1[y], w1[x], w[z], w3[x], c1, c, c3 49 5
Requirement Analysis & Conceptual Database Design
Requirement Analysis & Conceptual Database Design Problem analysis Entity Relationship notation Integrity constraints Generalization Introduction: Lifecycle Requirement analysis Conceptual Design Logical
More information4 Schema Definition with SQL / DDL (II)
4 Schema Definition with SQL / DDL (II) 4.3 SQL/DDL Constraints 4.3.1 Attribute and simple table constraints 4.3.2 Enforcing cardinality constraints and foreign keys 4.3.3 Deferred constraints 4.3.4 Assertions
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 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 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 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 informationCS/B.Tech/CSE/New/SEM-6/CS-601/2013 DATABASE MANAGEMENENT SYSTEM. Time Allotted : 3 Hours Full Marks : 70
CS/B.Tech/CSE/New/SEM-6/CS-601/2013 2013 DATABASE MANAGEMENENT SYSTEM Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks. Candidates are required to give their answers
More informationCMSC 461 Final Exam Study Guide
CMSC 461 Final Exam Study Guide Study Guide Key Symbol Significance * High likelihood it will be on the final + Expected to have deep knowledge of can convey knowledge by working through an example problem
More informationVIEW OTHER QUESTION PAPERS
VIEW OTHER QUESTION PAPERS E B4E0562 Reg No.: Name: Total Pages: 2 APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY FOURTH SEMESTER B.TECH DEGREE EXAMINATION, JULY 2017 Course Code: CS208 Course Name: PRINCIPLES
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 informationQUIZ 1 REVIEW SESSION DATABASE MANAGEMENT SYSTEMS
QUIZ 1 REVIEW SESSION DATABASE MANAGEMENT SYSTEMS SCHEMA DESIGN & RELATIONAL ALGEBRA A database schema is the skeleton structure that represents the logical view of the entire database Logical design of
More informationLogical Schema Design Logical Schema Design: The Relational Data Model
Logical Schema Design Logical Schema Design: The Relational Data Model Basics of the Relational Model From Conceptual to Logical Schema Select data model - Hierarchical data model: hierarchies of record
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 informationExam. Question: Total Points: Score:
FS 2016 Data Modelling and Databases Date: June 9, 2016 ETH Zurich Systems Group Prof. Gustavo Alonso Exam Name: Question: 1 2 3 4 5 6 7 8 9 10 11 Total Points: 15 20 15 10 10 15 10 15 10 10 20 150 Score:
More informationQueen s University Faculty of Arts and Science School of Computing CISC 432* / 836* Advanced Database Systems
HAND IN Queen s University Faculty of Arts and Science School of Computing CISC 432* / 836* Advanced Database Systems Final Examination December 14, 2002 Instructor: Pat Martin Instructions: 1. This examination
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 informationRajiv GandhiCollegeof Engineering& Technology, Kirumampakkam.Page 1 of 10
Rajiv GandhiCollegeof Engineering& Technology, Kirumampakkam.Page 1 of 10 RAJIV GANDHI COLLEGE OF ENGINEERING & TECHNOLOGY, KIRUMAMPAKKAM-607 402 DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING QUESTION BANK
More informationCS 461: Database Systems. Final Review. Julia Stoyanovich
CS 461: Database Systems Final Review (stoyanovich@drexel.edu) Final exam logistics When: June 6, in class The same format as the midterm: open book, open notes 2 hours in length The exam is cumulative,
More informationExamination paper for TDT4145 Data Modelling and Database Systems
Department of Computer and Information Science Examination paper for TDT4145 Data Modelling and Database Systems Academic contact during examination: Svein Erik Bratsberg: 99539963 Roger Midtstraum: 99572420
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 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 informationStandard Query Language: Current standard Logical Schema Design: Schema Definition with SQL (DDL)
Standard Query Language: Current standard Logical Schema Design: Schema Definition with SQL (DDL) 1999: standard (ANSI SQL-3) about 2200 pages as full standard SQL history and standards SQL type system
More informationINSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad
Course Name Course Code Class Branch INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad - 500 04 COMPUTER SCIENCE AND ENGINEERING TUTORIAL QUESTION BANK : DATABASE MANAGEMENT SYSTEMS
More informationCS2255 DATABASE MANAGEMENT SYSTEMS QUESTION BANK UNIT I
CS2255 DATABASE MANAGEMENT SYSTEMS CLASS: II YEAR CSE SEM:04 STAFF INCHARGE: Mr S.GANESH,AP/CSE QUESTION BANK UNIT I 2 MARKS List the purpose of Database System (or) List the drawback of normal File Processing
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 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 informationROEVER ENGINEERING COLLEGE
ROEVER ENGINEERING COLLEGE ELAMBALUR, PERAMBALUR- 621 212 DEPARTMENT OF INFORMATION TECHNOLOGY DATABASE MANAGEMENT SYSTEMS UNIT-1 Questions And Answers----Two Marks 1. Define database management systems?
More informationDatabase Management Systems (Solutions for Vol 1_Classroom Practice Questions)
Database Management Systems (Solutions for Vol 1_Classroom Practice Questions) 2. ER and Relational Model 01. Ans: (b) 07. Ans: 1 ssn cid Derived attribute is an attribute that derives its value from one
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 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 informationNorthern India Engineering College, New Delhi Question Bank Database Management System. B. Tech. Mechanical & Automation Engineering V Semester
1. List four significant differences between a file-processing system and a DBMS. 2. Explain the difference between physical and logical data independence. 3. What are five main functions of a database
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 informationExam. Question: Total Points: Score:
FS 2016 Data Modelling and Databases Date: August 17, 2016 ETH Zurich Systems Group Prof. Gustavo Alonso Exam Name: Question: 1 2 3 4 5 6 7 8 9 10 11 Total Points: 11 11 10 12 9 10 11 10 15 10 8 117 Score:
More informationBachelor in Information Technology (BIT) O Term-End Examination
No. of Printed Pages : 6 I CSI-14 I Bachelor in Information Technology (BIT) O Term-End Examination cn Cn1 June, 2010 CD cp CSI-14 : DATA ANALYSIS AND DATABASE DESIGN Time : 3 hours Maximum Marks : 75
More informationINSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad
INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad - 500 043 Computer Science and Engineering TUTORIAL QUESTION BANK Course Name : DATABASE MANAGEMENT SYSTEMS Course Code : ACS005 Class
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 informationSYED AMMAL ENGINEERING COLLEGE
CS6302- Database Management Systems QUESTION BANK UNIT-I INTRODUCTION TO DBMS 1. What is database? 2. Define Database Management System. 3. Advantages of DBMS? 4. Disadvantages in File Processing System.
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 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 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 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 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 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 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 informationRelational Design Theory. Relational Design Theory. Example. Example. A badly designed schema can result in several anomalies.
Relational Design Theory Relational Design Theory A badly designed schema can result in several anomalies Update-Anomalies: If we modify a single fact, we have to change several tuples Insert-Anomalies:
More informationName :. Roll No. :... Invigilator s Signature : DATABASE MANAGEMENT SYSTEM
Name :. Roll No. :..... Invigilator s Signature :.. CS/B.TECH(IT)/SEM-6/IT-604/2011 2011 DATABASE MANAGEMENT SYSTEM Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks.
More informationDatabase Management Systems (Classroom Practice Booklet Solutions)
Database Management Systems (Classroom Practice Booklet Solutions) 2. ER and Relational Model 4 ssn cid 01. Ans: (b) Professor Teaches course 02. Ans: (c) Sol: Because each patient is admitted into one
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 informationAdministrivia. CS186 Class Wrap-Up. News. News (cont) Top Decision Support DBs. Lessons? (from the survey and this course)
Administrivia CS186 Class Wrap-Up R&G Chapters 1-28 Lecture 28 Final Exam Friday 12/12, 5pm 8pm, Room 4 LeConte You may have 2 pages of notes, both sides The exam is cumulative Final Exam Review Tuesday
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 information2011 DATABASE MANAGEMENT SYSTEM
Name :. Roll No. :..... Invigilator s Signature :.. CS/B.TECH(IT)/SEM-6/IT-604/2011 2011 DATABASE MANAGEMENT SYSTEM Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks.
More informationMcGill April 2009 Final Examination Database Systems COMP 421
McGill April 2009 Final Examination Database Systems COMP 421 Wednesday, April 15, 2009 9:00-12:00 Examiner: Prof. Bettina Kemme Associate Examiner: Prof. Muthucumaru Maheswaran Student name: Student Number:
More informationCSE 444 Midterm Exam
CSE 444 Midterm Exam July 28, 2010 Name Sample Solution Question 1 / 28 Question 2 / 20 Question 3 / 16 Question 4 / 20 Question 5 / 16 Total / 100 The exam is open textbook and open lecture notes, including
More informationDatabase Systems. Answers
Database Systems Question @ Answers Question 1 What are the most important directories in the MySQL installation? Bin Executable Data Database data Docs Database documentation Question 2 What is the primary
More informationExamination examples
Examination examples Databasteknik (5 hours) 1. Relational Algebra & SQL (4 pts total; 2 pts each). Part A Consider the relations R(A, B), and S(C, D). Of the following three equivalences between expressions
More informationCS6302 DBMS 2MARK & 16 MARK UNIT II SQL & QUERY ORTIMIZATION 1. Define Aggregate Functions in SQL? Aggregate function are functions that take a collection of values as input and return a single value.
More informationE.G.S. PILLAY ENGINEERING COLLEGE (An Autonomous Institution, Affiliated to Anna University, Chennai) Nagore Post, Nagapattinam , Tamilnadu.
7CA0 DATABASE MANAGEMENT SYSTEMS Academic Year : 08-09 Programme : MCA Question Bank Year / Semester : I / I Course Coordinator: Ms.S.Visalatchy Course Objectives. To learn the fundamentals of data models
More informationDelhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:
Serial : 0. PT_CS_DBMS_02078 Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: E-mail: info@madeeasy.in Ph: 0-5262 CLASS TEST 208-9 COMPUTER SCIENCE & IT Subject :
More informationTotal No. of Questions :09] [Total No. of Pages : 02. II/IV B.Tech. DEGREE EXAMINATIONS, NOV/DEC Second Semester CSE/IT DBMS
CSE/IT 224 (CR) Total No. of Questions :09] [Total No. of Pages : 02 Time: Three Hours II/IV B.Tech. DEGREE EXAMINATIONS, NOV/DEC- 2015 Second Semester CSE/IT DBMS Answer Question NO.1 Compulsory Answer
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 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 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 informationHigh Level Database Models
ICS 321 Fall 2011 High Level Database Models Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 9/21/2011 Lipyeow Lim -- University of Hawaii at Manoa 1 Database
More informationDatabase Technology Introduction. Heiko Paulheim
Database Technology Introduction Outline The Need for Databases Data Models Relational Databases Database Design Storage Manager Query Processing Transaction Manager Introduction to the Relational Model
More information; Spring 2008 Prof. Sang-goo Lee (14:30pm: Mon & Wed: Room ) ADVANCED DATABASES
4541.564; Spring 2008 Prof. Sang-goo Lee (14:30pm: Mon & Wed: Room 302-208) ADVANCED DATABASES Syllabus Text Books Exams (tentative dates) Database System Concepts, 5th Edition, A. Silberschatz, H. F.
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 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 informationConceptual (high-level, semantic)/ Physical (low-level, internal)/ Implementation (representational)
DB Systems, Lecture 01 Data: facts that can be recorded Information: data with meaning Knowledge: information and its application Mini-World: the part of the real world we are interested in Database: a
More informationDatabase Management
Database Management - 2013 Model Answers 1. a. A cyclic relationship type (also called recursive) is a relationship type between two occurrences of the same entity type. With each entity type in a cyclic
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 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 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 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 informationCS6302- DATABASE MANAGEMENT SYSTEMS- QUESTION BANK- II YEAR CSE- III SEM UNIT I
CS6302- DATABASE MANAGEMENT SYSTEMS- QUESTION BANK- II YEAR CSE- III SEM UNIT I 1.List the purpose of Database System (or) List the drawback of normal File Processing System. 2. Define Data Abstraction
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 informationInformationslogistik Unit 5: Data Integrity & Functional Dependency
Informationslogistik Unit 5: Data Integrity & Functional Dependency 27. III. 2012 Outline 1 Reminder: The Relational Algebra 2 The Relational Calculus 3 Data Integrity Keeping data consistent 4 Functional
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 informationCSCI 127 Introduction to Database Systems
CSCI 127 Introduction to Database Systems Integrity Constraints and Functional Dependencies Integrity Constraints Purpose: Prevent semantic inconsistencies in data e.g.: cname svngs check total Joe 100
More informationIMPORTANT: Circle the last two letters of your class account:
Fall 2001 University of California, Berkeley College of Engineering Computer Science Division EECS Prof. Michael J. Franklin FINAL EXAM CS 186 Introduction to Database Systems NAME: STUDENT ID: IMPORTANT:
More informationCSE 344 Final Examination
CSE 344 Final Examination March 15, 2016, 2:30pm - 4:20pm Name: Question Points Score 1 47 2 17 3 36 4 54 5 46 Total: 200 This exam is CLOSED book and CLOSED devices. You are allowed TWO letter-size pages
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 informationHigh-Level Database Models (ii)
ICS 321 Spring 2011 High-Level Database Models (ii) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 1 Logical DB Design: ER to Relational Entity sets to
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 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 informationProfessor: Pete Keleher! Closures, candidate keys, canonical covers etc! Armstrong axioms!
Professor: Pete Keleher! keleher@cs.umd.edu! } Mechanisms and definitions to work with FDs! Closures, candidate keys, canonical covers etc! Armstrong axioms! } Decompositions! Loss-less decompositions,
More information1. (a) Explain the Transaction management in a database. (b) Discuss the Query Processor of Database system structure. [8+8]
Code No: R059210506 Set No. 1 1. (a) Explain the Transaction management in a database. (b) Discuss the Query Processor of Database system structure. [8+8] 2. (a) What is an unsafe query? Give an example
More informationCSE 444 Midterm Test
CSE 444 Midterm Test Spring 2007 Name: Total time: 50 Question 1 /40 Question 2 /30 Question 3 /30 Total /100 1 1 SQL [40 points] Consider a database of social groups that allows people to become members
More informationCS348: INTRODUCTION TO DATABASE MANAGEMENT (Winter, 2011) FINAL EXAMINATION
CS348: INTRODUCTION TO DATABASE MANAGEMENT (Winter, 2011) FINAL EXAMINATION INSTRUCTOR: Grant Weddell TIME: 150 minutes WRITE YOUR NAME AND ID HERE: NOTE 1: This is a closed book examination. For example,
More informationFUNCTIONAL 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 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 informationName :. Roll No. :... Invigilator s Signature : DATABASE MANAGEMENT SYSTEM
Name :. Roll No. :..... Invigilator s Signature :.. CS/B.TECH(IT)/SEM-6/IT-604/2012 2012 DATABASE MANAGEMENT SYSTEM Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks.
More informationAnswers to G51DBS exam
Answers to G51DBS exam 2007-8 1. (a) (i) Title Java Haskell Databases Robotics (ii) ID Code Mark 111 G51PRG 60 222 G51PRG 70 333 G51PRG 50 (iii) ID 111 222 333 (iv) ID 444 (v) ID 111 (vi) ID Name ID Code
More informationTypical relationship between entities is ((a,b),(c,d) ) is best represented by one table RS (a,b,c,d)
Mapping ER Diagrams to a relational database.. Binary relationships: Three possible configurations: 1. One table.. 2. Two tables.. 3. Three tables.. 1-1 relationships R(AB) - S(CD) Typical relationship
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 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 informationThe Entity-Relationship Model (ER Model) - Part 2
Lecture 4 The Entity-Relationship Model (ER Model) - Part 2 By Michael Hahsler Based on slides for CS145 Introduction to Databases (Stanford) Lecture 4 > Section 2 What you will learn about in this section
More informationL Information Systems for Engineers. Final exam. ETH Zurich, Autumn Semester 2017 Friday
252-0834-00L Information Systems for Engineers Final exam ETH Zurich, Autumn Semester 2017 Friday 09.02.2018 First name: Last name: Legi number: Signature: You can fill out the above fields immediately,
More informationINSTITUTO SUPERIOR TÉCNICO Administração e optimização de Bases de Dados
-------------------------------------------------------------------------------------------------------------- INSTITUTO SUPERIOR TÉCNICO Administração e optimização de Bases de Dados Exam 1 16 June 2014
More informationDC62 Database management system JUNE 2013
Q2 (a) Explain the differences between conceptual & external schema. Ans2 a. Page Number 24 of textbook. Q2 (b) Describe the four components of a database system. A database system is composed of four
More information