dbms final exam

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/110

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 3:54 AM on 5/6/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

111 Terms

1
New cards

What is a transaction in the context of a database?

a. A set of database records
b. A sequence of operations on a database
c. A database query
d. A data structure used for indexing

B. A sequence of operations on a database

2
New cards

Which of the following is an example of a concurrency control technique?
a. Indexing
b. Normalization
c. Locking
d. Data Encryption

C. Locking

3
New cards

In the context of transaction management, what is a deadlock?
a. A failure in the durability property of a transaction
b. The end state of a successfully executed transaction
c. A situation where two or more transactions are waiting for each other to release locks
d. The isolation level of a transaction

C. A situation where two or more transactions are waiting for each other to release locks

4
New cards

What is the purpose of the COMMIT statement in a database transaction?
a. To initiate a new transaction
b. To permanently save the changes made by a transaction
c. To roll back a transaction
d. To release locks held by a transaction

B. To permanently save the changes made by a transaction

5
New cards

What is the purpose of the ROLLBACK statement in a database transaction?
a. To initiate a new transaction
b. To permanently save the changes made by a transaction
c. To reverse the effects of a transaction that cannot be completed
d. To release locks held by a transaction

C. to reverse the effects of a transaction that cannot be completed

6
New cards

What does the SQL statement SELECT * FROM Employees; do?
a. Deletes all records from the Employees table
b. Inserts a new record into the Employees table
c. Retrieves all columns and records from the Employees table
d. Updates the records in the Employees table

C. Retrieves all columns and records from the Employees table

7
New cards

What is the purpose of the SQL GROUP BY clause?
a. To join filter rows based on a specified condition
b. To sort the result set in ascending or descending order
c. To aggregate data based on one or more columns
d. To join multiple tables in a query

C. To aggregate data based on one or more columns

8
New cards

Which of the following SQL functions is used to find the total number of rows in a table?
a. COUNT(*)
b. SUM()
c. AVG()
d. MAX()

A. COUNT(*)

9
New cards

What is the purpose of the SQL JOIN operation?
a. To filter rows based on a specified condition
b. To sort the result set in ascending or descending order
c. To combine rows from two or more tables based on a related column
d. To group rows based on a specified condition

C. To combine rows from two or more tables based on related columns

10
New cards

Which SQL clause is used to sort the result set of a query in ascending or descending order?
a. GROUP BY
b. ORDER BY
c. WHERE
d. HAVING

B. ORDER BY

11
New cards

Which of the following is not a data type in SQL?
A. VARCHAR
B. NUMBER
C. INDEX
D. DATE

C. INDEX

12
New cards

Which of the following is an example of a Data Definition Language (DDL) statement?
A. SELECT
B. INSERT
C. CREATE
D. UPDATE

C. CREATE

13
New cards

In a database, what does the acronym DML stand for?
A. Data Management Language
B. Database Modification Language
C. Data Manipulation Language
D. Database Modeling Language

C. Data Manipulation Language

14
New cards

A Data Warehouse is typically:
A. OLTP system
B. Normalized database
C. Subject-oriented, integrated, time-variant, non-volatile
D. Real-time data entry system

C. Subject-oriented, integrated, time-variant, non-volatile

15
New cards

The process of cleaning, transforming, and loading data into a warehouse is called:
A. OLTP
B. Data Mining
C. ETL
D. SQL Tuning

C. ETL

16
New cards

“Fact tables” in a Data Warehouse store:
A. Descriptive attributes
B. Historical and quantitative measures
C. Metadata about schemas
D. User access logs

B. Historical and quantitative measures

17
New cards

A Data Mart is:
A. A small operational database
B. A subset of a Data Warehouse designed for a department
C. A replication server
D. A backup copy of a warehouse

B. A subset of a Data Warehouse designed for a department

18
New cards

Data fragmentation in distributed databases means:
A. Breaking data into smaller pieces stored at different locations
B. Duplicating all data at multiple sites
C. Encrypting data
D. Compressing data

A. Breaking data into smaller pieces stored at different locations

19
New cards

Replication in distributed databases refers to:
A. Storing multiple copies of data at different sites
B. Removing unnecessary data
C. Compressing data for storage
D. Merging relational tables

A. Storing multiple copies of data at different sites

20
New cards

