Database Management System Likely Examination Questions And Answers MySQL - Campus Gist Today


1. In the relational modes, cardinality is termed as: 

 (A) Number of tuples.     (B) Number of attributes. 

 (C) Number of tables.     (D) Number of constraints. 

 Ans: A

2. Relational calculus is a 

 (A) Procedural language.         (B) Non- Procedural language. 

(C) Data definition language.     (D) High level language. 

Ans: B 

3. The view of total database content is 

 (A) Conceptual view.         (B) Internal view. 

 (C) External view.             (D) Physical View. 

 Ans: A

4.Cartesian product in relational algebra is 

 (A) a Unary operator.     (B) a Binary operator. 

 (C) a Ternary operator.     (D) not defined. 

 Ans: B 

 5. DML is provided for 

 (A) Description of logical structure of database.      (B) Addition of new structures in the database system. 

(C) Manipulation & processing of database.      (D) Definition of physical structure of database system. 

 Ans: C 

6. Which of the following is a software that enables user to create and maintain a database.

A) Keys

B) Translators

C) Program 

D) DBMS

Ans: D

7. In a relational schema, each tuple is divided into fields called

A) Relations 

B)Domains 

C) Queries

D) Keys

Ans B

8. In an ER model, which of the following is described in the database by storing its data.

A) Entity 

B) Attribute

C) Relationship 

D) Notation

Ans: B

9. An advantage of the database management approach is

A) data is dependent on programs 

B) data redundancy increases

C) data is integrated and can be accessed by multiple programs

D) File structure is defined in the program code

Ans: C

10. The collection of information stored in a database at a particular moment is called........

A) schema

B) instance of the database 

C) data domain

D) independence

Ans B

11.‘AS’ clause is used in SQL for 

(A) Selection operation. 

(B) Rename operation. 

(C) Join operation. 

(D) Projection operation

Ans: B

12. ODBC stands for 

(A) Object Database Connectivity. 

(B) Oral Database Connectivity. 

(C) Oracle Database Connectivity. 

(D) Open Database Connectivity.

Ans: D

13. Architecture of the database can be viewed as 

(A) two levels. 

(B) four levels. 

 (C) three levels. 

(D) one level. 

 Ans: C

14. In a relational model, relations are termed as 

(A) Tuples. 

(B) Attributes

(C) Tables. 

(D) Rows. 

 Ans: C

15) The database schema is written in 

 (A) HLL 

(B) DML 

 (C) DDL 

(D) DCL 

 Ans: C

16) In the architecture of a database system external level is the 

(A) physical level. 

(B) logical level. 

(C) conceptual level 

(D) view level. 

 Ans: D 

17. An entity set that does not have sufficient attributes to form a primary key is a 

 (A) strong entity set. 

(B) weak entity set. 

(C) simple entity set. 

(D) primary entity set. 

 Ans: B 

18. In a Hierarchical model records are organized as 

 (A) Graph. 

(B) List. 

(C) Links. 

(D) Tree.

Ans: D

19. In an E-R diagram attributes are represented by 

(A) rectangle. 

(B) square. 

(C) ellipse. 

(D) triangle. 

 Ans: C 

 20. In case of entity integrity, the primary key may be 

 (A) not Null 

(B) Null 

 (C) both Null & not Null. 

(D) any value. 

 Ans: A 

 21. In tuple relational calculus P1 → P2 is equivalent to 

(A) ¬P1 ∨ P2 

(B) P1 ∨ P2 

(C) P1 ∧ P2 

(D) P1 ∧ ¬P2 

Ans: A

22. The language used in application programs to request data from the DBMS is referred to as the 

(A) DML 

(B) DDL 

(C) VDL 

(D) SDL 

 Ans: A 

23. A logical schema 

(A) is the entire database. 

(B) is a standard way of organizing information into accessible parts. 

(C) describes how data is actually stored on disk. 

(D) both (A) and (C) 

Ans: A

24. Related fields in a database are grouped to form a 

(A) data file. 

(B) data record. 

(C) menu. 

(D) bank. 

Ans: B

25. The database environment has all of the following components except: 

(A) users. 

(B) separate files. 

(C) database. 

(D) database administrator. 

Ans: A

26. The language which has recently become the defacto standard for interfacing application programs with relational database system is 

(A) Oracle. 

(B) SQL. 

(C) DBase. 

(D) 4GL. 

Ans: B 

27. The way a particular application views the data from the database that the application uses is a 

(A) module. 

(B) relational model. 

(C) schema. 

(D) sub schema. 

