Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
161 views

Assignment 1

This document contains assignments and questions related to database management systems. It covers topics such as defining database terms, differentiating between DBMS and file systems, responsibilities of a DBA, database models, relationships and constraints in relational databases, and writing SQL queries and updates. The assignments include defining terms, differentiating concepts, explaining database architectures and schemas, specifying keys and constraints for schemas, and writing SQL statements.

Uploaded by

Ankit Yadav
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
161 views

Assignment 1

This document contains assignments and questions related to database management systems. It covers topics such as defining database terms, differentiating between DBMS and file systems, responsibilities of a DBA, database models, relationships and constraints in relational databases, and writing SQL queries and updates. The assignments include defining terms, differentiating concepts, explaining database architectures and schemas, specifying keys and constraints for schemas, and writing SQL statements.

Uploaded by

Ankit Yadav
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment 1

Date: 9th May, 2021


(Note: Copied assignments will be given zero marks)

Chapter 1
1.1. Define the following terms:
a) Database catalog and meta-data,
b) Program-data independence,
c) DBA
d) Canned transactions,
e) Deductive database system,
f) Persistent object,
g) Transaction-processing application.

1.2. Differentiate between Database management system and Traditional file systems.

1.3 What are the responsibilities of the DBA? Explain in detail.

1.4 Briefly explain the main activities different types of database end users (30 words for each type of user)
perform.

1.5. Briefly discuss 10 advantages (40 words each) of DBMS.

1.6 Answer the following:


a) Identify 10 informal (in english language not sql) queries and update operations that you would expect to apply to
the database shown in Figure 1.2.
b) Also specify all the relationships among the records of the database.
c) Cite some examples of integrity constraints that you think can apply to the database

1.7 What is the difference between controlled and uncontrolled redundancy? Illustrate with examples.

Chapter 2
2.1. Define the following terms:
a) Data model,
b) Data independence,
c) Client/Server architecture

2.2. Differentiate between the following:


a) Database schema and Database state,
b) Internal schema, Conceptual schema, External schema
c) Relational model, the Object model, and the XML model
d) Procedural and Non-procedural DMLs
e) Logical data independence and Physical data independence
f) two-tier and three-tier client/server architectures

2.3. Explain the three-schema architecture and mappings among schema levels. How is this architecture
supported by schema definition languages?

2.4 Name few software with which DBMS interacts?

Chapter 5
5.1. Define the following terms:
a) Domain,
b) n-tuple,
c) Degree of a relation

5.2. Differentiate between following:


a) Key and Superkey
b) Intension and Extension

5.3. Why are tuples not ordered and duplicate tuples not allowed in a relation?

5.4. Why do we designate one of the candidate keys of a relation to be the primary key?

5.5. What is the significance of NULL values in relations?

5.6. Explain entity integrity and referential integrity constraints with the help of examples.

5.7. What is a transaction? How does it differ from an Update operation?

5.8. Consider the following six relations for an order-processing database application in a company:
CUSTOMER(Cust#, Cname, City)
ORDER(Order#, Odate, Cust#, Ord_amt)
ORDER_ITEM(Order#, Item#, Qty)
ITEM(Item#, Unit_price)
SHIPMENT(Order#, Warehouse#, Ship_date)
WAREHOUSE(Warehouse#, City)

Here, Ord_amt refers to total dollar amount of an order; Odate is the date the order was placed; and Ship_date is the
date an order (or part of an order) is shipped from the warehouse. Assume that an order can be shipped from several
warehouses. Specify the primary key and foreign keys for this schema, stating any assumptions you make. What other
constraints can you think of for this database?

5.9. 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)

Specify the primary key and foreign keys for this schema, stating any assumptions you make.

Chapter 6
6.1 Consider the database schema shown below. What are the entity and referential integrity constraints that
should hold on the schema? Write appropriate SQL DDL statements to define the database.

STUDENT
Roll_no Student_name Class Major

COURSE
Course_no Course_name Credit_hrs Dept

PREREQUISITE
Course_no Prerequisite_no

SECTION
Section_id Course_no Sem Year Instructor

GRADE_REPORT
Roll_no Section_id Grade
6.2 Consider the relational database schema shown below. Choose the appropriate action (reject, cascade, set
to NULL , set to default) for each referential integrity constraint, both for the deletion of a referenced tuple
and for the update of a primary key attribute value in a referenced tuple. Justify your choices.

Reference_Book
Book# Title Publisher

Author
Book# Author_name

Publisher
Name Address Phone

Book_Copies
Book# Branch# No_of_copies

Branch
Branch# Branch_name Address

Borrower
Card_no Name Address Phone

6.3 Write the following queries in SQL on the relational database schema shown below.

EMPLOYEE
Ssn Fname Lname Bdate Address Salary Super_ssn Dno

DEPT
Dnum Dname Mgr_ssn Mgr_startdate

WORKS_ON
Wssn Pno Hours

PROJECT
Pnum Pname Dnum

DEPENDENT
Essn Dep_name Bdate Relationship

a. List the names of all employees who have a dependent with the same first name as themselves.
b. Fetch the names of all employees in Dept ‘Sales’ who work less than 40 hours per month on the project ‘ITEM-X’.
c. Find the names of all employees who are directly supervised by ‘Mr. Verma’.

6.4. Write SQL update statements to do the following on the database schema shown in question 6.1.

a. Insert a new student, <‘Mary’, 17, 1, ‘Eng’>, in the database.


b. Change the class of student ‘Sara’ to 2.
c. Insert a new course, <‘Software Engineering’, ‘cs123’, 1, ‘cs’>.
d. Delete the record for the student whose name is ‘Sunil’ and whose student number is 22.

You might also like