Midterm Exam SOLUTION

Size: px
Start display at page:

Download "Midterm Exam SOLUTION"

Transcription

1 CS 461, Database Systems Name: Midterm Exam SOLUTION Drexel Total 80 I certify that this exam is entirely my own work. Signature Date Instructions: This is an open book, open notes exam. Use of electronic devices is not permitted. You have 1 hour to answer all questions. Show your work when appropriate. Good luck! 1

2 Problem 1 (25 points) Business rules to ER diagrams (a) (10 points) Consider the business rules below that describe a database of books and authors. Draw an ER diagram that encodes these business rules. Clearly mark all key and participation constraints. An author is described by a name and a date of birth (dob). No two authors have the same combination of name and dob. A book is described by an ISBN, a title and a year when it was written (year). No two books have the same ISBN number. A book is written by exactly one author. An author is only included in the database is she has authored at least one book. There is participation on AUTHORS (bold line), and key and participation on BOOKS (arrowhead, bold line). (b) (15 points) Consider the business rules below that describe a database of scientists, discoveries and awards. Draw an ER diagram that encodes these business rules. Clearly mark all key and participation constraints. A scientist is described by a name, a field of study, and a date of birth (dob). No two scientists have the same combination of name and dob. A discovery has a name. No two discoveries have the same name. An award has a name, which uniquely identifies it. Scientists make discoveries. A discovery is made by one or several scientists. A scientist who made no discoveries is not tracked in our database. Scientists receive awards. A scientist may receive the same award more than once in different years. All years in which a scientist received a particular award must be recorded. There is participation on SCIENTISTS and DISCOVERIES w.r.t. make (bold lines). 2

3 Problem 2 (25 points) ER diagrams to SQL Do not create cycles when you establish foreign keys, i.e., you should not have a foreign key from table A to table B and also a foreign key from table B to table A in your implementation. (a) (15 points) Consider an ER diagram below. Write SQL statements (create table) that implement the constraints specified by this ER diagram. Create as many tables as is required. Briefly explain which constraints are captured in your relational implementation, and in what way. If a constraint cannot be implemented, state that explicitly in your description. You will not receive full credit without a proper description. The line from CHEFS to work_at is bold and has an arrowhead. The line CHEFS to own is not bold and has an arrowhead. The lines from RESTAURANTS to own and work_at are not bold and do not have arrowheads. create table Restaurants ( name varchar(64), city varchar(64), primary key (name, city) create table Chefs ( ssn char(9) primary key, name varchar(64), work_at_name varchar(64) not null, work_at_city varchar(64) not null, own_name varchar(64), own_city varchar(64), foreign key (works_at_name, works_at_city) references Restaurants (name, city), foreign key (owns_name, owns_city) references Restaurants (name, city) This implementation captures all constraints. Both key constraints on CHEFS are captured by representing the entity set CHEFS and the two relationship sets 3

4 in the same table with foreign keys (i.e., there is only one tuple per chef in this table, hence a chef cannot be associated with more than one restaurant through either ownership or work). Participation on CHEFS in work_at is represented by making work_at_name and work_at_city not null. (b) (10 points) Consider an ER diagram below. Write SQL statements (create table) that implement the constraints specified by this ER diagram. Create as many tables as is required. Briefly explain which constraints are captured in your relational implementation, and in what way. If a constraint cannot be implemented, state that explicitly in your description. You will not receive full credit without a proper description. The line from SATELLITE to orbits is bold and has an arrowhead; the line from PLANET to orbits is not bold and has an arrowhead. Option 1: create table Satellites_Orbit_Planets ( sat_name varchar(64) unique, sat_mass integer, planet_name varchar(64) primary key, planet_mass integer This implementation captures all constraints. Key constraints on both entity sets are captured because there is only 1 tuple in this relation per planet (because planet_name is the primary key) and per satellite (because sat_name is unique). Participation on Satellites is enforced because there cannot be a tuple in this relation in which sat_name is specified by planet_name is not (since planet_name is not null). Note that there is no participation on planets, which is correct. A planet without a satellite can exist in our database, for this planet the value of sat_name will be null. A shortcoming of this implementation is that there is an opportunity to specify sat_mass without specifying sat_name. However, this is subtle and this solution is acceptable for full credit. Option 2: 4

5 create table Planets ( name varchar(64) primary key, mass integer create table Satellites_Orbit_Planets ( name varchar(64) primary key, mass integer, planet_name varchar(64) not null unique, foreign key (planet_name) references Planets(name) This implementation captures all constraints. Key and participation on SATELLITES is captured by representing both the entity set SATELLITES and the relationship set in the table Satellite, with satellite name as the primary key. Key constraint on PLANETS is represented by making planet_name unique in Satellites. This way a particular planet participated in the relationship set at most once. Note that this solution does not suffer from the shortcoming of the implementation in Option 1. 5

6 Problem 3 (30 points) Relational algebra and SQL Olympics (year, host, kind) Medals (country, sport, year, event, medal) Olympics (year, host, kind) year host kind 2012 UK Summer 2010 Canada Winter 2008 China Summer 2006 Italy Winter 2004 Greece Summer 2002 USA Winter Medals (country, sport, year, event, medal) country sport *year event medal USA swimming m freestyle gold USA swimming m butterfly gold USA swimming m butterfly silver Canada figure skating 2010 ice dancing gold Canada figure skating 2010 ladies singles bronze China figure skating 2010 pair skating gold China swimming m freestyle silver USA swimming m freestyle gold Brazil swimming m freestlyle gold USA figure skating 2002 men s singles bronze USA figure skating 2002 ladies singles gold China figure skating 2002 pair skating bronze Russia figure skating 2002 men s singles gold Russia figure skating 2002 ladies singles silver 6

7 (a) (10 points) Write a SQL query that lists years in which the host country won a gold medal and a silver medal at an Olympic event. select o.year from Medals m1, Medals m2, Olympics o where m1.year = o.year and m1.country = o.host and m1.medal = 'gold' and m2.year = o.year and m2.country = o.host and m2.medal = 'silver' (b) (10 points) Write two equivalent relational algebra expressions that list sports in which the US won a medal in a Summer Olympics. Any two of these are sufficient, other solutions are also possible. π sport ((σ country='usa' Medals) >< (σ kind='summer' Olympics)) π sport (σ country='usa' (Medals >< (σ kind='summer' Olympics)) π sport (σ country='usa' kind='summer' (Medals >< Olympics)) (c) (10 points) Write a SQL query and an equivalent relational algebra expression that lists names of countries that won a medal at a Summer Olympics but that never won a medal at a Winter Olympics. List each country name only once. select distinct m.country from Medals m, Olympics o where m.year = o.year and o.kind = 'Summer' EXCEPT select m.country from Medals m, Olympics o where m.year = o.year and o.kind = 'Winter' Note that distinct is only necessary in the first part of the query. But if it s there in both parts, the query is correct and received full credit. There are several ways to write the relational algebra expression, one option is below. π country ((σ kind='summer' Olympics) >< Medals) π country ((σ kind='w int er' Olympics) >< Medals) 7

Databases What the Specification Says

Databases What the Specification Says Databases What the Specification Says Describe flat files and relational databases, explaining the differences between them; Design a simple relational database to the third normal form (3NF), using entityrelationship

More information

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

Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys Database Design Overview Conceptual Design. The Entity-Relationship (ER) Model CS430/630 Lecture 12 Conceptual design The Entity-Relationship (ER) Model, UML High-level, close to human thinking Semantic

More information

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

CMU - SCS 15-415/15-615 Database Applications Spring 2013, C. Faloutsos Homework 1: E.R. + Formal Q.L. Deadline: 1:30pm on Tuesday, 2/5/2013 CMU - SCS 15-415/15-615 Database Applications Spring 2013, C. Faloutsos Homework 1: E.R. + Formal Q.L. Deadline: 1:30pm on Tuesday, 2/5/2013 Reminders - IMPORTANT: Like all homeworks, it has to be done

More information

Review: Participation Constraints

Review: Participation Constraints Review: Participation Constraints Does every department have a manager? If so, this is a participation constraint: the participation of Departments in Manages is said to be total (vs. partial). Every did

More information

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

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

More information

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

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

More information

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

Database Design. Database Design I: The Entity-Relationship Model. Entity Type (con t) Chapter 4. Entity: an object that is involved in the enterprise Database Design Database Design I: The Entity-Relationship Model Chapter 4 Goal: specification of database schema Methodology: Use E-R R model to get a high-level graphical view of essential components

More information

Data Modeling. Database Systems: The Complete Book Ch. 4.1-4.5, 7.1-7.4

Data Modeling. Database Systems: The Complete Book Ch. 4.1-4.5, 7.1-7.4 Data Modeling Database Systems: The Complete Book Ch. 4.1-4.5, 7.1-7.4 Data Modeling Schema: The structure of the data Structured Data: Relational, XML-DTD, etc Unstructured Data: CSV, JSON But where does

More information

Probability. Section 9. Probability. Probability of A = Number of outcomes for which A happens Total number of outcomes (sample space)

Probability. Section 9. Probability. Probability of A = Number of outcomes for which A happens Total number of outcomes (sample space) Probability Section 9 Probability Probability of A = Number of outcomes for which A happens Total number of outcomes (sample space) In this section we summarise the key issues in the basic probability

More information

SQL Data Definition. Database Systems Lecture 5 Natasha Alechina

SQL Data Definition. Database Systems Lecture 5 Natasha Alechina Database Systems Lecture 5 Natasha Alechina In This Lecture SQL The SQL language SQL, the relational model, and E/R diagrams CREATE TABLE Columns Primary Keys Foreign Keys For more information Connolly

More information

Answers included WORKSHEET: INTEGRITY CONTROL IN RELATIONAL DATABASES

Answers included WORKSHEET: INTEGRITY CONTROL IN RELATIONAL DATABASES CS27020: Modelling Persistent Data WORKSHEET: INTEGRITY CONTROL IN RELATIONAL DATABASES Time allowed: 40 minutes Calculators are not allowed in this worksheet. Answer all questions 1. Briefly explain what

More information

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

Relational model. Relational model - practice. Relational Database Definitions 9/27/11. Relational model. Relational Database: Terminology COS 597A: Principles of Database and Information Systems elational model elational model A formal (mathematical) model to represent objects (data/information), relationships between objects Constraints

More information

Object-Based Databases

Object-Based Databases C H A P T E R22 Object-Based Databases Practice Exercises 22.1 A car-rental company maintains a database for all vehicles in its current fleet. For all vehicles, it includes the vehicle identification

More information

SQL Tables, Keys, Views, Indexes

SQL Tables, Keys, Views, Indexes CS145 Lecture Notes #8 SQL Tables, Keys, Views, Indexes Creating & Dropping Tables Basic syntax: CREATE TABLE ( DROP TABLE ;,,..., ); Types available: INT or INTEGER REAL or FLOAT CHAR( ), VARCHAR( ) DATE,

More information

SQL NULL s, Constraints, Triggers

SQL NULL s, Constraints, Triggers CS145 Lecture Notes #9 SQL NULL s, Constraints, Triggers Example schema: CREATE TABLE Student (SID INTEGER PRIMARY KEY, name CHAR(30), age INTEGER, GPA FLOAT); CREATE TABLE Take (SID INTEGER, CID CHAR(10),

More information

Relational Algebra and SQL

Relational Algebra and SQL Relational Algebra and SQL Johannes Gehrke johannes@cs.cornell.edu http://www.cs.cornell.edu/johannes Slides from Database Management Systems, 3 rd Edition, Ramakrishnan and Gehrke. Database Management

More information

In This Lecture. SQL Data Definition SQL SQL. Notes. Non-Procedural Programming. Database Systems Lecture 5 Natasha Alechina

In This Lecture. SQL Data Definition SQL SQL. Notes. Non-Procedural Programming. Database Systems Lecture 5 Natasha Alechina This Lecture Database Systems Lecture 5 Natasha Alechina The language, the relational model, and E/R diagrams CREATE TABLE Columns Primary Keys Foreign Keys For more information Connolly and Begg chapter

More information

There are five fields or columns, with names and types as shown above.

There are five fields or columns, with names and types as shown above. 3 THE RELATIONAL MODEL Exercise 3.1 Define the following terms: relation schema, relational database schema, domain, attribute, attribute domain, relation instance, relation cardinality, andrelation degree.

More information

CSCE 156H/RAIK 184H Assignment 4 - Project Phase III Database Design

CSCE 156H/RAIK 184H Assignment 4 - Project Phase III Database Design CSCE 156H/RAIK 184H Assignment 4 - Project Phase III Database Design Dr. Chris Bourke Spring 2016 1 Introduction In the previous phase of this project, you built an application framework that modeled the

More information

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

DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added? DBMS Questions 1.) Which type of file is part of the Oracle database? A.) B.) C.) D.) Control file Password file Parameter files Archived log files 2.) Which statements are use to UNLOCK the user? A.)

