DATABASE EXAM FINAL
One-to-One relationships are transformed into Check Constraints in the tables created
at either end of that relationship. True or False? - CORRECT ANSWER-False
The Oracle Database can implement a many-to-many relationship. You simply create
two foreign keys between the two tables. True or False? - CORRECT ANSWER-False
When translating an arc relationship to a physical design, you must turn the arc
relationships into foreign keys. Assuming you are implementing an Exclusive Design,
you must also create two Unique Key Constraints to ensure the Arc is implemented
correctly. True or False? - CORRECT ANSWER-False
The transformation from an ER diagram to a physical design involves changing
terminology. Secondary Unique Identifiers become:
A. Columns
B. Tables
C. Unique Constraints
D. Primary Key Constraints - CORRECT ANSWER-Unique Constraints
In a physical data model, an attribute becomes a _____________.
A. Table
B. Foreign Key
C. Constraint
D. Column - CORRECT ANSWER-Column
In an Oracle database, why would 1_TABLE not work as a table name?
A. The database does not understand all capital letters.
B. There is no problem here. You can create a table called 1_TABLE.
C. Object names must not start with a number. They must begin with a letter.
D. TABLE is a reserved word. - CORRECT ANSWER-Object names must not start with
a number. They must begin with a letter.
,The explanation below is a column integrity constraint. True or False? A column must
contain only values consistent with the defined data format of the column. - CORRECT
ANSWER-True
Foreign keys must be null. True or False? - CORRECT ANSWER-False
A table must have a primary key. True or False? - CORRECT ANSWER-False
The explanation below is a User Defined integrity rule and must, therefore, be manually
coded; the Database cannot enforce this rule automatically. True or False? A primary
key must be unique, and no part of the primary key can be null. - CORRECT ANSWER-
False
The text below is an example of what constraint type? If the number of BOOKS lent to a
BORROWER in the LIBRARY exceeds 5, then we must send him a letter requesting the
return of the BOOKS; this will require extra programming to enforce.
A. Entity integrity
B. User-defined integrity
C. Column integrity
D. Referential integrity - CORRECT ANSWER-User-defined integrity
System Documentation is developed right at the end once the system has gone live and
users have been using it for a little while. You are more likely to get it correct that way.
True or False? - CORRECT ANSWER-False
In the Analysis phase, the tables are created and populated with test data. True or
False? - CORRECT ANSWER-False
Once you have created a table, it is not possible to alter the definition of it. If you need
to add a new column you must delete the table definition and create a new, correct
table. True or False? - CORRECT ANSWER-False
The f_customers table contains the following data:
ID NAME ADDRESS CITY STATE ZIP
1 Cole Bee 123 Main Street Orlando FL 32838
2 Zoe Twee 1009 Oliver Avenue Boston MA 02116
3 Sandra Lee 22 Main Street Tampa FL 32444
If you run the following statement: DELETE FROM F_CUSTOMERS WHERE ID <= 2;
How many rows will be left in the table?
,A. 0
B. 3
C. 1
D. 2 - CORRECT ANSWER-1
The DESCRIBE command returns all rows from a table. True or False? - CORRECT
ANSWER-False
The _______ clause can be added to a SELECT statement to return a subset of the
data.
A. ANYWHERE
B. WHICH
C. WHERE
D. EVERY - CORRECT ANSWER-WHERE
What command will return data from the database to you?
A. FETCH
B. GET
C. SELECT
D. RETURN - CORRECT ANSWER-SELECT
When you use the SELECT clause to list one or two columns only from a table and no
WHERE clause, which SQL capability is used?
A. Joining only
B. Selection only
C. Projection only
D. Projection and Selection - CORRECT ANSWER-Projection only
If a SQL statement returns data from two or more tables, which SQL capability is being
used?
, A. Selection
B. Projection
C. Joining
D. Insertion - CORRECT ANSWER-Joining
Which statement best describes how arithmetic expressions are handled?
A. Addition operations are handled before any other operations.
B. Multiplication and subtraction operations are handled before any other operations.
C. Multiplication and addition operations are handled before subtraction and division
operations.
D. Division and multiplication operations are handled before subtraction and addition
operations. - CORRECT ANSWER-Division and multiplication operations are handled
before subtraction and addition operations.
The EMPLOYEES table contains these columns: SALARY NUMBER(7,2) BONUS
NUMBER(7,2) COMMISSION_PCT NUMBER(2,2)
All three columns contain values greater than zero. There is one row of data in the
table and the values are as follows: Salary = 500, Bonus = 50, Commission_pct = .5
Evaluate these two SQL statements:
1. SELECT salary + bonus + commission_pct * salary - bonus AS income
FROM employees;
2. SELECT (salary + bonus ) + commission_pct * (salary - bonus) income
FROM employees;
What will be the result?
A. Statement 1 will return a higher value than statement 2
B. Statement 2 will return a higher value than statement 1.
C. Statement 1 will display a different column heading.
D. One of the statements will NOT execute. - CORRECT ANSWER-Statement 2 will
return a higher value than statement 1.
One-to-One relationships are transformed into Check Constraints in the tables created
at either end of that relationship. True or False? - CORRECT ANSWER-False
The Oracle Database can implement a many-to-many relationship. You simply create
two foreign keys between the two tables. True or False? - CORRECT ANSWER-False
When translating an arc relationship to a physical design, you must turn the arc
relationships into foreign keys. Assuming you are implementing an Exclusive Design,
you must also create two Unique Key Constraints to ensure the Arc is implemented
correctly. True or False? - CORRECT ANSWER-False
The transformation from an ER diagram to a physical design involves changing
terminology. Secondary Unique Identifiers become:
A. Columns
B. Tables
C. Unique Constraints
D. Primary Key Constraints - CORRECT ANSWER-Unique Constraints
In a physical data model, an attribute becomes a _____________.
A. Table
B. Foreign Key
C. Constraint
D. Column - CORRECT ANSWER-Column
In an Oracle database, why would 1_TABLE not work as a table name?
A. The database does not understand all capital letters.
B. There is no problem here. You can create a table called 1_TABLE.
C. Object names must not start with a number. They must begin with a letter.
D. TABLE is a reserved word. - CORRECT ANSWER-Object names must not start with
a number. They must begin with a letter.
,The explanation below is a column integrity constraint. True or False? A column must
contain only values consistent with the defined data format of the column. - CORRECT
ANSWER-True
Foreign keys must be null. True or False? - CORRECT ANSWER-False
A table must have a primary key. True or False? - CORRECT ANSWER-False
The explanation below is a User Defined integrity rule and must, therefore, be manually
coded; the Database cannot enforce this rule automatically. True or False? A primary
key must be unique, and no part of the primary key can be null. - CORRECT ANSWER-
False
The text below is an example of what constraint type? If the number of BOOKS lent to a
BORROWER in the LIBRARY exceeds 5, then we must send him a letter requesting the
return of the BOOKS; this will require extra programming to enforce.
A. Entity integrity
B. User-defined integrity
C. Column integrity
D. Referential integrity - CORRECT ANSWER-User-defined integrity
System Documentation is developed right at the end once the system has gone live and
users have been using it for a little while. You are more likely to get it correct that way.
True or False? - CORRECT ANSWER-False
In the Analysis phase, the tables are created and populated with test data. True or
False? - CORRECT ANSWER-False
Once you have created a table, it is not possible to alter the definition of it. If you need
to add a new column you must delete the table definition and create a new, correct
table. True or False? - CORRECT ANSWER-False
The f_customers table contains the following data:
ID NAME ADDRESS CITY STATE ZIP
1 Cole Bee 123 Main Street Orlando FL 32838
2 Zoe Twee 1009 Oliver Avenue Boston MA 02116
3 Sandra Lee 22 Main Street Tampa FL 32444
If you run the following statement: DELETE FROM F_CUSTOMERS WHERE ID <= 2;
How many rows will be left in the table?
,A. 0
B. 3
C. 1
D. 2 - CORRECT ANSWER-1
The DESCRIBE command returns all rows from a table. True or False? - CORRECT
ANSWER-False
The _______ clause can be added to a SELECT statement to return a subset of the
data.
A. ANYWHERE
B. WHICH
C. WHERE
D. EVERY - CORRECT ANSWER-WHERE
What command will return data from the database to you?
A. FETCH
B. GET
C. SELECT
D. RETURN - CORRECT ANSWER-SELECT
When you use the SELECT clause to list one or two columns only from a table and no
WHERE clause, which SQL capability is used?
A. Joining only
B. Selection only
C. Projection only
D. Projection and Selection - CORRECT ANSWER-Projection only
If a SQL statement returns data from two or more tables, which SQL capability is being
used?
, A. Selection
B. Projection
C. Joining
D. Insertion - CORRECT ANSWER-Joining
Which statement best describes how arithmetic expressions are handled?
A. Addition operations are handled before any other operations.
B. Multiplication and subtraction operations are handled before any other operations.
C. Multiplication and addition operations are handled before subtraction and division
operations.
D. Division and multiplication operations are handled before subtraction and addition
operations. - CORRECT ANSWER-Division and multiplication operations are handled
before subtraction and addition operations.
The EMPLOYEES table contains these columns: SALARY NUMBER(7,2) BONUS
NUMBER(7,2) COMMISSION_PCT NUMBER(2,2)
All three columns contain values greater than zero. There is one row of data in the
table and the values are as follows: Salary = 500, Bonus = 50, Commission_pct = .5
Evaluate these two SQL statements:
1. SELECT salary + bonus + commission_pct * salary - bonus AS income
FROM employees;
2. SELECT (salary + bonus ) + commission_pct * (salary - bonus) income
FROM employees;
What will be the result?
A. Statement 1 will return a higher value than statement 2
B. Statement 2 will return a higher value than statement 1.
C. Statement 1 will display a different column heading.
D. One of the statements will NOT execute. - CORRECT ANSWER-Statement 2 will
return a higher value than statement 1.