Professional Documents
Culture Documents
A1 - E1-1-to-E1-6 Database System
A1 - E1-1-to-E1-6 Database System
Yashraj Kunwar
3125511
Database Systems – ACS-3902-003-U2022W
Due date : 1/16/2023
Exercise 1.1 Communication with the Lecturer
What is the format of an email you would send to Dr. Beck concerning this
lecture? In particular:
• What must the subject-line of your email be?
- The email should contain the name and student-id along with the subject line.
Exercise 1.2
Which of these examples are in dom(𝐴1 ) × … × dom(𝐴5)? For those which are
not explain why!
This relation needs to output result of 5-tuples which means these tuples should
contain 5 values inside it.
• <MBX-24 New York, T202012, Jaguar, XJS, 12> Incorrect, License number should
have city name in the front of it.
• <New York MBX-24, T202012, Jaguar, 12, XJS> Model year should be at last , incorrect
This is in dom(𝐴1 ) × … × dom(𝐴5) as it contains 5-tuple.
Exercise 1.3
Formally,
Given R(A1, A2, .........., An)
r(R) dom (A1) X dom (A2) X ....X dom(An)
R(A1, A2, ..., An) is the schema of the relation
R is the name of the relation
Whereas,
Exercise 1.4
Determine for each of the following constraints whether they are an “implicit
constraint”, an “explicit
constraint”, or a “semantic constraint”:
Semantic constraint
Explicit constraint
Implicit constraint
Explicit constraint
Impilicit constraint
Implicit constraint
• The value of primary keys of a relation must be distinct for each distinct tuple
Explicit constraint
Exercise 1.5
Suppose that each of the following Update operations is applied directly to the
database state shown
in Figure 5.6. Discuss all integrity constraints violated by each operation, if any,
and the different
ways of enforcing these constraints.
- There is no violation
- There is no violation
- There is a violation in key constraint i.e. the value of the key attribute ‘4’
already exists in the another tuple in the relation
- There is a violation
It violates key constraint : Attribute value I.e 453453453 is already in use by
another attribute because of which we cannot insert it
There is no violation
There is a violation
There is no violation
There is no violation
k. Modify the Hours attribute of the WORKS_ON tuple with Essn = ‘999887777’
and Pno = 10 to
‘5.0’.
There is no violation
Exercise 1.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)
Specify the foreign keys for this schema, stating any assumptions you make