DBMS Imp Questions - All Units PDF
Document Details
Uploaded by Deleted User
Tags
Summary
This document contains a set of important questions on database management systems (DBMS), covering various concepts including SQL, PL/SQL, and MongoDB. The questions are categorized by unit, providing a structured approach for studying and practicing DBMS topics. Includes examples and practical application aspects of concepts.
Full Transcript
**[Unit 1&2 (3m quest)]** **1.Define the terms entity and entity set**. 2\. **State the purpose of DBMS** 3\. **Give the query to display the names of all the employees whose** **salary \>10000 from emp table.** 4\. **List any six DDL commands of SQL with their syntax**. 5\. **Define the terms...
**[Unit 1&2 (3m quest)]** **1.Define the terms entity and entity set**. 2\. **State the purpose of DBMS** 3\. **Give the query to display the names of all the employees whose** **salary \>10000 from emp table.** 4\. **List any six DDL commands of SQL with their syntax**. 5\. **Define the terms instance and schema.** 6\. **List any three important roles of DBM** **7. State the purpose of any three character handling functions of SQL( ).** **8. Give the purpose of SYSDATE( ) and ROUND() in SQL** **9. List any three duties of a database administrator.** **10. Define attribute and entity.** **11. List various types of DDL statements.** **12. Write the difference between truncate and delete commands of SQL**. **[8-marks]** 1 **Explain the structure of database system with legible sketch** **2. Explain CODD's twelve rules for RDBMS.** **3. explain normalization and various types of normal forms in detail.** **4. Explain transaction control commands in SQL with syntax.** **5. Explain any five data types available in SQL with proper examples** **in each case.** **6. Explain specialization and aggregation in DBMS.** **7. Explain GRANT and REVOKE commands in SQL with syntax.** **8. Explain the creation of a subquery with syntax and example.** **9. Explain different levels of data abstraction.** **10. Explain any four string functions with examples in SQL.** **11. List and explain mapping cardinalities.** **12. Explain about various TCL statements in SQL.** **[Unit 3 (3 marks)]** 1. **Give the structure of a PL/SQL block.** 2. **List any six features of PL/SQL.** 3. **Write any three characteristics of procedure subprogram unit in PL/SQL.** 4. **Define input and output statements in PL/SQL with syntax.** 5. **What is the syntax of while LOOP in PL/SQL?** 6. **Define subprogram**. **Unit-3 (8 marks)** 1. Explain all the looping statements of PL/SQL with syntax and examples. 2. Develop a PL/SQL program to reverse the given number. 3. Explain any eight PL/SQL numeric datatypes with their subtypes. 4. Explain CASE and GOTO statements in PL/SQL with syntax 5. Explain about scope and visibility of a variable in PL/SQL 6. Explain about various comparison operators in PL/SQL. **[Unit 4 (3 marks)]** 1. Define an exception. 2. Write any three advantages of triggers 3. List any three implicit exceptions along with their purpose. 4. What is an implicit cursor 5. List any three named exceptions 6. Write the syntax for 'trigger' creation **[8 marks]** 1. Explain the user defined exceptions with syntax in PL/SQL. 2. Describe implicit and explicit cursors with examples. 3. Explain creation of explicit cursor in PL/SQL with example 4. Explain user defined exceptions with syntax and example 5. Explain how to re-raise an exception in PL/SQL. 6. Explain about life cycle of a cursor. **[Unit 5 (3 marks)]** 1. What is MongoDB? 2. Define CAP theorem 3. List any four advantages of MongoDB 4. State the need of NoSQL. 5. List the commands used for CRUD operations in MongoDB. 6. State the need of NoSQL **[8 marks]** 1. Write the procedure of inserting and updating documents in MongoDB with example. 2. Explain the need of NoSQL as alternative to RDBMS 3. Explain the classification of NoSQL. 4. Explain the procedure for updating and deleting a document in MongoDB 5. Explain the process of creating and dropping of collections in mongoDB. 6. Explain about key-value stores databases. **[10 marks:]** 1 How do you create an employee table with id, name, age, address and salary by choosing appropriate data types for the columns and with a minimum of 5 records and can you create a view to store and display minimum, maximum and average salaries of all the employees without modifying the table contents? Justify your answer. 2 Explain the process of joining 3 tables in SQL with example. 3\. Develop an application of a banking system, to reflect the changes of banking transaction in respective tables, to transfer funds from savings account to current account and to record the transaction in the transaction Journal by using COMMIT and ROLLBACK to ensure the data consistency and integrity Answer: Create a database. The first step is to create a database that will store the data for the banking system. This database should have several tables, including a savings account table, a current account table, and a transaction journal table. Create tables. The next step is to create the tables in the database. The savings account table should store information about each savings account, such as the account number, the account holder\'s name, and the account balance. The current account table should store information about each current account, such as the account number, the account holder\'s name, and the account balance. The transaction journal table should store information about each transaction, such as the transaction date, the transaction type, the amount of the transaction, and the accounts involved in the transaction. Create functions. The next step is to create functions that will be used to perform various tasks on the data in the database. For example, we will need a function to transfer funds from a savings account to a current account. We will also need a function to record a transaction in the transaction journal. Create a user interface. The final step is to create a user interface that will allow users to interact with the banking system. For example, users should be able to view their account balances, transfer funds between accounts, and view their transaction history. Once the banking system has been developed, it can be used to transfer funds from a savings account to a current account and to record the transaction in the transaction journal. The COMMIT and ROLLBACK statements can be used to ensure the data consistency and integrity. Here is an example of how the COMMIT and ROLLBACK statements can be used to ensure the data consistency and integrity: BEGIN TRANSACTION; TRANSFER FUNDS FROM savings\_account TO current\_account; RECORD TRANSACTION IN TRANSACTION\_JOURNAL; COMMIT; If the transaction is successful, the COMMIT statement will make the changes to the database permanent. If the transaction fails, the ROLLBACK statement will undo the changes to the database.