Q1 Explain the distinction between total and partial constra
Q1. Explain the distinction between total and partial constraints.
Q2. Explain the difference between a weak and a strong entity set.
Q3. Explain the distinction between condition-defined and user-defined constraints. Which of these constraints can the system check automatically? Explain your answer
Q4. Design a database for an airline. The database must keep track of customers and their reservations, flights and their status, seat assignments on individual flights, and the schedule and routing of future flights. (Your design should include an E-R diagram, a set of relational schemas, and a list of constraints, including primary-key and foreign-key constraints.)
Solution
1)
Total constraints are those in which a table\'s existence requires the existence of an associated table in a particular defined relation between them
Partial constraints are involved with the tables in which presence of one table is partial for the associated table
2)
A strong entity set has a primary key. All tuples in the set are distinguishable by that key. A weak entity set has no primary key unless attributes of the strong entity set on which it depends are included. Tuples in a weak entity set are partitioned according to their relationship with tuples in a strong entity set. Tuples within each partition are distinguishable by a discriminator, which is a set of attributes.
3)
>In a generalization – specialization hierarchy, it must be possible to decide which entities are members of which lower level entity sets. In a condition defined design constraint, membership in the lower level entity-sets is evaluated on the basis of whether or not an entity satisfies an explicit condition or predicate.User-defined lower-level entity sets are not constrained by a membership condition; rather, entities are assigned to a given entity set by the database user.
>Condition-defined constraints alone can be automatically handled by the system. Whenever any tuple is inserted into the database, its membership in the various lower level entity-sets can be automatically decided by evaluating the respective membership predicates. Similarly when a tuple is updated, its membership in the various entity sets can be re-evaluated automatically.
