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



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

IT2305 Database Systems I (Compulsory)

Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases

DATABASE MANAGEMENT SYSTEMS. Question Bank:

The Relational Model. Why Study the Relational Model? Relational Database: Definitions

Databases What the Specification Says


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

IT2304: Database Systems 1 (DBS 1)

Lecture Notes on Database Normalization

Relational Databases

The Relational Model. Why Study the Relational Model? Relational Database: Definitions. Chapter 3

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

Chapter 10 Functional Dependencies and Normalization for Relational Databases

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

The University of British Columbia

Relational Database Design

Review: Participation Constraints

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

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. The Relational Model. The relational model

Database Design and Normalization

BCA. Database Management System

Fundamentals of Database Design

Chapter 10. Functional Dependencies and Normalization for Relational Databases

MCQs~Databases~Relational Model and Normalization

Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys

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

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

CIS 631 Database Management Systems Sample Final Exam

Functional Dependencies and Finding a Minimal Cover

The Relational Data Model: Structure

3. Relational Model and Relational Algebra

DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added?

RELATIONAL DATABASE DESIGN

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

Fundamentals of Database System

Theory of Relational Database Design and Normalization

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

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB

Introduction to Databases

Normalization in Database Design

Lecture 6. SQL, Logical DB Design

Functional Dependency and Normalization for Relational Databases

Bridge from Entity Relationship modeling to creating SQL databases, tables, & relations

Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification

Design of Relational Database Schemas

Relational model. Relational model - practice. Relational Database Definitions 9/27/11. Relational model. Relational Database: Terminology

Programming with SQL

Relational Database Design Theory

Conceptual Design Using the Entity-Relationship (ER) Model

DATABASE NORMALIZATION

The core theory of relational databases. Bibliography

Databases and BigData

Converting E-R Diagrams to Relational Model. Winter Lecture 17

Database Constraints and Design

Functional Dependencies

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. COURSE CURRICULUM COURSE TITLE: DATABASE MANAGEMENT (Code: ) Information Technology

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

Chapter 6: Integrity Constraints

Data Modeling. Database Systems: The Complete Book Ch ,

Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model

DATABASE DESIGN. - Developing database and information systems is performed using a development lifecycle, which consists of a series of steps.

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

Theory of Relational Database Design and Normalization

Relational Schema Design

SQL NULL s, Constraints, Triggers

Database Design. Database Design I: The Entity-Relationship Model. Entity Type (con t) Chapter 4. Entity: an object that is involved in the enterprise

CSC 443 Data Base Management Systems. Basic SQL

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer

Chapter 8. Database Design II: Relational Normalization Theory

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

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

Databasesystemer, forår 2005 IT Universitetet i København. Forelæsning 3: Business rules, constraints & triggers. 3. marts 2005

How To Create A Table In Sql (Ahem)

The Relational Model. Ramakrishnan&Gehrke, Chapter 3 CS4320 1

Database Management Systems. Chapter 1

TYPICAL QUESTIONS & ANSWERS

The Relational Data Model and Relational Database Constraints

Schema Design and Normal Forms Sid Name Level Rating Wage Hours

OBJECTS AND DATABASES. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 21

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

Chapter 7: Relational Database Design

Scheme G. Sample Test Paper-I

Exercise 1: Relational Model

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

Database Design Methodology

CMU - SCS / Database Applications Spring 2013, C. Faloutsos Homework 1: E.R. + Formal Q.L. Deadline: 1:30pm on Tuesday, 2/5/2013

not necessarily strictly sequential feedback loops exist, i.e. may need to revisit earlier stages during a later stage

Intermediate SQL C H A P T E R4. Practice Exercises. 4.1 Write the following queries in SQL:

Answer Key. UNIVERSITY OF CALIFORNIA College of Engineering Department of EECS, Computer Science Division

Review Entity-Relationship Diagrams and the Relational Model. Data Models. Review. Why Study the Relational Model? Steps in Database Design

The Entity-Relationship Model

B2.2-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS

COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model

EECS 647: Introduction to Database Systems

Functional Dependencies and Normalization

A Tool for Generating Relational Database Schema from EER Diagram

SQL Simple Queries. Chapter 3.1 V3.0. Napier University Dr Gordon Russell

Part A: Data Definition Language (DDL) Schema and Catalog CREAT TABLE. Referential Triggered Actions. CSC 742 Database Management Systems