More information

Relational Algebra. Module 3, Lecture 1. Database Management Systems, R. Ramakrishnan 1

Relational Algebra. Module 3, Lecture 1. Database Management Systems, R. Ramakrishnan 1 Relational Algebra Module 3, Lecture 1 Database Management Systems, R. Ramakrishnan 1 Relational Query Languages Query languages: Allow manipulation and retrieval of data from a database. Relational model

More information

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

SQL Simple Queries. Chapter 3.1 V3.0. Copyright @ Napier University Dr Gordon Russell SQL Simple Queries Chapter 3.1 V3.0 Copyright @ Napier University Dr Gordon Russell Introduction SQL is the Structured Query Language It is used to interact with the DBMS SQL can Create Schemas in the

More information

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

Answer Key. UNIVERSITY OF CALIFORNIA College of Engineering Department of EECS, Computer Science Division Answer Key UNIVERSITY OF CALIFORNIA College of Engineering Department of EECS, Computer Science Division CS186 Fall 2003 Eben Haber Midterm Midterm Exam: Introduction to Database Systems This exam has

More information

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

Databasesystemer, forår 2005 IT Universitetet i København. Forelæsning 3: Business rules, constraints & triggers. 3. marts 2005 Databasesystemer, forår 2005 IT Universitetet i København Forelæsning 3: Business rules, constraints & triggers. 3. marts 2005 Forelæser: Rasmus Pagh Today s lecture Constraints and triggers Uniqueness

