HOMEWORK 1 Part 1 1. Give 3 examples of transactions, other than an ATM bank withdrawal, in which a real-world event occurs if and only if the transaction commits. 2. State 3 possible integrity constraints for the database in an airline reservation system. 3. The schema of the Student Registration System includes the number of current registrants and a list of registered students in each course. a. What integrity constraint relates this data? b. How might a registration transaction that is not atomic violates this constraint? c. Suppose the system also implements a transaction that displays the current information about a course. Give a non-isolated schedule in which the transaction displays inconsistent information. 4. Exercise 1.8 page 24 (or 1.8 page 20) depending on the version of your book. Part 2 1. Let S= {emptyset,a,b} and T={(1,5),2,3}. a. What are |S| and |T| equal to? b. How many subsets does T have? Why? c. List all the subsets of T. d. Compute S X T? e. Compute T X S? f. Is A X B = B X A for all sets A and B? Why? g. What are |S X T| and |T X T| equal to? h. Is |A X B| = |B X A| for all sets A and B? Why? i. Define a relation from S to T by a set. j. How many relation from S to S are there? Why? 2. Consider the relation Loan. Loan={(111,900,5/5/1972),(121,600,10/6/1980),(122,500,12/12/1990),(110,200,6/10/1992),(75,1000,9/9/2000)} Represent the relation Loan by a table. Note: A line in the table means: ``The loan number x is of amount y and was made on the date d''. Part 3 1. Cardinality: a. The Tiny College administration limits the professor to teaching a maximum of 3 classes per semester. If Tiny College has research professorships, a professor may not teach any class at all. What is the cardinality of the relationship type Teaches between the entity types Professor and Class? Explain. Draw the E-R diagram. b. The tiny College administration limits also a student to a maximum of 6 classes a semester and class size are limited to 35 student. What is the cardinality of the relationship type EnrollsIn between the entity types Student and Class? Explain. Draw the E-R diagram. 2. Draw the E-R diagram associated to the following specification. You must show all the steps that make you achieve your final E-R diagram (entity types, attributes, relationship types, cardinalities, IsA, covering and disjoint constraints...) Authors (entity type Person) submit documents (entity type manuscript) to editors for publication. Editors might refuse the manuscript immediately or submit the manuscript to referees (relationship type Examination). Referees give their opinion (attributes opinion and date_opinion). If referees give good reports, editors can decide to produce the manuscript as a book (entity type Book and relationship type edition).