Database Systems. Answers

Similar documents
Database Systems CSE Comprehensive Exam Spring 2005

Example: specific person, company, event, plant

Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity Sets Extended E-R Features Design of the Bank Database Reduction to

Chapter 2: Relational Model

1. (a) Explain the Transaction management in a database. (b) Discuss the Query Processor of Database system structure. [8+8]

QQ Group

Northern India Engineering College, New Delhi Question Bank Database Management System. B. Tech. Mechanical & Automation Engineering V Semester

Lecture 14 of 42. E-R Diagrams, UML Notes: PS3 Notes, E-R Design. Thursday, 15 Feb 2007

Relational Algebra. Relational Algebra. 7/4/2017 Md. Golam Moazzam, Dept. of CSE, JU

A database can be modeled as: + a collection of entities, + a set of relationships among entities.

Database System Concepts

Chapter 6: Entity-Relationship Model

Database System Concepts, 5 th Ed.! Silberschatz, Korth and Sudarshan See for conditions on re-use "

Chapter 2: Entity-Relationship Model. Entity Sets. Entity Sets customer and loan. Attributes. Relationship Sets. A database can be modeled as:

Chapter 3: Relational Model

CS34800 Information Systems. The Relational Model Prof. Walid Aref 29 August, 2016

Entity-Relationship Modelling. Entities Attributes Relationships Mapping Cardinality Keys Reduction of an E-R Diagram to Tables

DBMS: AN INTERACTIVE TUTORIAL

1. Considering functional dependency, one in which removal from some attributes must affect dependency is called

Lecture 11 - Chapter 8 Relational Database Design Part 1

Chapter 6: Formal Relational Query Languages

DATABASE MANAGEMENT SYSTEM

Chapter 6: Entity-Relationship Model

DATABASE TECHNOLOGY. Spring An introduction to database systems

A7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS

Textbook: Chapter 6! CS425 Fall 2013 Boris Glavic! Chapter 3: Formal Relational Query. Relational Algebra! Select Operation Example! Select Operation!

DATABASE DESIGN I - 1DL300

Chapter 5: Other Relational Languages

Comp 5311 Database Management Systems. 2. Relational Model and Algebra

Chapter 6: Entity-Relationship Model. The Next Step: Designing DB Schema. Identifying Entities and their Attributes. The E-R Model.

Relational Model. Prepared by: Ms. Pankti Dharwa ( Asst. Prof, SVBIT)

The Next Step: Designing DB Schema. Chapter 6: Entity-Relationship Model. The E-R Model. Identifying Entities and their Attributes.

Code No. : 9919 Sub. Code : HCAM 35

Chapter 7: Relational Database Design

Chapter 6: Entity-Relationship Model

COMP Instructor: Dimitris Papadias WWW page:

Other Relational Query Languages

CSCC43H: Introduction to Databases. Lecture 4

ERRATA for Database System Concepts, 5 th Edition Silberschatz, Korth, and Sudarshan. March 19, 2007

CSCC43H: Introduction to Databases. Lecture 3

CS352 - DATABASE SYSTEMS. To give you experience with developing a database to model a real domain

Chapter 6: Entity-Relationship Model. E-R Diagrams

The SQL database language Parts of the SQL language

SQL QUERIES. CS121: Relational Databases Fall 2017 Lecture 5

Chapter 8: Relational Algebra

CS352 - DATABASE SYSTEMS