More information

Chapter 6: Integrity Constraints

Chapter 6: Integrity Constraints Chapter 6: Integrity Constraints Domain Constraints Referential Integrity Assertions Triggers Functional Dependencies Database Systems Concepts 6.1 Silberschatz, Korth and Sudarshan c 1997 Domain Constraints

More information

A technical discussion of UML 06/11/03 Relational Modeling with UML

A technical discussion of UML 06/11/03 Relational Modeling with UML A technical discussion of UML 06/11/03 Relational Modeling with UML Davor Gornik Improving software development capability 2 Table of Contents Relational Databases... 1 Core Elements of Relational Modeling...

More information

2012-20 CS Awards in Americas

2012-20 CS Awards in Americas 2012-20 CS Awards in Americas Brazil Excellence in Contact Center Bronze -The Art of Customer Relations Canada Customer Service Leader of the Year Customer Service Trainer of the Year Colombia Portafolio

More information

EECS 647: Introduction to Database Systems

EECS 647: Introduction to Database Systems EECS 647: Introduction to Database Systems Instructor: Luke Huan Spring 2013 Administrative Take home background survey is due this coming Friday The grader of this course is Ms. Xiaoli Li and her email

More information

SQL DATA DEFINITION: KEY CONSTRAINTS. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 7

SQL DATA DEFINITION: KEY CONSTRAINTS. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 7 SQL DATA DEFINITION: KEY CONSTRAINTS CS121: Introduction to Relational Database Systems Fall 2015 Lecture 7 Data Definition 2 Covered most of SQL data manipulation operations Continue exploration of SQL

More information

Lecture 6. SQL, Logical DB Design

Lecture 6. SQL, Logical DB Design Lecture 6 SQL, Logical DB Design Relational Query Languages A major strength of the relational model: supports simple, powerful querying of data. Queries can be written intuitively, and the DBMS is responsible

More information

IT2305 Database Systems I (Compulsory)

IT2305 Database Systems I (Compulsory) Database Systems I (Compulsory) INTRODUCTION This is one of the 4 modules designed for Semester 2 of Bachelor of Information Technology Degree program. CREDITS: 04 LEARNING OUTCOMES On completion of this

More information

The SQL Query Language. Creating Relations in SQL. Referential Integrity in SQL. Basic SQL Query. Primary and Candidate Keys in SQL

The SQL Query Language. Creating Relations in SQL. Referential Integrity in SQL. Basic SQL Query. Primary and Candidate Keys in SQL COS 597A: Principles of Database and Information Systems SQL: Overview and highlights The SQL Query Language Structured Query Language Developed by IBM (system R) in the 1970s Need for a standard since

More information

Relational Databases

Relational Databases Relational Databases Jan Chomicki University at Buffalo Jan Chomicki () Relational databases 1 / 18 Relational data model Domain domain: predefined set of atomic values: integers, strings,... every attribute

More information

Exercise 1: Relational Model

Exercise 1: Relational Model Exercise 1: Relational Model 1. Consider the relational database of next relational schema with 3 relations. What are the best possible primary keys in each relation? employ(person_name, street, city)

More information

types, but key declarations and constraints Similar CREATE X commands for other schema ëdrop X name" deletes the created element of beer VARCHARè20è,

types, but key declarations and constraints Similar CREATE X commands for other schema ëdrop X name deletes the created element of beer VARCHARè20è, Dening a Database Schema CREATE TABLE name èlist of elementsè. Principal elements are attributes and their types, but key declarations and constraints also appear. Similar CREATE X commands for other schema

More information

4. SQL. Contents. Example Database. CUSTOMERS(FName, LName, CAddress, Account) PRODUCTS(Prodname, Category) SUPPLIERS(SName, SAddress, Chain)

4. SQL. Contents. Example Database. CUSTOMERS(FName, LName, CAddress, Account) PRODUCTS(Prodname, Category) SUPPLIERS(SName, SAddress, Chain) ECS-165A WQ 11 66 4. SQL Contents Basic Queries in SQL (select statement) Set Operations on Relations Nested Queries Null Values Aggregate Functions and Grouping Data Definition Language Constructs Insert,

More information

www.gr8ambitionz.com

www.gr8ambitionz.com Data Base Management Systems (DBMS) Study Material (Objective Type questions with Answers) Shared by Akhil Arora Powered by www. your A to Z competitive exam guide Database Objective type questions Q.1

More information

The University of British Columbia

The University of British Columbia The University of British Columbia Computer Science 304 Midterm Examination October 31, 2005 Time: 50 minutes Total marks: 50 Instructor: Rachel Pottinger Name ANSWER KEY (PRINT) (Last) (First) Signature

