DBMS Pyq 2020
DBMS Pyq 2020
1 1
Control Has
Instrctor_Id
M M
Instructor’s Name
Instructor
Class
M 1 Code
Time M
instruction
Subject
ClassId
Subject Have
Enrollment_No.
M
M
Enrolled Enrollment
Marks
Branch Name
According to E-R Diagram, There are following Entities.
1.Registrar Office
2.Insturctor
3.Class
4.Enrollment
1. ID(Primary Key)
2. Room No.
3. Registrar’s Name
1. Instructor’s_ID(Primary Key)
2. Instructor’s_Name
3. Code
4. Subject
1. Class_ID(Primary Key)
2. Time
3. Subject
Enrollment have following attributes.
1. Enrollment_No.(Primary Key)
2. Marks
3. Branch
4. Name
According to E-R Diagram , Registrar Office have
two Relationship between Instructor and Class.
1. Relationship between Registrar Office and Instructor is one to many
relationship.
2. Relationship between Registrar Office and Class is one to many relationship
.
Tuples:- In the context of databases and the relational model, a tuple refers
to a single row or record in a table. It represents a collection of related data
items or attributes that describe a specific entity or instance. Each attribute in a
tuple corresponds to a specific column or field in the table.
In this example, each row represents a tuple in the "Students" table. Each
tuple contains four attributes: "StudentID," "Name," "Age," and "Mobile
No."
The generalized projection operation is denoted using the π (pi) symbol. The
general syntax is:
π<attribute list>(relation)
If we want to retrieve only the "Name" and "Department" attributes from the
"Employees" table, we can apply generalized projection as follows:
π(Name, Department)(Employees)
The result of the generalized projection operation would be a new table with only
the selected attributes:
Name Department
John IT
Mary HR
David IT
Name Department
Jessica Sales
Example of Outer Join:- Consider two tables, "Customers" and "Orders," with
the following data:
Customers Table:
CustomerID CustomerName
1 John
CustomerID CustomerName
2 Mary
3 David
101 1 2022-01-01
102 1 2022-02-01
Result:
CustomerID CustomerName OrderID OrderDate
Here are some commonly used aggregate functions along with examples:
Example: SELECT COUNT(*) FROM Customers; This query returns the total
number of rows in the "Customers" table.
2. SUM(): The SUM() function calculates the sum of values in a column
or expression.
Example: SELECT SUM(Price) FROM Orders; This query returns the sum of all
"Price" values in the "Orders" table.
Example: SELECT AVG(Age) FROM Students; This query returns the average
age of all students in the "Students" table.
Example: SELECT MAX(Revenue) FROM Sales; This query returns the highest
revenue value from the "Sales" table.
Answer:- The ACID properties are a set of fundamental properties that ensure
reliability, consistency, and integrity in database transactions. ACID stands for
Atomicity, Consistency, Isolation, and Durability. Let's explain the usefulness
of each property:
Overall, the benefit of rigorous two-phase locking lies in its ability to provide
strict consistency, serializability, and predictable transaction execution, which
are essential in maintaining data integrity and correctness in a concurrent
database environment.
7(a) What is the purpose of having separate categories for
index authorization and resource authorization?
Benefits:
Benefits:
Ans:-