customer = (customer_id, _ customer_name, customer_street,

Simple SQL Queries (2)

FINAL EXAM REVIEW. CS121: Introduction to Relational Database Systems Fall 2018 Lecture 27

6.1 RELATIONSHIP CONCEPTS

Other Query Languages II. Winter Lecture 12

Homework Assignment 3. November 9th, 2017 Due on November 23th, 11:59pm (midnight) CS425 - Database Organization Results

CS121 MIDTERM REVIEW. CS121: Relational Databases Fall 2017 Lecture 13

Chapter 6: Relational Database Design

Chapter 3: SQL. Database System Concepts, 5th Ed. Silberschatz, Korth and Sudarshan See for conditions on re-use

Chapter 3: SQL. Chapter 3: SQL

Upon completion of this Unit, students will be introduced to the following

Silberschatz, Korth and Sudarshan See for conditions on re-use

A subquery is a nested query inserted inside a large query Generally occurs with select, from, where Also known as inner query or inner select,

CS2255 DATABASE MANAGEMENT SYSTEMS QUESTION BANK UNIT I

Entity-Relationship Model

The Relational Model

Chapter 6: Entity-Relationship Model

CSIT5300: Advanced Database Systems

Database System Concepts, 5th Ed.! Silberschatz, Korth and Sudarshan See for conditions on re-use "

Sankalchand Patel College of Engineering, Visnagar B.E. Semester III (CE/IT) Database Management System Question Bank / Assignment

NORMAL FORMS. CS121: Relational Databases Fall 2017 Lecture 18

UNIT II A. ENTITY RELATIONSHIP MODEL

Chapter 2: Entity-Relationship Model

Databases Tutorial. January 19,2012 Jing Chen Mcmaster University

Data about data is database Select correct option: True False Partially True None of the Above

VIEW OTHER QUESTION PAPERS

CMSC 424 Database design Lecture 18 Query optimization. Mihai Pop

ACS-3902 Fall Ron McFadyen 3D21 Slides are based on chapter 5 (7 th edition) (chapter 3 in 6 th edition)

MaanavaN.Com DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING QUESTION BANK

Database Management Systems LECTURE NOTES 2

Normal Forms. Winter Lecture 19

Chapter 4: SQL. Basic Structure

DATABASE DESIGN - 1DL400

2. E-R Model. Entity Sets Relationship Sets Attributes

Lecture 3 SQL. Shuigeng Zhou. September 23, 2008 School of Computer Science Fudan University

Contents Contents Introduction Basic Steps in Query Processing Introduction Transformation of Relational Expressions...

DATABASE TECHNOLOGY - 1MB025

Information Systems and Software Systems Engineering (12CFU)

CSIT5300: Advanced Database Systems

ENTITY-RELATIONSHIP MODEL III. CS121: Relational Databases Fall 2017 Lecture 16

DATABASTEKNIK - 1DL116

CSIT5300: Advanced Database Systems

Chapter A: Network Model

Overview of Database Design Process Example Database Application (COMPANY) ER Model Concepts


DATABASE DESIGN I - 1DL300

Basic Concepts. Chapter A: Network Model. Cont.) Data-Structure Diagrams (Cont( Data-Structure Diagrams. Basic Concepts

Database Management Systems

Data Modeling with the Entity Relationship Model. CS157A Chris Pollett Sept. 7, 2005.

DATABASE TECHNOLOGY - 1MB025

Relational model continued. Understanding how to use the relational model. Summary of board example: with Copies as weak entity

Introduction. Identifying potential problems, update anomalies, in the design of a relational database Methods for correcting these problems

DATABASE DESIGN - 1DL400

BRANCH(branch_name: string, branch_city:string, assets:real) ACCOUNT(accno: int, branch_name:string, balance: real)

Transcription:

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 goal of a database management system (DBMS)? Question 3 Under what circumstances would one consider using a file based system instead of a DBMS? Question 4 Differentiate between a database schema and a database instance. Question 5 What does the term relation imply in a relational model? Question 6 Describe the basic steps of a database design. Question 7 What is an entity-relationship (E-R) data model? The E-R model was developed to facilitate database design by allowing specification of an enterprise schema that represents the overall logical structure of a database. Question 8 The E-R database model employs three basic concepts: entity sets, relationship sets, and attributes. Briefly describe each concept.

Question 9 Provide an example of a Simple and a Composite attribute. Question 10 Provide an example of a Single-valued and multivalued attribute. Is there a preference between the two types of attribute? Question 11 What is a derived attribute? Question 12 Explain the purpose of a key. Question 13 Explain the difference between a Super Key, Candidate Key, and Primary Key. Question 14 Determine the primary keys for the database schema below. Employee (SS#, FirstName, LastName, Title, LaborGrade, Salary) Works (SS#, CompanyName, Division,) Company (CompanyName, Division, City) Manages (SS#, ManagerSS#) Question 15 Provide the E-R diagram for the database schema in Question #14.

Question 16 Explain the difference between a weak and strong entity set. Question 17 The Entity Relationship Diagram below shows that a Person owns a number of cars and each vehicle is insured by an insurance company. The Insurance policy may insure more than one car, which makes the Insurance Entity a weak entity. a) Create the Relational Tables for the EER Diagram. b) Provide the set of Candidate keys and Primary keys for each Relational Table. First Name Last Name SS # Vehicle ID Type Make Person Has Vehicle Birth Date Age Gender Year Doors Color Expiration Date # of Accidents Insurance Cost Policy # Cost per Accident Question 18 What information does Specialization provide in an E-R diagram? Question 19 Is SQL a procedural or non-procedural language? Explain your answer. Question 20 Provide the Create SQL statement for the given entity below. Assume all attributes are of type varchar(50). Company (CompanyName, Division, City)

Question 21 Consider the database schema below. Assume the natural join is not implemented in the database. Provide SQL queries for the following: Find the names of all employees who work for the FBC division. Find the names of those employees who work for FBC and have a salary less than $48,000. Sort the data by the employee s last name. Provide a 5% pay increase to all employees with a salary greater than $64,000, and provide a 7% pay increase to all other employees. Employee (SS#, FirstName, LastName, Title, LaborGrade, Salary) Works (SS#, CompanyName, Division,) Company (CompanyName, Division, City, State, Zip) Manages (SS#, ManagerSS#) Question 22 Consider the database schema in Question #21. Using the natural join, provide the SQL query for the following: Provide the FirstName, LastName, LaborGrade, City, State, and Zip code for those employees working at the CI division. Question 23 Consider the database schema in Question #21. Provide a list of employee names that work in Orlando and have Mary Brown as manager. Question 24 Consider the database schema below. Determine the Primary Key for each entity. Branch (BranchName, BranchCity, Assets) Customer (CustomerName, SS#, Street, City, State, ZipCode) Account (AccountNumber, BranchName, Balance) Loan (LoanNumber, BranchName, Amount) Depositor (SS#, AccountNumber) Borrower (SS#, LoanNumber)

Question 25 Provide the SQL queries for the following: a) Find the names of all branches in the loan relations. b) Find all customers that have a loan and an account at the same branch name. Question 26 Find the loan number of those loans with loan amounts between $30,000 and $50,000. Question 27 List in alphabetic order the names of all customers having a loan in the Orlando branch Question 28 Find all customers who have a loan, an account, or both. Sort the data in ascending order by customer s last name. Question 29 Find the average account balance at the Orlando branch. Question 30 Provide a gift of $50 to all customers who have an account at the Orlando branch. Question 31 Show the results of a left outer join. Loan Number Branch Name Amount Customer Name Loan Number L170 DownTown 3000 Jones L170 L230 Redwood 4000 Smith L230 L260 Perryrigde 1700 Hayes L155

Question 32 Provide an example of a loss-less join decomposition. Ensure you provide an adequate explanation for your example. Question 33 Suppose a relation schema R is decomposed into {R1, R2}. What conditions must hold true to ensure the decomposition is loss-less. Question 34 Suppose a relation schema R = {A, B, C, D} with functional dependencies F = {AB, AC, CD} is decomposed into R1 = {A, B, C} and R2 = {C, D}. The functional dependencies for R1 is F1={AB, A C} and the functional dependency for R2 is F2 = {CD}. Is the decomposition R = {R1, R2} a loss-less join decomposition, Yes or No? Provide an explanation for your answer. Question 35 a) Define first normal form (1NF). b) Define second normal form (2NF). c) Define third normal form (3NF). Question 36 Convert the database schema below into 3rd Normal Form. Employee ( SS#, Project-Number, First-Name, Last-Name, Street, Zip, Project-Name, Project- Location) Address (Zip, City, County, State)