Professional Documents
Culture Documents
Chapter 6-Relational Databases and SQL: True/False
Chapter 6-Relational Databases and SQL: True/False
TRUE/FALSE
ANS: T
ANS: F
ANS: F
4. A key attribute is the attribute whose value is unique for every entity that will appear in the database.
ANS: T
5. The customer street address is often used as the key attribute in an REA diagram.
ANS: F
ANS: F
ANS: F
8. Relationships define and map the way in which data can be extracted from a database in the future.
ANS: T
ANS: T
10. The DBMS approach yields data redundancies when a supervisor is supervised by a third employee.
ANS: F
11. A recursive relationship is created when there is an employee being supervised, and another employee
is the supervisor.
ANS: T
12. Cardinality constraints relate to the specification of how many occurrences of an entity can participate
in a given relationship with any one occurrence of the other entity in the relationship.
ANS: T
13. The cardinality constraint is used to specify both the minimum and maximum participation of one
entity in the relationship with the other entity.
ANS: F
14. The notation 1,N is used to specify the relationship type of one to many.
ANS: T
15. The notation of (1,1) is used to specify the relationship type of one to many.
ANS: F
ANS: F
17. The fundamental requirement for moving toward an event driven model is the complete integration of
data related to an organization’s business events.
ANS: T
18. Enterprise systems are integrated software packages designed to provide complete integration of an
organization's business information processing systems and all related data.
ANS: T
19. A collection of data representing multiple occurrences of an object, event, or agent is known as a
relation.
ANS: T
20. A set of data that describes an instance of the entity represented by a relation is known as a tuple.
ANS: T
ANS: F
22. The secondary key is specified to identity each tuple in the relation.
ANS: F
23. SQL is a powerful database language that can be used to define database systems, query the database
for information, generate reports from the database, and access databases from within programs using
embedded commands.
ANS: T
24. Referential integrity specifies that for every attribute in one relation that has been specified to allow
reference to another relation, the tuple being referenced must be intact.
ANS: T
ANS: F
26. Most DBMS programs today that include SQL also include mechanisms within the DBMS itself for
enforcing referential integrity.
ANS: T
27. The INSERT command is used to add a single tuple to an existing relation.
ANS: T
28. The UPDATE command demonstrates one of the weaknesses in most forms of SQL.
ANS: F
29. The DELETE command is used when we want to change one or more attribute values.
ANS: F
ANS: T
MULTIPLE CHOICE
2. A(n) ____ of an entity is anything in which we are interested that exists independently.
a. agent
b. composite attribute
c. attribute
d. instance
ANS: D
6. Which of the following is an attribute but least likely to be the key attribute?
a. client
b. client number
c. client name
d. client street address
ANS: D
9. For the following entity and attribute model, what would be the key attribute of the Students entity?
a. social security number
b. name
c. address
d. street
ANS: A
11. The mapping of the relationships between entities would be used in the development of a(n):
a. context diagram
b. logical DFD
c. physical DFD
d. REA Model
ANS: D
17. Customers of Hanson Company, a home furnishings wholesaler, place orders by contacting a sales
representative via a toll-free number. Identify the constraints of the following data model relationship.
a. 1:1
b. 1:N
c. N:M
d. N:1
ANS: B
18. The constraint that is used to specify both the minimum and maximum participation of one entity in
the relationship with the other entity is called:
a. cardinality constraint
b. participation constraint
c. economic constraint
d. logical constraint
ANS: B
19. Students at Macom University use an web-based course registration system. Identify the participation
constraint of the following data model relationship. The university maintains student records until they
graduate or do not enroll in a course for a 3-year period.
a. N:M
b. 1:N
c. (1,1):(0,N)
d. (1,1):(1,N)
ANS: D
20. Enterprise systems are integrated software packages designed to provide complete integration of:
a. an organization's accounting information system
b. an organization's business data
c. an organization's business information processing systems and all related data
d. an organization's management
ANS: C
21. A set of data that describes an instance of the entity represented by a relation is known as a(n) ____.
a. tuple
b. resource
c. agent
d. event
ANS: A
22. Legacy systems do not usually have which of the following characteristics?
a. developed on previous hardware (and/or software) platforms
b. are easily adaptable to enterprise systems
c. have been used by an organization for a long period of time
d. all of the above are typical characteristics of legacy systems
ANS: B
23. In a relational database, a relation is defined as a collection of data representing multiple occurrences
of the following except:
a. an object
b. an event
c. an activity
d. an agent
ANS: C
24. ____ are defined as a set of data that describes an instance of the entity represented by a relation.
a. Attributes
b. Tuples
c. Primary keys
d. Candidate keys
ANS: B
25. ____ specifies that for every attribute value in one relation that has been specified in order to allow
reference to another relation,the tuple being referenced must remain intact.
a. Cardinality constraint
b. Participation constraint
c. Referential integrity
d. Economic constraint
ANS: C
26. Which of following is not a step in the process for specifying relations based on REA diagrams?
a. Determine the attributes for each of the entities.
b. Determine the number of tables.
c. Create a separate relational table for each entity.
d. Implement the relationships among the entities.
ANS: B
27. A situation in which a particular supplier provides more than one type of inventory item to a firm and a
particular type of inventory item is acquired from more than a single supplier is called a(n):
a. one-to-one relationship
b. one-to-many relationship
c. many-to-many relationship
d. entity relationship
ANS: C
28. The following E-R diagram shows a M:N relationship between two relations. To map this E-R
diagram into a logical database model:
a. divide the content of the Course relation to establish two relations having 1:N
relationships
b. add the primary key of the Student relation as an attribute in the Course relation
c. create a new relation whose primary key is a composite of the primary keys of two
relations
d. add the primary key of the Course relation as an attribute in the Student relation
ANS: C
29. Which of the following is not a proper SQL command for creating database relations?
a. Create table employee
b. Create table training_completed
c. Create client
d. Alter table release_time
ANS: C
30. To generate a standard report of a relational database, which of the following SQL commands would
be used?
a. Select report
b. Select view
c. Create report
d. Create view
ANS: D
31. Which of the following relational commands would a manager use to combine the data from two
related relations into a third relation?
a. select
b. project
c. join
d. display
ANS: C
34. Which is not an SQL command in which data can be changed in the database?
a. Insert
b. Delete
c. Update
d. Create
ANS: D
36. The SELECT statement has all but one of the following parts
a. a list of attributes that we wish to SELECT from the database
b. a WHEN clause
c. a list of tables where these attributes can be found
d. a WHERE clause
ANS: B
The following table is a view of BILLING_HOURS from the various data elements in High-Tech
Corp.'s relational database.
37. Which of the following SQL statements would extract the employee number and date for every
instance that an employee worked more than 8 hours any particular day?
a. SELECT Employee_No, Date
FROM BILLING_HOURS
WHERE Hours>8
b. QUERY Employee_No, Date
FROM BILLING_HOURS
WHERE Hours>8
c. SELECT Employee_No, Date
WHERE Hours>8
d. QUERY BILLING_HOURS
SELECT Employee_No, Date
WHERE Hours>8
ANS: A
38. Which of the following SQL statements would extract the employee number and date for every
instance that an had a billing rate of $150?
a. SELECT Employee_No, Date
FROM BILLING_HOURS
WHERE Rate=150
b. QUERY Employee_No, Date
FROM BILLING_HOURS
WHERE Rate=150
c. SELECT Employee_No, Date
WHERE Rate=150
d. QUERY BILLING_HOURS
SELECT Employee_No, Date
WHERE Hours>8
ANS: A
39. Which of the following SQL statements would extract the client number and date for every instance
that an had a billing rate of $150?
a. QUERY BILLING_HOURS
SELECT Client_No, Date
WHERE Rate=150
b. QUERY client_No, Date
FROM BILLING_HOURS
WHERE Rate=150
c. SELECT Client_No, Date
WHERE Rate=150
d. SELECT Client_No, Date
FROM BILLING_HOURS
WHERE Rate=150
ANS: D
40. Which of the following SQL statements would extract the client number and date for every instance
that an employee worked less than 8 hours any particular day?
a. QUERY BILLING_HOURS
SELECT Client_No, Date
WHERE Hours<8
b. QUERY client_No, Date
FROM BILLING_HOURS
WHERE Hours>8
c. SELECT Client_No, Date
WHERE Hours<8
d. SELECT Client_No, Date
FROM BILLING_HOURS
WHERE Hours<8
ANS: D
COMPLETION
ANS: entity
ANS: attribute
4. A(n) _________________________ is the attribute whose value is unique for every entity that will
appear in the database.
5. ____________________ define and map the way in which data can be extracted from a database in the
future.
ANS: Relationships
7. The relationship that relates to the specification of how many occurrences of an entity can participate
in the given relationship with any one occurrence of the other entity in the relationship is referred to as
______________________________.
ANS:
Enterprise resource planning systems
ERP systems
12. A collection of data representing multiple occurrences of a resource, event, or agent is known as a(n)
____________________.
ANS: relation
13. A set of data that describes an instance of the entity represented by a relation is known as a(n)
____________________.
ANS: tuple
15. ___________________________________ specifies that for every attribute in one relation that has
been specified to allow reference to another relation, the tuple being referenced must be intact.
16. ____________________ is a powerful database language that can be used to define database systems,
query the database for information, generate reports from the database, and access databases from
within programs using embedded commands.
ANS: SQL
17. The ____________________ command is used to add a single tuple to an existing relation.
ANS:
INSERT
insert
18. The ____________________ command demonstrates one of the weaknesses in most forms of SQL.
ANS:
DELETE
delete
19. The ____________________ command is used when we want to change one or more attribute values.
ANS:
UPDATE
update
ANS:
SELECT
select
PROBLEM
1. The following table is a view of BILLING_HOURS from the various data elements in ABC's
relational database:
Required:
a. Using proper SQL commands, develop a query to extract billing data for Fleet
Services (client number F11555), showing the employee number, date, hours, and
billing rate.
b. Design a table showing the output that would be generated based upon your query
created above.
ANS:
a. SELECT Employee_No, Date, Hours, Billing_Rate
FROM BILLING_HOURS
WHERE Client_No='F11555'
b.
2. The following table is a view of TRAINING_COMPLETED from the various data elements in High-
Tech Corp.'s relational database:
Required:
a. Using proper SQL commands, develop a query to extract training data for employee
Missy Pitman (employee number 11111), showing the date, hours, and training code.
b. Design a table showing the output that would be generated based upon your query
created above.
ANS:
a. SELECT Date, Hours, Train_Code
FROM TRAINING_COMPLETED
WHERE Employee_No='11111'
b.
3. Based on the following abbreviated description of Avery University's course scheduling and student
advising procedures, prepare an Entity-Relationship (E-R) diagram that reflects the key entities and
relationships.
Course Scheduling:
In consultation with the vice-president of Academic Affairs and the Registrar's Office, each academic
department chair decides which courses will be offered each semester and how many sections of each
course will be scheduled. Courses are scheduled in sections meeting at different times over the course
of the week. Some courses are scheduled in multiple sections. The department chair also assigns a
faculty member who teaches for his/her department to teach each course-section. Students enroll in
courses-sections by submitting their schedule selections to the Registrar's Office. In assigning students
to sections, the Registrar gives preference to students based on their class standing (i.e., Senior, Junior,
Sophomore, and Freshman).
Student Advising:
Student academic advising is done according to each student's major. Each student chooses a faculty
advisor from his/her major department. While each student has only one "official" academic advisor,
each faculty person advises several students, up to a maximum of 15 advisees.
ANS:
See Figure TB-5.1.