Assignment DBMS
Assignment DBMS
1
Pa g e | 2
ASSIGNMENT 1
CHAPTER 1
Q1. 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.
A2.
Pa g e | 5
Allocating system storage and planning storage
requirements for the database system
Modifying the database structure, as necessary, from
information given by application developers
Enrolling users and maintaining system security
Ensuring compliance with database vendor
license agreement
Controlling and monitoring user access to the
database
Monitoring and optimizing the performance of the
database
Planning for backup and recovery of database
information
Maintaining archived data
The more users access the data, the greater the risks of data
security breaches. Corporations invest considerable amounts
of time, effort, and money to ensure that corporate data are
used properly. A DBMS provides a framework for better
enforcement of data privacy and security policies.
A6.
a) Informal Queries:-
Update Operations:-
b)
(1) Each SECTION record is related to a COURSE record.
Controlled
redundancy
P a g e | 16
Uncontrolled redundancy
ASSIGNMENT 1
CHAPTER 2
Q1. Define the following terms:
a) Data model,
b) Data independence,
c) Client/Server architecture
A2. a)
Database Schema Database State
b)
Internal Schema Conceptual Schema External Schema
d)
e)
f)
Two – Tier Client Three – Tier Client
Architecture Architecture
It is a Client-Server It is a Web-based
Architecture. application.
A4.
ASSIGNMENT 1
CHAPTER 5
A1.
a) A domain is a unique set of values permitted for an
attribute in a table. For example, a domain of month-of-
year can accept January, February….December as
possible values, a domain of integers can accept whole
numbers that are negative, positive and zero.
A2. a)
Key Super Key
b)
P a g e | 28
Intensio Extensio
n n
A5.
In a database, zero is a value which has meaning, so the
value NULL became is a special marker to mean that no
value exists. In that sense, NULL does not refer to a
memory location, as it does for programming
languages. In a database, the NULL value indicates a
lack of a value.
Any column that is part of a KEY must not allow
NULLs, but for other fields, it's completely up to you.
Including the NOT NULL clause next to your column
definitions at table creation time will force the user
to
P a g e | 30
A8.
CREATE TABLE CUSTOMER ( CUST# NUMBER(5),
CNAME VARCHAR (15) NOT NULL,
CITY VARCHAR (15),
PRIMARY KEY(CUST#) );
P a g e | 33
PRIMARY KEY(WAREHOUSE#) );
Specify the primary key and foreign keys for this schema,
stating any assumptions you make.
A9.
MARKS NUMBER(3),
PRIMARY KEY(REGNO,COURSE#,SEM),
FOREIGN KEY(REGNO) REFERENCES
STUDENT(REGNO),
FOREIGN KEY(COURSE#) REFERENCES
COURSE(COURSE#) );
ASSIGNMENT 1
CHAPTER 6
Q1. 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
PREREQUI
SITE
Course_no
Prerequisite_no
P a g e | 38
SECTION
Section_id Course_no
Sem
Year
Instructor
GRADE
_REPO
RT
Roll_no
Section_id
Grade
CreditHours INTEGER,
Department CHAR(4),
PRIMARY KEY (CourseNumber),
UNIQUE (CourseName));
Reference_Book
Book#
Title
Publisher
Author
Book#
Author_name
Publisher
Name
Address
Phone
Book_Co
pies
Book#
P a g e | 42
Branch#
No_of_copies
Branch
Branch# Branch_name
Address
Borrower
Card_no Name
Address Phone
BOOK_COPIES.(BranchId) -->
LIBRARY_BRANCH.(BranchId)CASCADE on both
DELETE or UPDATE (if a LIBRARY_BRANCH is
deleted, or the value of its BranchId is updated
(changed),
P a g e | 44
BOOK_LOANS.(BranchId) -->
LIBRARY_BRANCH.(BranchId)CASCADE on both
DELETE or UPDATE (if a LIBRARY_BRANCH is
deleted, or the value of its BranchId is updated (changed),
the deletion or change is automatically propagated to the
referencing BOOK_LOANS tuples
EMPLOYEE
Ssn Fname Lname
Bdate
Address
Salary
P a g e | 45
Super_ssn Dno
DEPT
Dnum
Dname
Mgr_s
sn
Mgr_st
artdate
WOR
KS_O
N
Wssn
Pno
Hours
PROJ
ECT
Pnum
Pname
Dnum
P a g e | 46
Bdate
Relationship
A3.
a)SELECT E.Fname||E.Lname as ‘Name’
FROM EMPLOYEE E, DEPENDENT D
WHERE E.Fname = D.DE_name;
A4.
P a g e | 48