Ans: D 

28. In an E-R diagram an entity set is represent by a 

(A) rectangle. 

(B) ellipse. 

(C) diamond box. 

(D) circle. 

Ans: A 

 29. A report generator is used to 

(A) update files. 

(B) print files on paper. 

(C) data entry. 

(D) delete files. 

 Ans: B

30. The property / properties of a database is / are : 

 (A) It is an integrated collection of logically related records. 

 (B) It consolidates separate files into a common pool of data records. 

(C) Data stored in a database is independent of the application programs using it. 

(D) All of the above. 

Ans: D 

31. The DBMS language component which can be embedded in a program is 

(A) The data definition language (DDL). 

(B) The data manipulation language (DML). 

(C) The database administrator (DBA). 

(D) A query language. 

Ans: B 

 32. A relational database developer refers to a record as 

(A) a criteria. 

(B) a relation. 

(C) a tuple. 

(D) an attribute. 

Ans: C

33.The relational model feature is that there

(A) is no need for primary key data. 

(B) is much more data independence than some other database models. 

(C) are explicit relationships among records. 

(D) are tables with many dimensions. 

Ans: B

34. Conceptual design 

(A) is a documentation technique. 

(B) needs data volume and processing frequencies to determine the size of the database. 

(C) involves modelling independent of the DBMS. 

(D) is designing the relational model. 

 Ans:C 

35. The method in which records are physically stored in a specified order according to a key field in each record is 

 (A) hash. 

(B) direct. 

(C) sequential. 

(D) all of the above. 

 Ans: A  

36. A subschema expresses 

(A) the logical view. 

(B) the physical view. 

(C) the external view. 

(D) all of the above. 

 Ans: C

37. Count function in SQL returns the number of 

(A) values. 

(B) distinct values. 

 (C) groups. 

(D) columns. 

 Ans: A

38.Which one of the following statements is false? 

 (A) The data dictionary is normally maintained by the database administrator. 

(B) Data elements in the database can be modified by changing the data dictionary. 

(C) The data dictionary contains the name and description of each data element. 

(D) The data dictionary is a tool used exclusively by the database administrator. 

Ans: B

39. An advantage of the database management approach is 

(A) data is dependent on programs. 

(B) data redundancy increases. 

(C) data is integrated and can be accessed by multiple programs. 

(D) none of the above. 

Ans: C 

40. A DBMS query language is designed to 

(A) support end users who use English-like commands. 

(B) support in the development of complex applications software. 

(C) specify the structure of a database. 

(D) all of the above. 

Ans: D 

41. Transaction processing is associated with everything below except 

(A) producing detail, summary, or exception reports. 

(B) recording a business activity. 

(C) confirming an action or triggering a response. 

(D) maintaining data. 

Ans: C 

42. It is possible to define a schema completely using 

(A) VDL and DDL. 

(B) DDL and DML. 

(C) SDL and DDL. 

(D) VDL and DML. 

Ans: B

43. The method of access which uses key transformation is known as (A) direct. (B) hash. (C) random. (D) sequential. Ans: B 

44. Data independence means 

(A) data is defined separately and not included in programs. 

(B) programs are not dependent on the physical attributes of data. 

(C) programs are not dependent on the logical attributes of data.  

(D) both (B) and (C). 

Ans: D both (B) and (C) 

 45. The statement in SQL which allows to change the definition of a table is 

(A) Alter. 

(B) Update. 

(C) Create. 

(D) select. 

 Ans: A

46. E-R model uses this symbol to represent weak entity set ? 

(A) Dotted rectangle. 

(B) Diamond 

(C) Doubly outlined rectangle 

(D) None of these 

Ans: C 

47. SET concept is used in : 

(A) Network Model 

(B) Hierarchical Model 

(C) Relational Model 

(D) None of these 

Ans: A 

48. Relational Algebra is 

(A) Data Definition Language . 

(B) Meta Language 

(C) Procedural query Language 

(D) None of the above 

Ans: C 

49. Key to represent relationship between tables is called 

(A) Primary key 

(B) Secondary Key 

(C) Foreign Key 

(D) None of these 

Ans: C




Question 1

The Accra Service Club wants to run a babysitting service. Customers call to request a sitter and the Club Coordinator assigns an employee to sit for the customer from a list of employees available for the particular day requested.

Required:

A.Write down the relation schema showing entities, attributes, primary and foreign keys 

Answer