More information

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

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. The Relational Model. The relational model CS2Bh: Current Technologies Introduction to XML and Relational Databases Spring 2005 The Relational Model CS2 Spring 2005 (LN6) 1 The relational model Proposed by Codd in 1970. It is the dominant data

More information

Software Requirements Specification for DLS SYSTEM

Software Requirements Specification for DLS SYSTEM Software Requirements Specification for DLS SYSTEM 3.1.1 Purpose This is the Software Requirements Specification (SRS) for the DLS (Digital Library System). The purpose of this document is to convey information

More information

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

The Relational Model. Ramakrishnan&Gehrke, Chapter 3 CS4320 1 The Relational Model Ramakrishnan&Gehrke, Chapter 3 CS4320 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc. Legacy systems in older models

More information

Database Design. Goal: specification of database schema Methodology: E-R Model is viewed as a set of

Database Design. Goal: specification of database schema Methodology: E-R Model is viewed as a set of Database Design Goal: specification of database schema Methodology: Use E-R model to get a high-level graphical view of essential components of the model and how they are related Convert E-R diagram to

More information

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

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

More information

The Entity-Relationship Model

The Entity-Relationship Model The Entity-Relationship Model 221 After completing this chapter, you should be able to explain the three phases of database design, Why are multiple phases useful? evaluate the significance of the Entity-Relationship

More information

Going for the Gold in the Cidade Maravilhosa: Who Will Win the 2016 Olympic Games in Rio de Janeiro?

Going for the Gold in the Cidade Maravilhosa: Who Will Win the 2016 Olympic Games in Rio de Janeiro? Going for the Gold in the Cidade Maravilhosa: Who Will Win the 2016 Olympic Games in Rio de Janeiro? by Camila F. Gonzales 1 Tuck School of Business at Dartmouth July, 2016 1 camila.falleiros.gonzales.tu16@tuck.dartmouth.edu

More information

CSC 443 Data Base Management Systems. Basic SQL

CSC 443 Data Base Management Systems. Basic SQL CSC 443 Data Base Management Systems Lecture 6 SQL As A Data Definition Language Basic SQL SQL language Considered one of the major reasons for the commercial success of relational databases SQL Structured

More information

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

Intermediate SQL C H A P T E R4. Practice Exercises. 4.1 Write the following queries in SQL: C H A P T E R4 Intermediate SQL Practice Exercises 4.1 Write the following queries in SQL: a. Display a list of all instructors, showing their ID, name, and the number of sections that they have taught.

More information

IT2304: Database Systems 1 (DBS 1)

IT2304: Database Systems 1 (DBS 1) : Database Systems 1 (DBS 1) (Compulsory) 1. OUTLINE OF SYLLABUS Topic Minimum number of hours Introduction to DBMS 07 Relational Data Model 03 Data manipulation using Relational Algebra 06 Data manipulation

More information

Conceptual Design Using the Entity-Relationship (ER) Model

Conceptual Design Using the Entity-Relationship (ER) Model Conceptual Design Using the Entity-Relationship (ER) Model Module 5, Lectures 1 and 2 Database Management Systems, R. Ramakrishnan 1 Overview of Database Design Conceptual design: (ER Model is used at

More information

Is winning medals in international sport simply a matter of money?

Is winning medals in international sport simply a matter of money? Is winning medals in international sport simply a matter of money? An international comparison in 15 countries Why do some countries win more medals than others? How much do countries invest in elite sport?

More information

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

The Relational Model. Why Study the Relational Model? Relational Database: Definitions. Chapter 3 The Relational Model Chapter 3 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Informix, Microsoft, Oracle, Sybase,

More information

Data Integration and Exchange. L. Libkin 1 Data Integration and Exchange

Data Integration and Exchange. L. Libkin 1 Data Integration and Exchange Data Integration and Exchange L. Libkin 1 Data Integration and Exchange Traditional approach to databases A single large repository of data. Database administrator in charge of access to data. Users interact

More information

Relational Database Concepts

Relational Database Concepts Relational Database Concepts IBM Information Management Cloud Computing Center of Competence IBM Canada Labs 1 2011 IBM Corporation Agenda Overview Information and Data Models The relational model Entity-Relationship

More information

City University of Hong Kong. Information on a Course offered by Department of Computer Science with effect from Semester A in 2014 / 2015

City University of Hong Kong. Information on a Course offered by Department of Computer Science with effect from Semester A in 2014 / 2015 City University of Hong Kong Information on a Course offered by Department of Computer Science with effect from Semester A in 2014 / 2015 Part I Course Title: Database Systems Course Code: CS3402 Course

More information

University of Massachusetts Amherst Department of Computer Science Prof. Yanlei Diao

University of Massachusetts Amherst Department of Computer Science Prof. Yanlei Diao University of Massachusetts Amherst Department of Computer Science Prof. Yanlei Diao CMPSCI 445 Midterm Practice Questions NAME: LOGIN: Write all of your answers directly on this paper. Be sure to clearly

More information

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

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

More information

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

The Relational Model. Why Study the Relational Model? Relational Database: Definitions The Relational Model Database Management Systems, R. Ramakrishnan and J. Gehrke 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Microsoft, Oracle, Sybase, etc. Legacy systems in

More information

The core theory of relational databases. Bibliography

The core theory of relational databases. Bibliography The core theory of relational databases Slide 1 La meilleure pratique... c est une bonne théorie Bibliography M.Levene, G.Loizou, Guided Tour of Relational Databases and Beyond, Springer, 625 pages,1999.

More information

Database Management Systems,

Database Management Systems, Database Management Systems Database Design Example 1 Topics Hospital Database E-R Design Entities Relationships Converting E-R Model to Relational Model Tables Queries Company Database Summary 2 Hospital

More information

Statistics E100 Fall 2013 Practice Midterm I - A Solutions

Statistics E100 Fall 2013 Practice Midterm I - A Solutions STATISTICS E100 FALL 2013 PRACTICE MIDTERM I - A SOLUTIONS PAGE 1 OF 5 Statistics E100 Fall 2013 Practice Midterm I - A Solutions 1. (16 points total) Below is the histogram for the number of medals won

More information

Schema Design and Normal Forms Sid Name Level Rating Wage Hours

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

More information

The Relational Data Model: Structure

The Relational Data Model: Structure The Relational Data Model: Structure 1 Overview By far the most likely data model in which you ll implement a database application today. Of historical interest: the relational model is not the first implementation

More information

Database Design and the E-R Model

Database Design and the E-R Model C H A P T E R 7 Database Design and the E-R Model Practice Exercises 7.1 Answer: The E-R diagram is shown in Figure 7.1. Payments are modeled as weak entities since they are related to a specific policy.

More information

CS411 Database Systems

CS411 Database Systems Announcements CS411 Database Systems 03: The Relational Model Kazuhiro Minami Project stage 0 is due today Grade distribution of the course project Stage 1 (Decide your application): 5% Stage 2 (ER modeling)

More information

Rio 2016 Olympic Games Rule 40 Guidelines

Rio 2016 Olympic Games Rule 40 Guidelines Rio 2016 Olympic Games Rule 40 Guidelines Rule 40, Bye-law paragraph 3 of the Olympic Charter states that Except as permitted by the IOC Executive Board, no competitor, coach, trainer or official who participates

More information

DATABASE MANAGEMENT SYSTEMS. Question Bank:

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

More information

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

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

More information

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

COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model The entity-relationship (E-R) model is a a data model in which information stored

More information

COUNTING SUBSETS OF A SET: COMBINATIONS

COUNTING SUBSETS OF A SET: COMBINATIONS COUNTING SUBSETS OF A SET: COMBINATIONS DEFINITION 1: Let n, r be nonnegative integers with r n. An r-combination of a set of n elements is a subset of r of the n elements. EXAMPLE 1: Let S {a, b, c, d}.

More information

CSC 443 Fall 2011 Dr. R. M. Siegfried. Answers to Assignment #1

CSC 443 Fall 2011 Dr. R. M. Siegfried. Answers to Assignment #1 Answers to Assignment #1 1.14. Consider the Database below: If the name of the 'CS' (Computer Science) Department changes to 'CSSE' (Computer Science and Software Engineering) Department and the corresponding

More information

Measures of Central Tendency: Mean, Median, and Mode Examples

Measures of Central Tendency: Mean, Median, and Mode Examples Measures of Central Tendency: Mean, Median, and Mode Examples 1. Lesson Initiator What is the purpose of finding an average? Answers will vary. A sample answer would be that an average is a value representative

More information

3. Relational Model and Relational Algebra

3. Relational Model and Relational Algebra ECS-165A WQ 11 36 3. Relational Model and Relational Algebra Contents Fundamental Concepts of the Relational Model Integrity Constraints Translation ER schema Relational Database Schema Relational Algebra

More information

Database Design Process. Databases - Entity-Relationship Modelling. Requirements Analysis. Database Design

Database Design Process. Databases - Entity-Relationship Modelling. Requirements Analysis. Database Design Process Databases - Entity-Relationship Modelling Ramakrishnan & Gehrke identify six main steps in designing a database Requirements Analysis Conceptual Design Logical Design Schema Refinement Physical

More information

Mind on Statistics. Chapter 4

Mind on Statistics. Chapter 4 Mind on Statistics Chapter 4 Sections 4.1 Questions 1 to 4: The table below shows the counts by gender and highest degree attained for 498 respondents in the General Social Survey. Highest Degree Gender

More information

Database Concepts. John Scooter Morris Genentech, Inc. Databases January 30, 2003 page 1. Scooter Morris, Computing Technologies (scooter@gene.

Database Concepts. John Scooter Morris Genentech, Inc. Databases January 30, 2003 page 1. Scooter Morris, Computing Technologies (scooter@gene. Database Concepts John Scooter Morris Genentech, Inc. January 30, 2003 page 1 Overview Limitations Data Modeling Data Access Methods Types of Uses of Genomic Data - Problems. January 30, 2003 page 2 Limitations

More information

Number of hours in the semester L Ex. Lab. Projects SEMESTER I 1. Economy 45 18 27. 2. Philosophy 18 18. 4. Mathematical Analysis 45 18 27 Exam

Number of hours in the semester L Ex. Lab. Projects SEMESTER I 1. Economy 45 18 27. 2. Philosophy 18 18. 4. Mathematical Analysis 45 18 27 Exam Year 1 Lp. Course name Number of hours in the semester L Ex. Lab. Projects SEMESTER I 1. Economy 45 18 7. Philosophy 18 18 3. Linear Algebra 45 18 7 Exam 4. Mathematical Analysis 45 18 7 Exam 5. Economical

More information

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

Review Entity-Relationship Diagrams and the Relational Model. Data Models. Review. Why Study the Relational Model? Steps in Database Design Review Entity-Relationship Diagrams and the Relational Model CS 186, Fall 2007, Lecture 2 R & G, Chaps. 2&3 Why use a DBMS? OS provides RAM and disk A relationship, I think, is like a shark, you know?

More information

Version A Page 1. 1. The diagram shows two bowling balls, A and B, each having a mass of 7.00 kilograms, placed 2.00 meters apart.

Version A Page 1. 1. The diagram shows two bowling balls, A and B, each having a mass of 7.00 kilograms, placed 2.00 meters apart. Physics Unit Exam, Kinematics 1. The diagram shows two bowling balls, A and B, each having a mass of 7.00 kilograms, placed 2.00 meters apart. What is the magnitude of the gravitational force exerted by

More information

MAJOR EVENTS COORDINATION UNIT

MAJOR EVENTS COORDINATION UNIT 1 UNITED STATES DEPARTMENT OF STATE BUREAU OF DIPLOMATIC SECURITY MAJOR EVENTS COORDINATION UNIT 2 1 THE BUREAU OF DIPLOMATIC SECURITY (DS) IS THE SECURITY AND LAW ENFORCEMENT ARM OF THE U.S. DEPARTMENT

More information

New York University Computer Science Department Courant Institute of Mathematical Sciences

New York University Computer Science Department Courant Institute of Mathematical Sciences New York University Computer Science Department Courant Institute of Mathematical Sciences Homework #5 Solutions Course Title: Database Systems Instructor: Jean-Claude Franchitti Course Number: CSCI-GA.2433-001

More information

How To Create A Table In Sql 2.5.2.2 (Ahem)

How To Create A Table In Sql 2.5.2.2 (Ahem) Database Systems Unit 5 Database Implementation: SQL Data Definition Language Learning Goals In this unit you will learn how to transfer a logical data model into a physical database, how to extend or

More information

SQL: Queries, Programming, Triggers

SQL: Queries, Programming, Triggers SQL: Queries, Programming, Triggers CSC343 Introduction to Databases - A. Vaisman 1 R1 Example Instances We will use these instances of the Sailors and Reserves relations in our examples. If the key for

More information

Elite Athletes, National Identity and the Olympic Games:

Elite Athletes, National Identity and the Olympic Games: Elite Athletes, National Identity and the Olympic Games: Winning Glory for China Prof. Dong Jinxia Peking University Without exaggeration, sport is a mirror in which nations, communities, men and women

More information

Using SQL Server Management Studio

Using SQL Server Management Studio Using SQL Server Management Studio Microsoft SQL Server Management Studio 2005 is a graphical tool for database designer or programmer. With SQL Server Management Studio 2005 you can: Create databases

More information

A probability experiment is a chance process that leads to well-defined outcomes. 3) What is the difference between an outcome and an event?

A probability experiment is a chance process that leads to well-defined outcomes. 3) What is the difference between an outcome and an event? Ch 4.2 pg.191~(1-10 all), 12 (a, c, e, g), 13, 14, (a, b, c, d, e, h, i, j), 17, 21, 25, 31, 32. 1) What is a probability experiment? A probability experiment is a chance process that leads to well-defined

