KINGDOM OF SAUDI ARABIA-JAZAN UNIVERSITY COLLEGE OF COMPUTER SCIENCE & INFORMATION SYSTEMS 221 INFS 3 DATABASE SYSTEMS-1 REVIEW QUESTIONS

Similar documents
Relational Algebra Part I. CS 377: Database Systems

CS2300: File Structures and Introduction to Database Systems

Relational Algebra & Calculus. CS 377: Database Systems

The Relational Algebra

B.C.A DATA BASE MANAGEMENT SYSTEM MODULE SPECIFICATION SHEET. Course Outline

1/24/2012. Chapter 7 Outline. Chapter 7 Outline (cont d.) CS 440: Database Management Systems

PES Institute of Technology Bangalore South Campus (1 K.M before Electronic City,Bangalore ) Department of MCA. Solution Set - Test-II

We shall represent a relation as a table with columns and rows. Each column of the table has a name, or attribute. Each row is called a tuple.

CS403- Database Management Systems Solved Objective Midterm Papers For Preparation of Midterm Exam

Relational Databases

NOTE: DO NOT REMOVE THIS EXAM PAPER FROM THE EXAM VENUE

King Fahd University of Petroleum and Minerals

Chapter 6 - Part II The Relational Algebra and Calculus

COSC344 Database Theory and Applications. σ a= c (P) S. Lecture 4 Relational algebra. π A, P X Q. COSC344 Lecture 4 1

CS403- Database Management Systems Solved MCQS From Midterm Papers. CS403- Database Management Systems MIDTERM EXAMINATION - Spring 2010

CS 405G: Introduction to Database Systems

Database Systems ER Model. A.R. Hurson 323 CS Building

King Fahd University of Petroleum and Minerals

Mapping ER Diagrams to. Relations (Cont d) Mapping ER Diagrams to. Exercise. Relations. Mapping ER Diagrams to Relations (Cont d) Exercise

Class Information. Textbooks. Grading. Final Project. Grading. CS 440: Database Management Systems. Instructor:

Chapter 5. Relational Model Concepts 5/2/2008. Chapter Outline. Relational Database Constraints

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

Chapter 5. Relational Model Concepts 9/4/2012. Chapter Outline. The Relational Data Model and Relational Database Constraints

MIDTERM EXAMINATION Spring 2010 CS403- Database Management Systems (Session - 4) Ref No: Time: 60 min Marks: 38

Selections. Lecture 4 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 22, 2014

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

CS 377 Database Systems

Translation of ER-diagram into Relational Schema. Dr. Sunnie S. Chung CIS430/530

Top 88 Question Asked in Part I of MIS 150 EXAM #1 (Chapter 1-4, Appendix C) Exams questions gathered from old tests dating back to Fall 2000

Relational Database Systems Part 01. Karine Reis Ferreira

Relational Database design. Slides By: Shree Jaswal

MIT Database Management Systems Lesson 03: ER-to-Relational Mapping

PESIT Bangalore South Campus

Database Design Theory and Normalization. CS 377: Database Systems

Advanced Databases (SE487) Prince Sultan University College of Computer and Information Sciences

CS 327E Class 3. February 11, 2019

Views. Lecture 15 Section 5.3. Robb T. Koether. Hampden-Sydney College. Mon, Feb 18, 2013

More Relational Algebra

Relational Model. CS 377: Database Systems

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

Views. Lecture 15 Section 5.3. Robb T. Koether. Hampden-Sydney College. Mon, Feb 18, 2013

1 (10) 2 (8) 3 (12) 4 (14) 5 (6) Total (50)

Techno India Batanagar Computer Science and Engineering. Model Questions. Subject Name: Database Management System Subject Code: CS 601

DATABASE DEVELOPMENT (H4)

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

Entity Relationship Data Model. Slides by: Shree Jaswal

D.K.M COLLEGE FOR WOMEN(AUTONOMOUS),VELLORE DATABASE MANAGEMENT SYSTEM QUESTION BANK

DATABASE DESIGN PROCESS

Data Modeling Using the Entity-Relationship Model

Lecture3: Data Modeling Using the Entity-Relationship Model.

Views. Lecture 15. Robb T. Koether. Fri, Feb 16, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28

