1. Which is the main characteristic of the database approach?
(A) Self-describing nature of a database system
(B) Insulation between programs and data, and data abstraction.
(C\) Support of multiple views of the data.
(D) All of the above
2. Which is NOT an advantage of using the database approach?
(A) Controlling redundancy.
(B) Restricting unauthorized access
(C\) Providing persistent storage.
(D) Reduce complex relationships among data.
3. Which of the following statements about data models is NOT TRUE?
(A) Conceptual data models provide concepts that are close to the way many users perceive data.
(B) Physical data models provide concepts that describe details of how data is stored in the computer. These are usually specified in an ad hoc manner through DBMS design and administration manuals.
(C\) Implementation data models provide concepts that fall between the conceptual and physical data models and are also called representational data models.
(D) Self-describing data models combine the description of data with the data values. Examples include XML, Key-value stores, and relational data models.
4. Which of the following statements is NOT TRUE?
(A) The three-schema architecture defines the following three levels: external level, transitional level, and internal level.
(B) The three-schema architecture can be used to support logical data independence and physical data independence.
(C\) A data model is a collection of concepts that can be used to describe the structure of a database. By the structure of a database, we mean the data types, relationships, and constraints that apply to the data.
(D) Data independence means that when a schema at a lower level is changed, only the mappings between lower-level and higher-level schemas need to be changed, and the higher-level schemas remain unchanged.
5. Which of the following statements is NOT TRUE?
(A) The delete operation can violate only referential integrity.
(B) A relational database schema is a set of relation schemas and a set of integrity constraints.
(C\) Implicit constraints include domain constraints, key constraints, constraints on NULLs, entity integrity constraints, and referential integrity constraints.
(D) The referential integrity constraint states that a tuple in one relation that refers to another relation must refer to an existing tuple in that relation.
6. Which of the following statements regarding the relational model is NOT TRUE?
(A) Tuples in a relation do not have any particular order.
(B) The degree (or arity) of a relation is the number of attributes of the relation schema.
(C\) The order of attributes and their values is not important even though the correspondence between attributes and values is maintained.
(D) In general, a relation schema may have more than one key. In this case, each of the keys is called a candidate key.
7. A referential integrity constraint policy that ensures the records with a foreign key are updated when the primary key of the referring record in the reference relation is updated is called a
(A) incremental update.
(B) incremental delete.
(C\) cascading update.
(D) cascading delete.
8. Which is NOT a meaning for NULL values?
(A) Attribute does not apply to this tuple.
(B) The value is beyond the domain range.
(C\) Attribute value is unknown.
(D) Values exist but are not available.
9. Which of the following statements is NOT TRUE?
(A) A 'minimal' superkey is a key.
(B) Any key is a superkey but not vice versa.
(C\) If a relation has several candidate keys, one is chosen arbitrarily to be the primary key.
(D) A foreign key must always reference the primary key of a relation.
10. Which of the following statements is NOT TRUE?
(A) A subclass is called a category or union type if the subclass has a single superclass/subclass relationship with more than one superclass.
(B) In a specification lattice, a subclass can be a subclass of more than one superclass.
(C\) A specification hierarchy has a constraint that every subclass has more than one superclass.
(D) A subclass with more than one superclass is called a shared subclass.
A:
DDDAC
BCBDC
5.
Consider the following relations form part of a database for a hotel-reservation application:
```
HOTEL(hotelNo, hotelName, City)
ROOM(roomNo, hotelNo, type, price)
BOOKING(hotelNo, guestNo, dateFrom, dateTo, roomNo)
GUEST(guestNo, guestName, guestAddress)
```
Specify the following operation/queries in SQL.
(a) List the price and type of all rooms at Howard Hotel.
(b) List the details of all rooms at the Howard Hotel, including the name of the guest staying in the room if the room is occupied.
(c\) List all single rooms with a price velow $300 per night.
(d) List all huests currently staying at the Howard Hotel.
(e) Create the table for the realtion ROOM. Assume that the data types of attribute arre as follows: roomNo is 5 charaters (e.g. '10001', '02020'), hotelNo is 5 characters (e.g., 'TW001','US002'), type is 10 characters with variable length (e.g. 'single', 'double', 'family'), and prive is integer. Please specify the corresponding constraints, such as key and referential integrity constraints.