content

Section-A (2 Marks)

Mention any two feature of PL/SQL.

PL/SQL (Procedural Language/Structured Query Language) is a block-structured language developed by Oracle that allows developers to combine the power of SQL with procedural programming constructs.

(GeeksForGeeks)

What is single-user system in DBMS?

A single-user database management system (DBMS) like SQLite is a system that only allows one user to access the database at a time.

(GeeksForGeeks)

What is an insert anomaly?

Anomalies refer to inconsistencies or errors that can arise when working with relational databases. They can be broken down into 3 types:

Insert Anomalies occur when it is not possible to insert data into a database because the required fields are missing or because the data is incomplete.

(GeeksForGeeks)

What is a transaction failure?

Transaction Failure is when a transaction is unable to execute further due to a logical error in the procedure or a system error like deadlocks or resource constraints

(GeeksForGeeks)

What is a transaction processing?

Transaction Processing is how a transaction is processed on a DBMS.

(GeeksForGeeks)

What is concurrency control?

Concurrency Control is the process of ensuring simultaneous execution or updation of data by several processes or users

Section-B (4 Marks)

Explain basic syntax of PL/SQL?

PL/SQL Queries are more or less blocks of code.

Syntax:

DECLARE
    declaration statements;

BEGIN
    executable statements

EXCEPTIONS
    exception handling statements

END;

(GeeksForGeeks)

Write a note in anomalies in relational database design.

Anomalies refer to inconsistencies or errors that can arise when working with relational databases. These anomalies can be categorized into three types:

(GeeksForGeeks)

Write a note on properties of transactions.

A transaction is a single logical unit of work that accesses and possibly modifies the contents of a database.

The acronym ACID stands for Atomicity, Consistency, Isolation, and Durability. ACID Can be broken down to:

(GeeksForGeeks)

What is functional dependency? Explain

In relational database management, functional dependency is a concept that specifies the relationship between two sets of attributes where one attribute determines the value of another attribute. It is denoted as X → Y, where the attribute set on the left side of the arrow, X is called Determinant, and Y is called the Dependent.

Explain function with example in PL/SQL.

A standalone function is created using the CREATE FUNCTION statement. The simplified syntax for the CREATE OR REPLACE PROCEDURE statement is:

CREATE [OR REPLACE] FUNCTION function_name 
[(parameter_name [IN | OUT | IN OUT] type [, ...])] 
RETURN return_datatype 
{IS | AS} 
BEGIN 
   < function_body > 
END [function_name];

Eg.

Select * from customers; 

| ID | NAME | AGE | ADDRESS | SALARY | |—-|———-|—–|———–|———-| | 1 | Ramesh | 32 | Ahmedabad | 2000.00 | | 2 | Khilan | 25 | Delhi | 1500.00 |

CREATE OR REPLACE FUNCTION totalCustomers 
RETURN number IS 
   total number(2) := 0; 
BEGIN 
   SELECT count(*) into total 
   FROM customers; 
    
   RETURN total; 
END; 
/

Calling the Function

DECLARE 
   c number(2); 
BEGIN 
   c := totalCustomers(); 
   dbms_output.put_line('Total no. of Customers: ' || c); 
END; 
/

(TutorialsPoint)

Explain various transaction failure in DBMS

If a transaction is not able to execute or it comes to a point from where the transaction becomes incapable of executing further then it is termed as a failure in a transaction.

Reason for a transaction failure in DBMS:

FailureClassification

(GeeksForGeeks)

Section-C (8 Marks)

What is normalization? Explain 1NF, 2NF, 3NF, BCNF.

Normalization for relational databases is used to extensively reduce data redundancy and dependency by streamlining database data correctly

Data can be normalized into these forms:

(GeeksForGeeks, Explanation) (GeeksForGeeks, Forms)

Explain transaction states in DBMS

In DBMS, a transaction passes through various states such as active, partially committed, failed, and aborted.

TransactionStates

(GeeksForGeeks)

Write a note on types of lock in concurrency control.

A lock is a variable associated with a data item that describes the status of the data item to possible operations that can be applied to it.

(GeeksForGeeks)

Differentiate between single-user and multi-user system.

| Feature | Single-User DBMS | Multi-User DBMS | |———————–|——————————————-|——————————————| | Definition | Supports one user at a time. | Supports multiple users simultaneously. | | Usage | Typically used for personal applications. | Common in enterprise and collaborative environments. | | Performance | Generally faster due to no contention. | May experience delays due to concurrent access. | | Complexity | Simpler design and management. | More complex, requiring concurrency control. | | Examples | Microsoft Access, SQLite. | Oracle, MySQL, PostgreSQL. |

Write a note on decomposition?

Decomposition refers to the division of tables into multiple tables to produce consistency in the data.

(GeeksForGeeks)

Write a note on transaction read and write operations.

A user can make different types of requests to access and modify the contents of a database. So, we have different types of operations relating to a transaction:

(GeeksForGeeks)