NEW
Font size
WorksheetsFINAL EXAM REVIEW
Total questions: 68
Worksheet time: 34mins
Rows can be grouped into smaller collections quickly and easily using the COUNT clause within the SELECT statement.
true
false
Thorough database planning and design is important to ensure that data is properly used to give the organization the most benefit.
true
false
Recognizing the entities CLASS and STUDENT in a college ERD, what bridged entity can a database designer add to help ensure each student is assigned their classes for specific courses?
a. COURSE
b. CRS_CODE
c. ENROLL
d. SEMESTER
Although SQL commands can be grouped together on a single line, complex command sequences are best shown on separate lines, with space between the SQL command and the command's components.
true
false
A database stores the data of the sales using the primary key RECEIVE_NUM in the SALE table and the products in the PRODUCT table with primary key PROD_NUM. To create the relation that represents what products were sold in a SALE a M:N relationship is necessary. What should be used to represent this in a relational model?
a. composite attribute with RECEIVE_NUM + PROD_NUM
b. composite entity with RECEIVE_NUM + PROD_NUM
c. a product table SALE x PRODUCT
d. a join table SALE + PRODUCT
In an entity relational model (ERD), what is each row in a table known as?
a. An entity relation
b. An entity set
c. An entity tuple
d. An entity occurrence
In a university, the data of students such as student id, name, and address are recorded in the STUDENT table and the majors, and the data about them, is stored in the table MAJORS. Suppose a student is allowed to take only one major. What kind of relationship exists between students and majors?
1:1
1:M
Functional dependence.
M:N
Information is produced by processing _____.
Scripts
Context
Data
Information
Why is identifying and documenting business rules essential to database design?
a. It allows the designer to manage business processes.
b. It can be a communication tool between users and managers.
c. It allows the user to understand relationship participation rules and constraints.
d. It helps to standardize the company's view of data.
A disadvantage of the relational database management system (RDBMS) is its inability to hide the complexities of the relational model from the user.
true
false
Which of the following is not a valid command to change a COLUMN in a TABLE?
ADD
MODIFY
delete
drop
Structural dependence, which means that access to a file is dependent on its ___?
Data
Storage
customer
Structure
There is a CLASS entity where the first attribute CLASS_CODE is used as its entity identifier. The other attributes are CRS_CODE, CLASS_SECTION, CLASS_TIME, ROOM_CODE, PROF_NUM. If a designer would like to include an alternate composite primary key in case CLASS_CODE is deleted, what would be the most appropriate composite primary key?
a. CLASS_SECTION and CLASS_TIME
b. CRS_CODE
c. CRS_CODE and CLASS_SECTION
d. CLASS_SECTION
Consider the following table
Table name: TENANT
| ID | NAME | RENT |
| 18 | Alex | 219 |
| 31 | Rose | 250 |
| 51 | Alex | 300 |
| 77 | Mary | 280 |
| 81 | Rose | 240 |
How many rows are in the following query?
SELECT DISTINCT NAME FROM TENANT.
1
0
5
3
Which of the following is equivalent to WHERE attribute BETWEEN 10 AND 1000?
a. WHERE attribute > 10 AND attribute == 1000
b. WHERE attribute >= 10 AND attribute <= 1000
c. WHERE attribute = 10 AND attribute = 1000
d. WHERE attribute > 10 AND attribute < 1000
When creating a student roster, a school cannot enroll more than 20 students per course. This is an example of what data modeling building block?
constraint
attribute
entity
relationship
A desktop database is a _____ database.
multiuser
distributed
workgroup
single-user
What is the result of SUBSTR(‘19425127’, 2, 4)?
‘4251’
‘94251’
‘9425’
‘94’
Use the command ADD to change column characteristics.
true
false
In a car rental table VEHICLES, the YEAR attribute indicates the YEAR a car was bought, and the BIN attribute a unique identification number for a car. What describes better the result of the query below?
SELECT BIN, YEAR FROM VEHICLES WHERE YEAR IN (2010, 2020)
a. All YEARS from 2010, or 220 where a vehicle was bought.
b. All vehicles' BIN .
c. All vehicles bought from 2010 to 220.
d. All BINs, and YEARS of vehicles that were bought in 2010, or 2020
From a database point of view, the collection of data becomes meaningful only when it reflects properly defined _____.
a. business rules
b. conceptual schema
c. physical independence
d. logical design
You need an intermediary between the user and the client's database; which of the options below would you use?
DBMS(s)
End-user data
Programming languages
Metadata
A primary key can't be null, but it can contain null attributes.
true
false
Database administrator should insert the new VENDOR information: Bryson, Inc., Suite 615, Smithson, TN, 21225, with phone number 615-223-3234 using the commands ____.
INSERT INTO VENDOR VALUES (21228,'Bryson, Inc.','Suite 615','Smithson','TN','615','223-3234');
INSERT INTO VENDOR VALUES (21225,'Bryson, Inc.','Suite 615','Smithson','TN','223-3234');
INSERT VENDOR VALUES (21226,'Bryson, Inc.','Suite 615','Smithson','TN','615','223-3234');
INSERT VENDOR VALUES (21227,'Bryson, Inc.','615','Smithson','TN','615','223-3234');
Which of the following statements is true?
a. A DBMS is a collection of programs that manage metadata data.
b. A DBMS is a set of processes that manage and control access to data stored in the database.
c. A DBMS is knowledge database management software.
d. A DBMS allows the user access to the database's internal complexity.
The ____ allows using independent tables linked by common attributes.
join
difference
project
select
The proper use of _____ keys is crucial to controlling data redundancy.
foreign
primary
external
candidate
When creating a table with a SELECT statement, the CREATE TABLE command statement represents the subquery.
true
false
Comparison operators cannot be used to place restrictions on character-based attributes.
true
false
When database designers must account for dependents when an EMPLOYEE table already exists, what other entity would the ERD require so that the database reflects the operational needs and processes for its employees?
a. Additional entity for DEP_NUM
b. Additional attribute for DEP_FNAME
c. Additional attribute for DEP_DOB
d. Additional entity for DEPENDENTs
What command should be used to save permanently all changes made to a database.
commit
save
save all
write all
In a relationship between COURSE and CLASS, COURSE has attributes CRS_CODE, DEPT_CODE, and CSR_DESCRIPTION, and CLASS has CRS_CODE, CLASS_SECTION, CLASS_TIME, and ROOM_CODE. Which attribute would be an example of a foreign key?
CRS_CODE
ROOM_CODE
DEPT_CODE
CLASS_SECTION
Which of the following is not a characteristic of a subquery?
a. A subquery is a query (SELECT statement) inside another query.
b. The first query in the SQL statement is known as the outer query.
c. The inner query is executed last.
d. A subquery is normally expressed inside parentheses.
The order of the rows and columns is important to the DBMS.
true
false
Consider the following table
Table name: TENANT
| ID | NAME | RENT |
| 18 | Alex | 219 |
| 31 | Rose | 250 |
| 77 | Alex | 300 |
| 41 | Mary | 280 |
| 81 | Rose | 240 |
Which query returns the following?
| ID | NAME | RENT |
| 18 | Alex | 219 |
| 81 | Rose | 240 |
| 31 | Rose | 250 |
| 41 | Mary | 280 |
| 77 | Alex | 300 |
a. SELECT * FROM TENANT ORDER BY RENT
b. SELECT * ORDER BY RENT FROM TENANT
c. SELECT RENT FROM TENANT ORDER BY RENT
d. SELECT ORDER BY RENT FROM TENANT *
A database designer set the CRS_CODE attribute as the primary key to the CLASS table. If no other changes are made, how many composite identifiers does the table have?
two
three
zero
one
The SQL command, UPDATE, successfully removes a table row.
true
false
Repeating group is defined as
a. SELECT tablelist FROM columnlist [WHERE conditionlist ] [ORDER BY columnlist [ASC | DESC];
b. SELECT columnlist FROM tablelist [WHERE conditionlist ] [ORDER BY columnlist [ASC | DESC];
c. SELECT tablelist FROM columnlist [ORDER BY columnlist [ASC | DESC] [WHERE conditionlist ];
d. SELECT columnlist [WHERE conditionlist ] FROM tablelist [ORDER BY columnlist [ASC | DESC];
When discovering new business rules, interviews with _____ are faster and more direct, but may be less reliable.
written documentation
end users
company managers
policy makers
Complete the following statement: Business rules must ______.
a. be based only on end user perceptions
b. represent many-to-many (M:N) relationships
c. be rendered in writing
d. include constraints
The response of the DBMS to a query is the ___________
ad hoc response
ad hoc query
query result set
integrated view of the data
Which of the answers below would you consider hardware while gathering requirements for a database?
server
internet
operation system
application program
You must first enter the command ALTER TABLE in order to issue a MODIFY command to change a columns datatype.
true
false
By using the relational data model the designer focuses primarily on the physical storage details.
true
false
A database language enables the user to perform complex queries designed to transform the raw data into useful information.
false
true
You can select partial table contents by naming the desired fields and by placing restrictions on the rows to be included in the output.
true
fasle
Structural dependence exists when it is possible to make changes in the file structure without affecting the application program's ability to access the data.
true
false
All SQL commands must be issued on a single line.
true
false
_____ data exist in a format that does not lend itself to processing that yields information.
Unstructured
Structured
Historical
Semistructured
In the relationship where "PROFESSOR teaches CLASS," and a class can have only one professor teaching, how is the PROFESSOR cardinality notated if PROFESSOR is mandatory?
(1,N)
(1,1)
(0,1)
(0,N)
In an entity relationship model (ERM), attributes are characteristics of entities. Which of the following statements best describe an optional attribute?
a. An optional attribute is an attribute that does not require a value and can be left empty.
b. An optional attribute is an attribute that requires a value and can be left empty.
c. An optional attribute is an attribute that does not require a value and can be an optional key.
d. An optional attribute is an attribute that requires a value and can be an optional key.
Suppose that a mattress store has a TABLE1 with sales representatives with an attribute vcode as primary key. It also has a TABLE2 with every mattress sold, the table has an attribute vcode to indicate which sales representative made the sale, and a mt_code to indicate which mattress was sold. Which of the following returns all the sales representatives that haven't closed a sale?
a. SELECT * FROM TABLE1 JOIN TABLE2 ON TABLE1.vcode = TABLE2.vcode WHERE mt_code IS NULL.
b. SELECT * FROM TABLE1 RIGHT JOIN TABLE2 ON TABLE1.vcode = TABLE2.vcode WHERE mt_code IS NOT NULL.
c. SELECT * FROM TABLE1 LEFT JOIN TABLE2 ON TABLE1.vcode = TABLE2.vcode WHERE mt_code IS NULL.
d. SELECT * FROM TABLE1 RIGHT JOIN TABLE2 ON TABLE1.vcode = TABLE2.vcode WHERE mt_code IS NULL.
What would you define as the condition in which all of the data in the database are consistent with the real-world events and conditions?
DATA QUALITY
DATA UBIQUITY
DATA INTERGRITY
FATA ANOMALY
In a PROFESSOR and COURSE relationship if the PROFESSOR object is given a cardinality of (1,1), then which of the following would be a true statement about the university?
a. a PROFESSOR must have more than one COURSE to teach
b. a COURSE must have at least one PROFESSOR to teach
c. a PROFESSOR can optionally teach a COURSE
d. a COURSE can optionally have a PROFESSOR to teach
In a university, the data of students such as student id, name, and address are recorded in the STUDENT table and the courses are stored in a COURSE table by the course code, number of credits, and professor teaching. Usually, a student takes up to 5 courses per cycle, and each course has a minimum of 2 students. What kind of relationship exists between the courses and students?
1.M
1:1
FUNCTIONAL DEPENDENCE
M:N
It is unnecessary for the database designer to determine which data to enter into the database and how to organize that data in the database management system.
TRUE
FALSE
If CUSTOMER and INVOICE is classified as a 1:M and one direction would specify that a CUSTOMER may generate many INVOICEs, what would be true of the opposite direction?
a. Each INVOICE is generated by one CUSTOMER
b. CUSTOMERs are given INVOICEs
c. Each INVOICE is written to many CUSTOMERs
d. CUSTOMER is unique to many INVOICEs
Which of the following is not a valid business rule?
A customer must reside in the USA.
An invoice must be paid in a reasonable amount of time.
An invoice can only be paid to one customer.
An invoice may have many items.
A table is a three dimensional structure composed of depth, width, and height.
TRUE
FALSE
One of the advantages of a database system over previous data management approaches is reduced costs.
TRUE
FALSE
While trying to resolve a database failure, which of the answers below would you say might have caused the database failure?
Data inconsistency
Multi-user access
A bad disk
Data redundancy
Business rules that are properly written will define entities, attributes, relationships, and _____.
constraints
objects
classes
fields
Database administrator must create another logical group of database objects for a new application called "APP03" that will also use database services from the same system. How can an administrator create this successfully without affecting existing tables and indexes?
Run command, CREATE TABLE APP03 PRIMARY KEY APP03;
Run command, CREATE TABLE APP03 PRIMARY KEY (APP03)
Run command, CREATE PRIMARY KEY APP03;
Run command, CREATE SCHEMA AUTHORIZATION APP03;
If a PROFESSOR can teach up to 4 CLASSes, the cardinality of CLASS should be expressed as which of the following?
(1,N)
(0,N)
(4,0)
(1,4)
If each CLASS in an ERD can only have one PROFESSOR, the designer would place a cardinality next to the PROFESSOR object as which of the following?
(1,0)
(1,N)
(0,1)
(1,1)
Embedded SQL refers to SQL statements contained within an application programming language such as Java.
TRUE
FALSE
Consider the following tables:
table1
vcode
name
7
Alex
8
Tony
9
Charles
11
Mary
table2
scode
vcode
total
341
7
102
213
9
59
312
7
89
712
3
301
How many rows has the result of the following query?
SELECT * FROM table1 NATURAL JOIN table2
0
1
3
2
A workgroup database is a _____ database.
DESKTOP
MULTIUSER
SINGLE-USER
DISTRIBUTED