Query Processing & Optimization. CS 377: Database Systems

Chapter 5. The Relational Data Model and Relational Database Constraints. Slide 5-١. Copyright 2007 Ramez Elmasri and Shamkant B.

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 5-1

Insertions, Deletions, and Updates

Copyright 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 5-1

Database Management System (15ECSC208) UNIT I: Chapter 1: Introduction to DBMS and ER-Model

Distributed Database Systems By Syed Bakhtawar Shah Abid Lecturer in Computer Science

Score. 1 (10) 2 (10) 3 (8) 4 (13) 5 (9) Total (50)

Using High-Level Conceptual Data Models for Database Design A Sample Database Application Entity Types, Entity Sets, Attributes, and Keys

Review The Big Picture

A7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS

Represent entities and relations with diagrams

Translation of ER-diagram into Relational Schema. Dr. Sunnie S. Chung CIS430/530

EECS 647: Introduction to Database Systems

The Relational Model

VIEW OTHER QUESTION PAPERS

CS2255 DATABASE MANAGEMENT SYSTEMS QUESTION BANK UNIT I

Review for Exam 1 CS474 (Norton)

COSC344 Database Theory and Applications. Lecture 5 SQL - Data Definition Language. COSC344 Lecture 5 1

Chapter 2 Introduction to Relational Models

Translation of ER-diagram into Relational Schema. Dr. Sunnie S. Chung CIS430/530

Chapter 6: RELATIONAL DATA MODEL AND RELATIONAL ALGEBRA

ECE 650 Systems Programming & Engineering. Spring 2018

ER Model. Objectives (2/2) Electricite Du Laos (EDL) Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 1

DC62 Database management system JUNE 2013

CS275 Intro to Databases

CS 348 Introduction to Database Management Assignment 2

Mahathma Gandhi University

Contact Hours / week: 4 Total hours: 64. Table of Contents Architecture 3 Data Modeling Using the Entity-

namib I A U n IVERS I TY

2.2.2.Relational Database concept

Normalization. Murali Mani. What and Why Normalization? To remove potential redundancy in design

DATABASE DESIGN I - 1DL300

The Relational Model. Chapter 3. Comp 521 Files and Databases Fall

The Relational Model

E-R Diagram. Bagian I Entity Concept

Conceptual Data Models for Database Design

8) A top-to-bottom relationship among the items in a database is established by a

DATABASE DESIGN I - 1DL300

CS 377 Database Systems

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,

Birkbeck. (University of London) BSc/FD EXAMINATION. Department of Computer Science and Information Systems. Database Management (COIY028H6)

The Relational Algebra

GUJARAT TECHNOLOGICAL UNIVERSITY

Chapter 6 Part I The Relational Algebra and Calculus

Basant Group of Institution

THE ENTITY- RELATIONSHIP (ER) MODEL CHAPTER 7 (6/E) CHAPTER 3 (5/E)

Database Design Process

The Relational Model Constraints and SQL DDL

Transcription:

KINGDOM OF SAUDI ARABIA-JAZAN UNIVERSITY COLLEGE OF COMPUTER SCIENCE & INFORMATION SYSTEMS 221 INFS 3 DATABASE SYSTEMS-1 REVIEW QUESTIONS Chapter 1: Databases and Database Users 1. Define the following terms: data, database, DBMS, database system, database catalog, program-data independence, user view, DBA, end user, canned transaction, deductive database system, persistent object, meta-data, and transaction-processing application. 2. What are the responsibilities of the DBA and the database designers? 3. List down the advantages of using DBMS approach. 4. Discuss the differences between database systems and information retrieval systems. 5. What do you understand by database management systems (DBMS)? 1. What four main types of actions involve databases? Briefly discuss each. 2. What are the different types of database end users? Discuss the main activities of each. 3. Discuss the main characteristics of the database approach and how it differs from traditional file systems. 4. Briefly explain the advantages of using DBMS approach. 5. Draw a simplified diagram of a database system environment. Chapter 2: Database System Concepts and Architecture 1. Define the following terms: data model, database schema, database state, internal schema, conceptual schema, external schema, data independence, DDL, DML, SDL, VDL, query language, host language, data sublanguage, database utility. 2. List down the main categories of data models. 3. What is the difference between a database schema and a database state? 4. What is the difference between logical data independence and physical data independence? 5. Draw the diagram of three-schema architecture. 6. What is the difference between procedural and nonprocedural DMLs? Text book: Elmasri. R., Navath, S. "Fundamentals of Database Systems, Pearson International Edition, 6th Edition, 2015 P- 1 of 9