Which of the following provides high availability in DDBMS?
A. Deadlock
B. Replication
C. Normalization
D. SQL Views

B. Replication

21
New cards
<p>Write a query to Return the sum of all Quantity fields in the OrderDetails table:</p>

Write a query to Return the sum of all Quantity fields in the OrderDetails table:

Select sum(quantity) from orderdetails

22
New cards
<p>Write a query to Return the average of the Quantity field for the product with orderID 10248:</p>

Write a query to Return the average of the Quantity field for the product with orderID 10248:

Select avg(quantity) from orderdetails
Where orderID=10248

23
New cards
<p>return all the records from the Employee table where the Gender is not a Male</p>

return all the records from the Employee table where the Gender is not a Male

select * from employee where Gender !=”Male”

24
New cards
<p>return all the records from the Employee table where salary is higher than 45000 from IT department</p>

return all the records from the Employee table where salary is higher than 45000 from IT department

select * from employee where Salary>45000 AND Department=”ID”

25
New cards
<p>Sort the products from highest to lowest price</p>

Sort the products from highest to lowest price

Select * from product
Order by price desc

26
New cards
<p>Sort the products alphabetically by ProductName</p>

Sort the products alphabetically by ProductName

Select * from product
Order by productname ASC

27
New cards
<p>Find the lowest price in the Price column for category 2</p>

Find the lowest price in the Price column for category 2

Select min(price) from product
Where categoryID=2

28
New cards
<p>Return the average price of products in category 1:</p>

Return the average price of products in category 1:

Select avg(price from product)
Where categoryID=1

29
New cards
<p>Let us assume, we have a table “GeeksTab”<br>SELECT COUNT(Name)<br>FROM GeeksTab;<br>Calculate.</p>

Let us assume, we have a table “GeeksTab”
SELECT COUNT(Name)
FROM GeeksTab;
Calculate.

4

30
New cards
<p>Let us assume, we have a table “GeeksTab”, <br>SELECT AVG(Age)<br>FROM GeeksTab<br>Where salary &gt;6000;<br>Calculate</p>

Let us assume, we have a table “GeeksTab”,
SELECT AVG(Age)
FROM GeeksTab
Where salary >6000;
Calculate

31

31
New cards
<p>Let us assume, we have a table “GeeksTab”<br>SELECT SUM(Salary)<br>FROM GeeksTab<br>Where age&gt;30;<br>Calculate</p>

Let us assume, we have a table “GeeksTab”
SELECT SUM(Salary)
FROM GeeksTab
Where age>30;
Calculate

12300

32
New cards
<p>What is the Full Function dependency</p>

What is the Full Function dependency

(C1, C3) → C2, C4, C5

33
New cards
<p>What is Passive dependency</p>

What is Passive dependency

C1 → C2

34
New cards
<p>What is Transitive Dependency?</p>

What is Transitive Dependency?

C4 → C5

35
New cards

A theater shows one or many movies
A movie can be shown in one or many theaters
A movie receives one or more reviews
Each review belongs to one and only one movie
A reviewer writes one or more reviews
Each review can be written by one and only one reviewer

knowt flashcard image
36
New cards

What is DBMS purpose?

Store data
Retrieve data efficiently
Reduce redundancy
Maintain integrity

37
New cards

What are the problems of File System?

Data redundancy
Data inconsistency
No centralized control

38
New cards

What is a Schema

Logical structure of database

39
New cards

What is a Instance

Data at a specific time

40
New cards

In Chen’s Notation, What does the symbol Rectangle mean?

Entity

41
New cards

In Chen’s Notation, What does the symbol Double Rectangle mean?

Weak Entity

42
New cards

In Chen’s Notation, What does the symbol Ellipse mean?

Attribute

43
New cards

In Chen’s Notation, What does the Underlined Attribute mean?

Primary key

44
New cards

In Chen’s Notation, What does the Double Ellipse mean?

Multivalued attribute

45
New cards

In Chen’s Notation, What does the Dashed Ellipse mean?

Derived Attribute

46
New cards

In Chen’s Notation, What does the Diamond mean?

Relationship

47
New cards

In Crowfoot Notation, What does the Rectangle mean?

Entity

48
New cards

In Crowfoot Notation, What does the Double Rectangle mean?

Weak Entity

49
New cards

In Crowfoot Notation, What does the Oval (inside entity) mean?