Transcription:

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 specific data model c. the collection of related data d. the content of the db Answers in italics 2. A data model is (one or more) a. a set of relations in the db b. a model of the data stored c. the collection of stored data d. a set of concepts used to describe a db e. a tool that can be used to describe a db 3. A language that you can use to define tables, schemas, attribute domains, and constraints is called a a. storage definition language b. view definition language c. data definition language d. schema definition language e. database definition language 4. A database manipulation language is a language that allows a. modification of the external schema b. the content of the db to be accessed c. specification of updates and retrievals d. modification of the internal schema e. the db structure to be modified f. modification of the conceptual schema 5. Who or what is responsible for maintaining db consistency? a. the dbms vendor b. db applications c. end users d. db designers

2(7) e. db management system [and the programmer] f. all of the above 6. The ER model is a conceptual data model 7. An entity type can have more that one key attribute 8. A weak entity type does not have any unique attributes 9. A key attribute can have NULL as its value 10. Attribute names are unique within a db 11. A derived attribute is (one or more) a. an attribute whose values are optional b. an attribute whose values can be computed c. an attribute that does not have a value for each entity d. an attribute whose values can be derived from other attributes/ relationships 12. When mapping an ER schema into a relational schema, in what situation is a new relation NOT added to the db a. for each M:N relationship type b. for each higher degree relationship c. for each 1:1 or 1:N binary relationship type d. for each weak or regular entity type e. for each multivalued attribute 13. The relational data model is an example of

3(7) a. physical data models b. implementation data models c. conceptual data models 14. A prime attribute is an attribute of a. the primary key b. a relation c. a foreign key d. any candidate key e. a secondary key 15. A candidate key is (one or more) a. a set of attributes referring to another relation in the db b. an attribute with a uniwue value for each tuple of a relation c. an attribute or a set of attributes that determines the values of all other attributes in the relation d. a minimal superkey e. an attribute that is potentially the key of a relation 16. The order of the attributes within a relation is not important 17. A relation R is defined as R(A, B, C, D, E, F), candidate keys are A and BC. Which of the following combinations of attributes are superkeys? (one or more) a. ACF b. ABC c. BCD d. BDF e. CEF f. ABCDEF 18. The order of tuples within a relation is important 19. A superkey is a. the primary key plus the secondary key b. the set of attributes that has a unique value for each tuple in the relation

4(7) c. the set of all attributes belonging to any candidate key d. a minimal set of attributes that has a unique value for each tuple of the relation 20. SQL is a procedural language 21. Which of the following data types would be suitable for an attribute that stores students user codes, given that we know they consist of three letters followed by two or three digits? a. MEMO b. NUMBER(3,3) c. CHAR(6) d. INTEGER e. VARCHAR(6) f. CLOB 22. A relational algebra expression equivalent to SELECT * FROM R, S is a. pi-all_attributes_from_r_and_s(r x S) b. an equi-join operation c. R x S d. an outer join e. pi-all_attributes_from_r_and_s(r * S) f. R * S 23. The primary key of a relation determines the value of all other attributes 24. A candidate key is defined to be an attribute or a set of attributes such that (one or more) a. it is a superkey b. it is a minimal set of attributes c. it determines the values of all other attributes d. it is a minimal set of attributes that determine all other attributes in the table e. its closure contains all attributes of the table 25. A table is in 3NF if (one or more)

5(7) a. there is more than one key b. there are no transitive FDs c. there are no partial FDs d. each FD either has a superkey on its left-hand side, or has a prime attribute on the right-hand side e. each FD has a superkey on its left-hand side f. there is only one key 26. A table is in BCNF if a. every FD has a superkey on its left-hand side b. there is a FD whose left-hand side is not a superkey c. the table is in 2NF d. the table is in 3NF e. there are no transitive FDs f. the table has only one key 27. A FD violates BCNF if id does not have a. a prime attribute on its right-hand side b. a key on its right-hand side c. a candidate key on its right-hand side d. a prime attribute on its left-hand side e. a superkey on its right-hand side f. a superkey on its left-hand side 28. Under what condition(s) is a relation always in 2NF? (one or more) a. if there are transitive dependencies b. if there is only one key c. when all FDs are partial d. if every candidate key is a single-attribute key e. if there is only on, single attribute key 29. A relation can be in 3NF without being in 2NF 30. Relational algebra is an example of (one or more) a. storage definition language b. view definition language c. data manipulation language

6(7) d. query language e. data definition language 31. If it is necessary to retrieve the value of an attribute for all tuples in a relation, what operation should be used? a. natural join b. equijoin c. join d. grouping e. project f. select 32. The union operation is commutative 33. The operation that combines information from two relations using a specific condition is a. grouping b. join c. modify d. Cartesian product e. project f. select

Copy your answer to the answer sheet 7(7)