7. List down the different types of user-friendly interfaces. 8. With what other computer system software does a DBMS interact? 1. Discuss the main categories of data models. 2. Describe the three-schema architecture with the help of its diagram. 3. Discuss the different types of user-friendly interfaces and the types of users who typically use each. 4. Discuss some types of database utilities and tools and their functions. Chapter 3: Data Modeling Using the Entity-Relationship (ER) Model 1. Discuss the role of a high-level data model in the database design process. 2. What do you understand by Entity-Relationship model? 3. List the various cases where use of a NULL value would be appropriate. 4. Define the following terms: entity, attribute, attribute value, relationship instance, composite attribute, multivalued attribute, derived attribute, complex attribute, key attribute, and value set (domain). 5. Explain the difference between an attribute and a value set. 6. What is meant by a recursive relationship type? Give some examples of recursive relationship types. 7. Define the terms owner entity type, weak entity type, identifying relationship type, and partial key. 8. Construct a preliminary design of Department, Employee, Product, Car, Student, Teacher, Mobile, Class, book etc with all its possible attributes. 9. For the following binary relationships, suggest cardinality ratios based on the common- sense meaning of the entity types. Entity 1 Cardinality Ratio Entity 2 1. STUDENT SOCIAL_SECURITY_CARD 2. STUDENT TEACHER 3. CLASSROOM WALL 4. COURSE TEXTBOOK 1. What is an entity type? What is an entity set? Explain the differences among an entity, an entity type, and an entity set. 2. What is a relationship type? Explain the differences among a relationship instance, a relationship type, and a relationship set. 3. Discuss the conventions for displaying an ER schema as an ER diagram. 4. Draw a simplified diagram to illustrate the main phases of database design. Text book: Elmasri. R., Navath, S. "Fundamentals of Database Systems, Pearson International Edition, 6th Edition, 2015 P- 2 of 9

5. Draw an ER diagram of UNIVERSITY database, that captures all the given below requirements. Specify key attribute(s) of each entity set. For each relationship set, specify structural constraints and participation constraints. a. For each STUDENT, the university maintains student Name, student ID, SSN (Social Security Number), Address, Phone, Birthdate, Gender, Level, Major (CS, IS, CNET). Both Social Security Number and Student Number have unique values for each student. b. Each DEPARTMENT is described by a Name, Department code, Department Phone, and Office address. Both Name and Code have unique values for each department. c. Each COURSE has a Course Name, Description, Course Code, Credit Hours, Level, and Offering Department. The value of Course Code is unique for each course. d. Each SECTION is associated with an Instructor, Semester, Year, Course, and Section Number. The Section Number distinguishes sections of the same course that are taught during the same semester. 6. Draw an ER diagram of COMPANY database, that captures all the given below requirements. Specify key attribute(s) of each entity set. For each relationship set, specify structural constraints and participation constraints. a. For each DEPARTMENT, the company maintains Name, department Number, Manager, Location. Both Name and department Number have unique values for each student. b. Each PROJECT is described by a Name, Number, Location, and Controlling Department. Both Name and Number have unique values for each department. c. Each EMPLOYEE has a SSN, Name, Sex, Department, Address, and Salary. The value of SSN is unique for each employee, whereas Name, a composite attribute has Fname, Minit and Lname as a subpart of it. 7. Draw an ER diagram of ONLINE COURSE REGISRATION database, that captures all the given below requirements. Specify key attribute(s) of each entity set. For each relationship set, specify structural constraints and participation constraints. a. For each USER, the portal maintains user ID, Name, E-mail. Each user has a unique ID. Name is a composite attributes with Fname, Midname, Lname. b. Each COURSE is described by a course Code, Description, Category, and Term. Both Code and Term have unique values for each course. c. Each LECTUR has a lecturer Title ID, Duration, and Date. The value of ID is unique for each lecturer. Text book: Elmasri. R., Navath, S. "Fundamentals of Database Systems, Pearson International Edition, 6th Edition, 2015 P- 3 of 9

Chapter 4: The Relational Data Model and Relational Database Constraints 1. Define the following terms as they apply to the relational model of data: domain, attribute, n-tuple, relation schema, relation state, degree of a relation, relational database schema, and relational database state. 2. Why are duplicate tuples not allowed in a relation? 3. What is the difference between a key and a superkey? 4. Define key, Super key, Candidate key, Primary key, and foreign key. 5. Identify the Super key, Candidate key, Primary key, Foreign Key in the below relation. T_ID Name Department Course_Code# T001 Ali IS 221 T002 Hussain CS 452 T003 Rashid CET 443 T004 Khalid CS 443 6. What is a transaction? How does it differ from an Update operation? 7. Identify the Super key and Candidate key in the given relation. Book_ID Name Author B1 XYZ ALI B2 ABC ALI B3 XYZ HAMZA B4 PQR RASHID B5 RSP ALI B6 ABC RASHID 1. Compare three differences between primary key and foreign key. 2. Discuss the entity integrity and referential integrity constraints. 3. Consider the following relations for a database that keeps track of automobile sales in a car dealership (OPTION refers to some optional equipment installed on an automobile): CAR(SerialNo, Model, Manufacturer, Price) OPTION(SerialNo, OptionName, Price) SALE(SalespersoId, SerialNo, Date, Sale_price) SALESPERSON(SalespersonId, Name, Phone) Specify the foreign keys for this schema, stating any assumptions you make. Text book: Elmasri. R., Navath, S. "Fundamentals of Database Systems, Pearson International Edition, 6th Edition, 2015 P- 4 of 9

4. A Company relations database schema is given. Display the referential integrity constrains by specifying the foreign keys for this schema. 5. Consider the following relations database schema for a STUDENT that keeps track of student atteding the course. Specify the foreign keys for this schema, stating any assumptions you make. 6. Consider the following relations for a database that keeps track of student enrollment in courses and the books adopted for each course: STUDENT (SSN, Name, Major, Bdate) COURSE (Course#, Cname, Dept) ENROLL (SSN, Course#, Quarter, Grade) BOOK_ADOPTION(Course#, Quarter, Book_ISBN) TEXT(Book_ISBN, Book_Title, Publisher, Author) Draw a relational schema diagram specifying the foreign keys for this schema. 7. Consider the following relations for a database that keeps track of business trips of salespersons in a sales office: SALESPERSON(Ssn, Name, Start_year, Dept_no) TRIP(Ssn, From_city, To_city, Departure_date, Return_date, Trip_id) EXPENSE(Trip_id, Account#, Amount) A trip can be charged to one or more accounts. Specify the foreign keys for this schema, stating any assumptions you make. Text book: Elmasri. R., Navath, S. "Fundamentals of Database Systems, Pearson International Edition, 6th Edition, 2015 P- 5 of 9

Chapter 5: The Relational Algebra 1. List the operations of relational algebra and the purpose of each. 2. Explain urinary relation operation: SELECT and PROJECT with example. 3. How are the OUTER JOIN operations different from the INNER JOIN operations? 4. How is the OUTER UNION operation different from UNION? 5. EMPLOYEE a. Retrieve the records form EMPLOYEE whose department is 4. b. Select the tuples where salary > 40000. c. Retrieve the records of all employee who are Male and work for department number 5. 6. Use above relation EMPLOYEE and write the relational algebra query. a. List each employee s First name, Last name and salary. b. List First name, Last name and salary of all employees who work in department number 5. 7. Convert the given below relational algebra operation into relational query. a. Dno=4 (EMPLOYEE) b. Salary > 30,000 (EMPLOYEE) c. (Dno=4 AND Salary > 30,000) (EMPLOYEE) 8. Convert the given below relational algebra operation into relational query. a. Ssn,Fname,Bdate( Salary>39000(EMPLOYEE)) b. Fname, Lname, Salary( Dno=5(EMPLOYEE)) 1. Explain Relational Algebra Operations: UNION, INTERSECTION, DIFFERENCE (or MINUS, ) and CARTESIAN PRODUCT ( x ) with example. 2. What is union compatibility? Why do the UNION, INTERSECTION, and DIFFERENCE operations require that the relations on which they are applied be union compatible? 3. Consider the following GRADEBOOK relational schema describing the data for a grade book of a particular instructor. (Note: The attributes A, B, C, and D of COURSES store grade cutoffs.) CATALOG(Cno, Ctitle) STUDENTS(Sid, Fname, Lname, Minit) COURSES(Term, Sec_no, Cno, A, B, C, D) ENROLLS(Sid, Term, Sec_no) Text book: Elmasri. R., Navath, S. "Fundamentals of Database Systems, Pearson International Edition, 6th Edition, 2015 P- 6 of 9

i. Retrieve the names of students enrolled in the Automata class during the fall 2009 term. ii. Retrieve the Sid values of students who have enrolled in CSc226 and CSc227. 4. Retrieve the name and address of all employees who work for the Research department. 5. List the names of all employees in department 5 who work more than 10 hours per week on the Product X project. (Use above relation schema) 6. Employee a. Retrieve the first name, last name, and salary of all employees who work in department number 5 using RENAME operator. b. Retrieve the Social Security numbers of all employees who either work in department 5 or directly supervise an employee who works in department 5. (Use RENAME) c. Retrieve a list of names of each female employee s dependents using CARTESIAN PRODUCT. 2. Apply the set theoretic operation MINUS on the given tables and draw the result. a) STUDENT INSTRUCTURE b) INSTRUCTURE STUDENT STUDENT Fn Ln Susan Yao Ramesh Shah Johnny Kohler Barbara Jones Amy Ford Jimmy Wang Ernest Gilbert INSTRUCTURE Fname Lname John Smith Ricardo Browne Susan Yao Francis Johnson Ramesh Shah Text book: Elmasri. R., Navath, S. "Fundamentals of Database Systems, Pearson International Edition, 6th Edition, 2015 P- 7 of 9