The relation schema with entities, attributes, primary keys, and foreign keys:

  1. Customer:

    • CustomerID (Primary Key)
    • Name
    • Phone Number
    • Address
  2. Club Coordinator:

    • CoordinatorID (Primary Key)
    • Name
    • Phone Number
  3. Employee:

    • EmployeeID (Primary Key)
    • Name
    • Availability
  4. Babysitting Assignment:

    • AssignmentID (Primary Key)
    • CustomerID (Foreign Key referencing Customer)
    • EmployeeID (Foreign Key referencing Employee)
    • Date




Question 2

a. List 6 examples of database applications

1. Human Resource Management systems

2. Manufacturing and Production Systems

3. Airline Systems

4. Online Retailers

5. Banking System

6. School Management Systems

b. State and explain three limitations of the file-based approach 

Answer

Three limitations of the file-based approach are:

  1. 1. Data Redundancy: In a file-based system, the same data may be duplicated in multiple files, leading to data redundancy and increased storage requirements.


  2. 2. Data Inconsistency: Since data is scattered across various files, it can be challenging to maintain data consistency. Updates or changes to data in one file may not be reflected in other related files, leading to inconsistencies.


  3. 3. Data Isolation: Data in a file-based system is often isolated within individual applications. Accessing data from one application to another can be complex and may require custom programming.

c.State the 5 main components of the DBMS environment 

Answer

The five main components of the DBMS environment are:

  1. 1. Data: This includes the actual data stored in the database, which is organized into tables or files.

  2. 2. Hardware: The physical devices and infrastructure that support the operation of the DBMS, including servers, storage devices, and network equipment.


  3. 3. Software: The DBMS software itself, which provides tools for creating, managing, and interacting with databases. Examples include Oracle, MySQL, and Microsoft SQL Server.


  4. 4. People: Database administrators, developers, and end-users who interact with the DBMS to create, maintain, and retrieve data.


  5. 5. Procedures: The rules, policies, and procedures that govern how data is accessed, updated, and secured within the database system.

d. State 5 advantages of DBMSs (5 marks)

  1. Answer

  2. 1. Data Centralization: DBMSs centralize data storage, making it easier to manage and access data from a single location.

  3. 2. Data Integrity: DBMSs enforce data integrity constraints, ensuring data accuracy and consistency.

  4. 3. Data Security: DBMSs provide robust security features to protect sensitive data through user authentication and authorization.

  5. 4. Concurrent Access: Multiple users can access the database simultaneously without conflicts, thanks to concurrency control mechanisms.

  6. 5. Data Recovery: DBMSs offer backup and recovery mechanisms to prevent data loss in case of system failures.

e. State 5 disadvantages of DBMSs (5 marks)

  1. Answer

  2. 1. Complexity and Cost: Implementing and maintaining a DBMS can be complex and expensive, particularly for small businesses.


  3. 2. Performance Overhead: DBMSs introduce some performance overhead due to query optimization and data retrieval processes.


  4. 3. Learning Curve: Users and administrators may need training to effectively use and manage a DBMS.


  5. 4. Data Migration Challenges: Moving data between different DBMSs or versions can be challenging and may require data conversion.


  6. 5. Vendor Lock-In: Choosing a specific DBMS vendor can lead to vendor lock-in, making it difficult to switch to another system without significant effort.



Question 3

For the following relation schema:

employee (employee-name, street, city)

works (employee-name, company-name, salary)

company (company-name, city)

manages (employee-name, manager-name)

Give an expression in SQL for each of the following queries:

a) Find the names, street address, and cities of residence for all employees who work for First Bank Corporation' and earn more than $10,000.

Answer 

SELECT e.employee-name, e.street, e.city

FROM employee e

JOIN works w ON e.employee-name = w.employee-name

WHERE w.company-name = 'First Bank Corporation' AND w.salary > 10000;


b) Find the names of all employees in the database who do not work for 'First Bank Corporation'. Assume that all people work for exactly one company.

Answer

SELECT e.employee-name

FROM employee e

LEFT JOIN works w ON e.employee-name = w.employee-name

WHERE w.employee-name IS NULL OR w.company-name <> 'First Bank Corporation';

c) Find the names of all employees in the database who earn more than every employee of 'Small Bank Corporation'. Assume that all people work for at most one company.

Answer

SELECT e.employee-name

FROM employee e

JOIN works w ON e.employee-name = w.employee-name

WHERE w.salary > ALL (

    SELECT w2.salary

    FROM works w2

    WHERE w2.company-name = 'Small Bank Corporation'

);


This page will be updated from time to time so stay tuned...........................
Tags

Post a Comment

0Comments
Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !