sql for database construction




1).
The SQL command to create a table is:
A   MAKE TABLE.   
B   ALTER TABLE.   
C   DEFINE TABLE.   
D   CREATE TABLE.   
ANS: D - CREATE TABLE.

No answer description available for this question

2).
A ________ is a stored program that is attached to a table or a view.
A   pseudofile   
B   embedded SELECT statement   
C   trigger   
D   None of the above is correct.   
ANS: C - trigger

No answer description available for this question

3).
The DROP TABLE statement:
A   deletes the table structure only.   
B   deletes the table structure along with the table data.   
C   works whether or not referential integrity constraints would be violated.   
D   is not an SQL statement.   
ANS: B - deletes the table structure along with the table data.

No answer description available for this question

4).
SQL views can be used to hide:
A   columns and rows only.   
B   complicated SQL syntax only.   
C   both of the above can be hidden by an SQL view.   
D   None of the above is correct.   
ANS: C - both of the above can be hidden by an SQL view.

No answer description available for this question

5).
The SQL statement to create a view is:
A   CREATE VIEW.   
B   MAKE VIEW.   
C   SELECT VIEW.   
D   INSERT VIEW.   
ANS: A - CREATE VIEW.

No answer description available for this question

6).
To update an SQL view, the DBMS must be able to associate the column(s) to be updated with:
A   a particular column in a particular underlying table.   
B   a particular column in a particular row.   
C   a particular row in a particular underlying table.   
D   None of the above is correct.   
ANS: A - a particular column in a particular underlying table.

No answer description available for this question

7).
Which of the following is NOT a type of SQL constraint?
A   PRIMARY KEY   
B   FOREIGN KEY   
C   ALTERNATE KEY   
D   UNIQUE   
ANS: C - ALTERNATE KEY

No answer description available for this questiona

8).
A ________ is a program that performs some common action on database data and that is stored in the database.
A   trigger   
B   stored procedure   
C   pseudofile   
D   None of the above is correct.   
ANS: B - stored procedure

No answer description available for this question

9).
For what purposes are views used?
A   To hide columns only   
B   To hide rows only   
C   To hide complicated SQL statements only   
D   All of the above are uses for SQL views.   
ANS: D - All of the above are uses for SQL views.

No answer description available for this question

10).
What is an SQL virtual table that is constructed from other tables?
A   Just another table   
B   A view   
C   A relation   
D   Query results   
ANS: B - A view

No answer description available for this question