3. Apply the set theoretic operation UNION, INTERSECTION on the given tables and draw the result. a) STUDENT U INSTRUCTURE b) STUDENT Ո INSTRUCTURE STUDENT Fn Ln Susan Yao Ramesh Shah Johnny Kohler Barbara Jones Amy Ford Jimmy Wang Ernest Gilbert INSTRUCTURE Fname Lname John Smith Ricardo Browne Susan Yao Francis Johnson Ramesh Shah Chapter 5: Functional Dependencies and Normalization for Relational Databases 1. Discuss insertion, deletion, and modification anomalies. Why are they considered bad? Illustrate with examples. 2. Define functional dependency with example. 3. Write down the informal design guideline for relation schema. 4. Why do we have NULL values in the relation? What are the demerits of it? 5. What undesirable dependencies are avoided when a relation is in 2NF? 6. What undesirable dependencies are avoided when a relation is in 3NF? 7. What is multivalued dependency? When does it arise? 1. Describe in detail the 1NF,2NF and also 3NF. 2. Discuss the guideline for 1NF, 2NF and 3NF. 3. Write the summary of normal form based on primary keys and corresponding normalization. 4. Discuss bottom-up and top-down design methodology. 5. Define first, second, and third normal forms when only primary keys are considered. How do the general definitions of 2NF and 3NF, which consider all keys of a relation, differ from those that consider only primary keys? Text book: Elmasri. R., Navath, S. "Fundamentals of Database Systems, Pearson International Edition, 6th Edition, 2015 P- 8 of 9

6. Decompose the given relation LOTS up to 3NF with its functional dependencies FD1, FD2, FD3 and FD4. Also draw its progressive summary tree. LOTS Candidate Key Property_Id# Country_name Lot# Area Price Tax_rate FD1 FD2 FD3 FD4 7. Consider the relation EMP_PROJ is in 1NF. Decompose the given relation into 2NF and 3NF with its functional dependencies FD1, FD2, and FD3. Text book: Elmasri. R., Navath, S. "Fundamentals of Database Systems, Pearson International Edition, 6th Edition, 2015 P- 9 of 9