Question: General Knowledge question 1) What is the most common type of DBMS Model ? a) Hierarchical b) Network c) Relational d) Object-Relational e) Object Oriented

General Knowledge question

1) What is the most common type of DBMS Model ?

a) Hierarchical b) Network

c) Relational d) Object-Relational

e) Object Oriented

2) DBMS systems have commands to look at Metadata such as SHOW TABLES (MySQL) SELECT table_name FROM user_tables (Oralce) and Describe (most DBMSs) . Metadata refers to:

a) Data about data b) The opposite of beta data

c) invalid data

d) validated data

3) Databases created from different DBMS products such as Oracle, MySQL, DB2, MS-SQL Server are quite similar to each other at which level ?

a) At the user interface level (Logical level) b) At the implementation level

c) They are always different d) They are always similar

Basic SQL commands

4) To change the value of a customers discount from 8 to 4, what command do we need to use:

a) INSERT b) SELECT

c) REDUCE d) ALTER TABLE

e) UPDATE.

5) To Construct a new table (with no data) we use which Command ?

a) CREATE TABLE b) ALTER TABLE

c) DROP TABLE d) INSERT

e) UPDATE

6) To include a new row in a table we use which Command ?

a) CREATE TABLE b) ALTER TABLE

c) DROP TABLE d) INSERT

e) UPDATE

7) To remove a table from the database we use which Command ?

a) CREATE TABLE b) ALTER TABLE

c) DROP TABLE d) INSERT

e) DELETE

8) For the statement SELECT x FROM y;

x can be

a) Columns of tables that exist in table y b) Tables

c) All of the above d) None of the above

VIEWS

9) A query in MS-Access is the same as which object in Oracle or MySQL (2 points) ?

a) Stored Procedure b) View

c) Trigger d) Table

10) When we update a table and commit, is that update reflected on the view ?

YES NO

11) When we issue an update on a view (assuming the view is updatable), will the table be updated ?

YES NO

PARENT-CHILD Relations

12) If you have an Employees table and a Departments table, which one is the parent ?

a) It doesnt matter

b) Employees

c) Departments

13) How do we relate the EMPLOYEES table with the DEPARTMENTS table ?

a) add a Foreign Key in the Employees table

b) add a Foreign Key in the Departments table

c) It doesnt matter. Add a FK in either table

d) Create an associative table.

Referential Integrity

In the example above, What is going to happen to the Departments and to the Employee tables when we issue the

14) UPDATE Departments SET DeptID = d006 WHERE DeptID = d001 ;

a) Department Row that has did = d001 is updated to d006 and the two rows in

Employees have their did updated to d006.

b) Department Row that has did = d001 is updated to d006 and the two rows in

Employees have their did updated to NULL.

c) Operation is not allowed. Error message saying that it violated Foreign Key constraint.

d) Department Row that has did = d001 is updated to d006 and nothing happens to the two rows in Employees with did = d001

15) DELETE FROM Departments WHERE DeptID = d001;

a) Department Row that has did = d001 is deleted and the two rows in

Employees that have did = .d001 are also deleted.

b) Department Row that has did = d001 is deleted and the two rows in

Employees have their did updated to NULL.

c) Operation is not allowed. Error message saying that it violated Foreign Key constraint.

d) Department Row that has did = d001 is deleted and nothing happens to the two rows in Employees with did = d001.

16) If we want to Not allow a department to be deleted if there are employees in the corresponding departments, we need to choose

a) ON DELETE RESTRICT

b) ON DELETE CASCADE

c) ON DELETE SET NULL

17) If we want to allow the department to be deleted and the corresponding employees to be automatically deleted, we need to choose

a) ON DELETE RESTRICT

b) ON DELETE CASCADE

c) ON DELETE SET NULL

18) If we want to allow the department to be deleted and the corresponding employees to automatically have their FK did to be set to empty (not belong to a department), we need to choose

a) ON DELETE RESTRICT

b) ON DELETE CASCADE

c) ON DELETE SET NULL

19) If we dont have the ON DELETE clause at all, it defaults to

a) ON DELETE RESTRICT

b) ON DELETE CASCADE

c) ON DELETE SET NULL

20) A Stored procedure in Oracle

a) Is stored in the clients machine

b) Is stored centrally in the database server

c) Can be stored anywhere

21) The purpose of a database trigger is to

a) Protect your database against malicious users by pulling the trigger of the gun and killing the thief

b) To backup data

c) To implement complex integrity constraints that cant be done with CREATE TABLE statement

22) What is the difference between a Trigger and a Stored Procedure

a) Triggers have more lines of code

b) A Stored procedure must be explicitly called. A trigger is activated when a triggering event such as INSERT, UPDATE, DELETE on a specific table occurs.

c) There is no difference.

23) A DBA when implementing security must worry about

a) Only the Database

b) Only about the Database and the DBMS security

c) The Database, the DBMS and the Application security as well as the perimeters/surroundings such as Operating System, Network and Web Server security.

24) You have been hired as a Database Administrator and you are responsible for the security of the database. What is the first thing that you should do:

a) Start Coding your Views, Stored Procedure, Triggers and Look at the Referential Integrity constraints to see if it was set up properly.

b) Purchase a gun

c) Develop a Database Security Plan

d) Apply Cryptography to the entire database

25) Which two commands implement the concept of a transaction (a unit of operation where all the commands must be valid or none of them).

a) Commit and Undo

b) All or Nothing

c) Save and Rollback

d) Commit and Rollback

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!