More information

Enquiries call: 01294 324475

Enquiries call: 01294 324475 Nurturing Excellence Programme For Sport Application Form Please complete this form in BLOCK CAPITALS and in black ink. Once completed, please return this form, together with the appropriate documentation

More information

CMPT 354 Database Systems. Simon Fraser University Summer 2016. Instructor: Oliver Schulte

CMPT 354 Database Systems. Simon Fraser University Summer 2016. Instructor: Oliver Schulte CMPT 354 Database Systems Simon Fraser University Summer 2016 Instructor: Oliver Schulte Assignment 1: Entity-Relationship Modeling. The Relational Model. MS SQL Server. Instructions: Check the instructions

More information

The Old Orchard Swim Club

The Old Orchard Swim Club The Old Orchard Swim Club Date: Sunday, July 10, 2016 Event: The 48 th Annual Bob Rueppel Mini-Meet Event Information Back in 1969 the Mini-Meet was established with the sole intent of encouraging 9 and

More information

Schema Refinement and Normalization

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

More information

IntroductiontoOBS. March 2013

IntroductiontoOBS. March 2013 IntroductiontoOBS March 2013 Dates Games from 7 to 23 of February By The Numbers 7 sports 15disciplines 98medal events 294 medals (gold, silver, bronze) 5,500 athletes 80 NOCs The Sochi 2014 Games venues

