CIS 120 - Introduction to Databases » Summer 2021 » Quiz 3

Need help with your exam preparation?

Question #1
A trigger is an action that occurs automatically in response to an associated database operation such as an INSERT, UPDATE, or DELETE.
A.   TRUE
B.   FALSE
Question #2
We can still ALTER TABLE after the table has been dropped from the database system.
A.   TRUE
B.   FALSE
Question #3
We may use DELETE command to completely remove the whole table’s definition and records.
A.   FALSE
B.   TRUE
Question #4
Entity integrity (EI) states that the value in any foreign key field must be null or must match an actual value in the primary key field of another table.
A.   FALSE
B.   TRUE
Question #5
An index for any column must be unique.
A.   FALSE
B.   TRUE
Question #6
We should create unique index for the primary key of each table.
A.   FALSE
B.   TRUE
Question #7
The following SQL command is valid to create an unique index of one column on a table. CREATE UNIQUE INDEX IXClientNum ON Client ( ClientNum ) ;
A.   FALSE
B.   TRUE
Question #8
We cannot use SQL to create an index on multiple columns of a table.
A.   FALSE
B.   TRUE
Question #9
Access does not use the term “trigger”, but Access offers the functionality of triggers through data macros.
A.   TRUE
B.   FALSE
Question #10
In a client/server system, a server provides services, and a client requests for services.
A.   TRUE
B.   FALSE
Question #11
System catalog contains information about any table, column, query, report, form, or other object in the database system.
A.   TRUE
B.   FALSE
Question #12
The following SQL command is valid and it will create a new table called Student2 from an existing table called Student. SELECT * INTO Student2 FROM Student ;
A.   FALSE
B.   TRUE
Question #13
The following SQL command will drop or delete the field Age from the Student table. ALTER TABLE Student DROP COLUMN Age ;
A.   FALSE
B.   TRUE
Question #14
In a relational DBMS, a table can have only one primary key and only one foreign key.
A.   FALSE
B.   TRUE
Question #15
The following SQL command will drop or remove or delete the Client table’s definition and all its data rows. DELETE FROM Client ;
A.   TRUE
B.   FALSE
Question #16
In the following SQL command, ON DELETE CASCADE means if instructor 2 is deleted from the Instructor table, all students with adviser being instructor 2 will be deleted at the same time. CREATE TABLE Student ( StudentID int NOT NULL, AdvisorID int , LastName varchar(45) NOT NULL, FirstName varchar(45) NOT NULL ) PRIMARY KEY ( StudentID ) FOREIGN KEY ( AdvisorID ) REFERENCES Instructor ( InstructorID ) ON DELETE CASCADE ;
A.   FALSE
B.   TRUE
Question #17
The following SQL command is to add a new field called GPA to the Student table. ALTER TABLE Student ADD GPA CHAR(1) ;
A.   FALSE
B.   TRUE
Question #18
In Access, referential integrity (RI) is specified by defining a relationship between two tables.
A.   TRUE
B.   FALSE
Question #19
Entity integrity (EI) rule is that primary key field(s) must be unique, and must not have null value in any row or record.
A.   TRUE
B.   FALSE
Question #20
The SQL commands for security mechanisms are CREATE and DROP.
A.   TRUE
B.   FALSE
Question #21
There are no disadvantages for creating indexes in any DBMS.
A.   TRUE
B.   FALSE
Question #22
One advantage of indexes is to make some data retrieval more efficient.
A.   FALSE
B.   TRUE
Question #23
Assuming Student and SLin have been defined properly, the following two SQL commands are valid to run. GRANT SELECT ON Student TO SLin ; REVOKE SELECT ON Student FROM SLin ;
A.   TRUE
B.   FALSE
Question #24
The following SQL command will only remove or delete all the rows or records of the Class table. DROP TABLE Class ;
A.   FALSE
B.   TRUE
Question #25
In the following SQL command, ON DELETE RESTRICT means if instructor 9 is deleted from the Instructor table, all students with adviser being instructor 9 will be deleted at the same time. CREATE TABLE Student ( StudentID int NOT NULL, AdvisorID int , LastName varchar(45) NOT NULL, FirstName varchar(45) NOT NULL ) PRIMARY KEY ( StudentID ) FOREIGN KEY ( AdvisorID ) REFERENCES Instructor ( InstructorID ) ON DELETE RESTRICT ;
A.   TRUE
B.   FALSE
Question #26
Referential integrity (RI) means that if table A contains a foreign key that matches the primary key of table B, the value of this foreign key must match the value of the primary key for some row in table B or be null.
A.   TRUE
B.   FALSE
Question #27
To specify primary key in SQL, we may enter a PRIMARY KEY clause in either an ALTER TABLE or a CREATE TABLE command.
A.   TRUE
B.   FALSE
Question #28
To specify referential integrity (RI) in SQL, we may add FOREIGN KEY clause in either the CREATE TABLE or ALTER TABLE commands.
A.   FALSE
B.   TRUE
Question #29
In the Relationships diagram of Access, a line connects a primary key to a foreign key with one-to-many relationship.
A.   FALSE
B.   TRUE
Question #30
In the following SQL command, ON DELETE SET NULL means if instructor 6 is deleted from the Instructor table, all students with adviser being instructor 6 will be deleted at the same time. CREATE TABLE Student ( StudentID int NOT NULL, AdvisorID int , LastName varchar(45) NOT NULL, FirstName varchar(45) NOT NULL ) PRIMARY KEY ( StudentID ) FOREIGN KEY ( AdvisorID ) REFERENCES Instructor ( InstructorID ) ON DELETE SET NULL ;
A.   TRUE
B.   FALSE
Question #31
The following SQL command will drop or remove or delete the Student table’s definition and all its data rows. DROP TABLE Student ;
A.   FALSE
B.   TRUE
Question #32
System catalog is maintained automatically by the DBMS.
A.   TRUE
B.   FALSE

Need help with your exam preparation?