Attribute

50
New cards

In Crowfoot Notation, What does the PK (or underlined) mean?

Primary Key

51
New cards

In Crowfoot Notation, What does the FK mean?

Foreign Key

52
New cards

In Crowfoot Notation, What does the — mean?

One (Mandatory)

53
New cards

In Crowfoot Notation, What does the O— mean?

Zero or one

54
New cards

In Crowfoot Notation, What does the —< mean?

One to Many one or more

55
New cards

In Crowfoot Notation, What does the O—< mean?

Zero to Many Optional many

56
New cards

What does 1:1 mean

One to one

57
New cards

What does 1:M mean

One to Many

58
New cards

What does M:N mean

Many to Many (needs associative entity)

59
New cards

What does Recursive Entity relate to?

Relates to itself.

60
New cards

What does Many to Many always create?

Bridge table

61
New cards

What is Primary key?

Uniquely identifies record

62
New cards

What is Foreign key?

References another table

63
New cards

What is Composite key

More than one attribute

64
New cards

What is Candidate key?

Possible primary key

65
New cards

What is Super Key?

Any unique attribute combination

66
New cards

In relational model, what is a Table?

Relation

67
New cards

In relational model, what is a Row?

Tuple

68
New cards

In relational model, what is a Column?

Attribute

69
New cards

In relational model, what is a Domain?

Allowed values of attribute

70
New cards

What must every relation have?

Primary key

71
New cards

What is 1NF?

Atomic Values
No repeating groups

72
New cards

What is 2NF?

In 1NF
No Partial Dependency

73
New cards

What is 3NF?

In 2NF
No Transitive Dependency

74
New cards

What is BCNF?

Every determinant is a candidate key

75
New cards

What is Selection in Basic Operations?

Chooses specific rows from table that satisfy a condition

76
New cards

What is Projection in Basic Operations?

Chooses specific columns from a table

77
New cards

What is Union in Basic Operations?

Combines rows from two compatible tables and removes duplicates

78
New cards

What is Intersection in Basic Operations?

Returns only the rows that appear in both tables

79
New cards

What is Difference in Basic Operations?

Returns rows that exist in one table but not in the other

80
New cards

What is Catesian Product (x) in Basic Operations?

Combines every row of one table with every row of another table

81
New cards

What is Partial Dependency?

Depends on part of composite key

82
New cards

What is Transitive Dependency?

Depends on non-key attribute

83
New cards

What is Entity Integrity?

PK cannot be null

84
New cards

What is Referential Integrity

FK must match PK or be NULL

85
New cards

Transaction Management

Process of controlling and organizing database transactions to ensure data is accurate and reliable

86
New cards

Concurrency Control

Prevents conflicts when multiple users access data

87
New cards

What are the problems with Concurrency Control?

Lost update
Uncommitted data
Inconsistent retrival

88
New cards

Transaction Basics

Fundamental concepts of a transaction, which is a sequence of database operations treated as one unit of work that either fully completes or fully fails

89
New cards

A transaction follows ACID properties

Atomicitiy → All or nothing
Consistency → Maintains integrity
Isolation → Transactions dont’t intefere
Durability → Changes are permanent

90
New cards

What is Locking Technique (2PL - Two-Phase Locking)

A concurrency control method where a transaction first acquires all needed locks before releasing any, helping maintain consistency.

91
New cards

What is Shared Lock (Read)?

Allows multiple transactions to read the same data at the same time, but prevents writing

92
New cards

What is Exclusive Lock (Write)?

Allows only one transaction to read/write data while preventing others from accessing it.

93
New cards

What is Timestamp Ordering?

A concurrency control technique that uses timestamps to determine the order transactions should execute

94
New cards

What is Deadlock Handling?

Methods used to detect, prevent, or resolve deadlocks, where transactions wait on each other indefinitely

95
New cards

What are the key features of Distributed DBMS?

Data stored across multiple locations
Appears as a single system
Reliable & scalable

96
New cards

What is Horizontal Fragmentation?

Rows of table are divided across locations

97
New cards

What is Vertical Fragmentation?

Columns of a table are divided across locations

98
New cards

What is Replication?

Copies of the same data stored at multiple sites

99
New cards

What is Location Transparency

Users do not need to know where data is physically stored

100
New cards

What is Replication Transparency

Users do not see multiple copies of data