More information

THE OPEN UNIVERSITY OF TANZANIA FACULTY OF SCIENCE TECHNOLOGY AND ENVIRONMENTAL STUDIES BACHELOR OF SIENCE IN DATA MANAGEMENT

THE OPEN UNIVERSITY OF TANZANIA FACULTY OF SCIENCE TECHNOLOGY AND ENVIRONMENTAL STUDIES BACHELOR OF SIENCE IN DATA MANAGEMENT THE OPEN UNIVERSITY OF TANZANIA FACULTY OF SCIENCE TECHNOLOGY AND ENVIRONMENTAL STUDIES BACHELOR OF SIENCE IN DATA MANAGEMENT ODM 106.DATABASE CONCEPTS COURSE OUTLINE 1.0 Introduction This introductory

More information

Final Database Design Deliverables CS 265, Introduction to Database Management Systems, Spring 2015

Final Database Design Deliverables CS 265, Introduction to Database Management Systems, Spring 2015 Final Database Design Deliverables CS 265, Introduction to Database Management Systems, Spring 2015 Group 0 Douglas H. Fisher Each group will submit four items to complete Project 2. 1. Complete Design

More information

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

Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 Outline More Complex SQL Retrieval Queries

More information

23 rd ANNUAL CHALLENGE CUP TOURNAMENT

23 rd ANNUAL CHALLENGE CUP TOURNAMENT 23 rd ANNUAL CHALLENGE CUP TOURNAMENT Managers Registration Package May 15-18, 2015 Vancouver, British Columbia CHALLENGE CUP 2015 INTERNATIONAL AAA TOURNAMENT Dear Team Manager: The Challenge Cup selection

More information

Dutch Belgian DataBase Day v2006. A Database Armada. Fabian.Groffen@cwi.nl

Dutch Belgian DataBase Day v2006. A Database Armada. Fabian.Groffen@cwi.nl Dutch Belgian DataBase Day v2006 A Database Armada Fabian.Groffen@cwi.nl 2 Data explosion World Wide Web Digital Libraries SkyServer Computation and storage exhaustive 3 Current line of defence Huge monolithic

More information

Chapter 8. SQL-99: SchemaDefinition, Constraints, and Queries and Views

Chapter 8. SQL-99: SchemaDefinition, Constraints, and Queries and Views Chapter 8 SQL-99: SchemaDefinition, Constraints, and Queries and Views Data Definition, Constraints, and Schema Changes Used to CREATE, DROP, and ALTER the descriptions of the tables (relations) of a database

More information

Example Instances. SQL: Queries, Programming, Triggers. Conceptual Evaluation Strategy. Basic SQL Query. A Note on Range Variables

Example Instances. SQL: Queries, Programming, Triggers. Conceptual Evaluation Strategy. Basic SQL Query. A Note on Range Variables SQL: Queries, Programming, Triggers Chapter 5 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Example Instances We will use these instances of the Sailors and Reserves relations in our

More information

The Category Management Knowledge Group Presents...

The Category Management Knowledge Group Presents... The Category Knowledge Group Presents... Associate Category Certification! Retailers: -Category Managers -Store Managers Suppliers: -Category Analysts -Account Managers -Retail Sales Suite 200, 9 Arbour

More information

!! !! !! !! MARKET S)INTEREST)IN)INVESTING)IN)COMPANIES MARKET S)INTEREST)IN)INVESTING)IN)COMPANIES EXISTING)INVESTMENT)OPPORTUNITIES)AND)THE)CREATION) AND)DEVELOPMENT)OF)NEW)BUSINESSES MARKET

More information

Centennial Gala. www.centennialgala.com

Centennial Gala. www.centennialgala.com Centennial Gala Centennial Gala www.centennialgala.com Table Of Contents The Sikh Foundation Of Canada 3 Sikh Centennial Gala 4 Gala Honourees 5 Our Sponsors 6 Sponsorship Benefits 7 Sponsorship Categories

More information