Advanced Database Management System - Tutorials and Notes: Database introduction, ER model, SQL Multiple Choice Questions

Thursday, 10 September 2020

Database introduction, ER model, SQL Multiple Choice Questions

MCQ on various aspects in DBMS including database introduction, user types, join techniques, SQL and concurrent access anomalies with answers, RDBMS Multiple Choice Questions with Answers

Database Management Systems (DBMS) MCQ Quiz Questions with Answers


1. RX systems is a software company which is developing an application for a transport company. They have different teams involved in different modules of this project. Some are involved in database design; some are developing different front-end interfaces. One of these teams developing an interface using Java as the language. They are interacting with the database developed by other teams. Which of the user types they are falling under and how they are interacting with the database?

a) Naïve user, embedded SQL statements

b) Sophisticated user, query tools

c) Application programmer, embedded SQL statements

d) Parametric user, interface 


Answer: c) Application programmer, embedded SQL statements

Application programmers are the type of users who interact with database through embedded SQL statements. That is, while developing the application software, they include the SQL statements wherever required.


2. In an airline reservation system, there are only 3 seats available for a Chennai flight. There are two passengers trying to book two tickets each for that flight. And, this happens at the same time. If both are allowed to book tickets, the system will end up in an inconsistent state. What do we call this problem?

a) Data redundancy and inconsistency

b) Data isolation

c) Security issues

d) Concurrent access anomaly


Answer: d) Concurrent access anomaly

The situation where more than one transactions that are competing for same data item simultaneously is called as concurrent access. If all transactions are trying to execute conflicting instructions (one of the transactions uses WRITE(X)), that will lead to inconsistent state. This inconsistent state is called concurrent access anomaly.

In this question, if the transactions of booking tickets are permitted simultaneously, then both passengers will see the same number of tickets available (3 seats). Hence, it leads to inconsistent state.



3. A DBA wants to delete all records from PILOT table. Which of the following statements can do that?

a) DELETE * FROM pilot WHERE pilot_name = all;





Answer: b) TRUNCATE TABLE pilot;

“TRUNCATE TABLE table_name;” is the query to delete all records from a table.



4. Consider a table FLIGHT with the schema FLIGHT(flight_name, source, destination, hub, operator).  If for some reason, there is a possibility that a flight can have two or more hubs, then what would be the key for FLIGHT table?

a) flight_name, source, destination

b) flight_name, source, hub, destination

c) hub, flight_name, source

d) flight_name, source, destination, operator


Answer: b) flight_name, source, hub, destination

Flight_name, source, and destination are the attributes that already mentioned as the key for FLIGHT table. If the flight have two or more hubs, in that case, the (flight_name, source, destination) cannot be the key anymore. Hence, we can add the attribute ‘hub’ with the composite key.



5. There are numerous merits of using database approach in contrast to file processing approaches. Which among the listed options is/are not true of using database approach?

a) Data redundancy can be reduced

b) Data inconsistency can be avoided to some extent

c) Computing resources needed for data processing can be reduced

d) Data processing standards can be enforced.


Answer: c) Computing resources needed for data processing can be reduced

Database approach is achieved through complex programming. Hence, we cannot reduce the resources like memory, processor etc.



6. Consider the company database schema given below;

Employee (Emp_No, name)

Department (DID, Dname, Addr)

Project (PID, PName, Plocation)

Works (ENo, PID, Dept_No, Date_of_joining)

Here, WORKS is a relationship between EMPLOYEE, PROJECT, and DEPARTMENT. Which of the following questions cannot be answered using this database schema?

a) What is the total number of employees working in a project of PWD department?

b) Which department has more number of projects?

c) In which project, Mr. Guna is working under the Finance department?

d) What is the number of projects executed by PWD department at the cost of two million?


Answer: d) What is the number of projects executed by PWD department at the cost of two million?

The question given in option (d) cannot be achieved through the given database schema. Though we are able to find the number of projects, we cannot satisfy the condition as project cost is not an attribute of the entire schema.


7. Use the ER diagram given below to answer this question;

ER diagram for building database

If there 320 employees, 54 buildings and 25 administrators, what would be the minimum number of records would end up in the relationship R?

a) 0

b) 320

c) 1350

d) 3200


Answer: a) 0

Minimum number of records that will result in a table created out of R is 0. This happens if none of the entities from each of these entity sets are not participating in R.



Related posts:

Quiz questions with answers on DBMS introduction concepts

Solved quiz questions on user types and database access

MCQ with answers on ER model and data access

logical vs physical join operators in RDBMS

No comments:

Post a comment

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents