0% found this document useful (0 votes)
4 views14 pages

Dbms Ccv Questions

The document outlines various concepts related to Database Management Systems (DBMS), including types of users, data models, attributes, DBMS architecture, and SQL commands. It also discusses normalization, ACID properties, and transaction management, highlighting the importance of organizing data to minimize redundancy and ensure data integrity. Additionally, it covers advanced topics such as deadlocks, livelocks, and database recovery methods.

Uploaded by

Sooraj P.M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views14 pages

Dbms Ccv Questions

The document outlines various concepts related to Database Management Systems (DBMS), including types of users, data models, attributes, DBMS architecture, and SQL commands. It also discusses normalization, ACID properties, and transaction management, highlighting the importance of organizing data to minimize redundancy and ensure data integrity. Additionally, it covers advanced topics such as deadlocks, livelocks, and database recovery methods.

Uploaded by

Sooraj P.M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

DBMS CCV QUESTIONS

MODULE 1
1. Explain different dbms users.

Sophisticated users: They Interact with the system without writing


programs
• Naive users: They are unsophisticated users who interact with the
system by invoking one of the application programs that have been
written previously
• Application programmers: They are computer professionals who
write
application programs
• Specialized users: They are sophisticated users who write specialized
database applications that do not fit into the traditional data-
processing
Framework.

2. Explain structured data

Structured data: The information stored in relational databases is


known as structured data because it is represented in a strict
format.
3. Different data models

High-level or conceptual data model


Low-level or physical data models
Representational or implementation data models
4. Define schema
overall design of database system
5. Explain different types of attributes

a.Simple and composite attributes


Composite attribute can be divided into further parts(Eg:Name) and
simple attribute cannot be divided into further(Eg:Age)
b.Single-valued and multi-valued attribute
Single-valued attribute have a single value for a particular entity(Eg:Age)
and multi-valued attribute can have set of values for a particular
entity(Eg:
Languages known)
c.Derived and stored attributes
Derived attribute can be derived from other attributes(Eg:Age) and stored
attributes are attributes from which the values of other attributes are
derived

6. Explain the different types of DBMS architecture.


There are three types of DBMS architecture:

● Single tier architecture - The data is readily available on the client

machine.
● Two tier architecture - The DBMS software is present on the client

machine and the database is present on the server machine.


● Three tier architecture - A layer is present between the client and server

machine and there is no direct communication between them. A client


DBMS application on the client machine interacts with a server DBMS
application on the server machine.
7. What is the main difference between DELETE and TRUNCATE command?
DELETE command is used to remove the rows in a table based on the
condition set by the WHERE clause. The rows deleted can be rolled back.

TRUNCATE command is used to remove all the rows in a table without


any conditions. The rows cannot be rolled back.

8. Define a relationship in DBMS and its various types.

A relationship is an association or link between two or more data entities. There


are three main types of relationships in DBMS:

● One to one - A single record in one table is related to a single record in

another table and vice versa.


● One to many / Many to one - A single record of one table is related to

many records of other tables and vice versa.


● Many to many - Multiple records of one table are related to multiple

records of another table.


9. What is E-R model in the DBMS?

E-R model is known as an Entity-Relationship model in the DBMS


which is based on the concept of the Entities and the relationship that
exists among these entities.

10. What is a field in a table?

A field is an entity used for storing a particular type of data within a table
like numbers, characters, dates, etc.

11. Explain TCL commands. What are the different TCL commands in SQL?
Ans. TCL refers to Transaction Control Language. These commands are used to
manage the changes made by DML statements. These are used to process a
group of SQL statements comprising a logical unit. The three TCL commands
are-
● COMMIT – Commit write the changes to the database
● SAVEPOINT – Savepoints are the breakpoints, these divide the
transaction into smaller logical units which could be further roll-
backed.
● ROLLBACK – Rollbacks are used to restore the database since the
last commit.
12.What is a Unique constraint?

A unique constraint is used to ensure that a field or column will have only
a unique value (no duplication).

13. What is a Not NULL constraint?

A Not NULL constraint is used for ensuring that the value in the field
cannot be NULL.

Module 2

1. What does an RDBMS consist of?

A: It consists of a collection of tables i.e, the data is organised in tabular


format. The columns of the relation are known as Fields and rows of the
relation are known as fields. Constraints in a relation are known as
Keys.

2. The ability to query data, as well as insert, delete, and alter tuples, is offered
by
A: DML performs the change in the values of the relation.

3. What is a set of one or more attributes taken collectively to uniquely identify


a record?
A: Super key is the superset of all the keys in a relation.

4. Which command is used to remove a relation from an SQL?


A: The drop table deletes the whole structure of the relation.

5. Student(ID, name, dept name, tot_cred)


In this query which attributes form the primary key?
A: ID

6. Which operation contains all pairs of tuples from the two relations,
regardless of whether their attribute values match.
A: Cartesian product is the multiplication of all the values in the
attributes

7. What is a pictorial depiction of a database schema that shows the database's


relations, attributes, and primary keys and foreign keys?
A: Schema diagram

8. How is an attribute in relation, a foreign key ?


A: If the primary key from one relation is used as an attribute in that
relation.

9. What is a weak entity set


A: An entity set that does not have sufficient attributes to form a primary
key

10. Weak entity set is represented as


A: Double rectangle

11.What term is used to refer to a specific record in your music database; for
instance; information stored about a specific album?
A: Instance

12.An entity in A is associated with at most one entity in B. An entity in B,


however, can be associated with any number (zero or more) of entities in A.
This is called as
A: Many-to-one
Here more than one entity in one set is related to one one entity in other
set.

13.What are data constraints used for


A: Improve the quality of data entered for a specific property

14.Which key uniquely identifies the element in the relation?


A: Primary key
Primary key checks for not null and uniqueness constraint

15.CREATE TABLE employee (name VARCHAR, id INTEGER)


What type of statement is this
A: DDL
Data Definition language is the language which performs all the operation
in defining structure of relation.

MODULE 3
1. What are the differences between Logical files and physical files
2. Which are primary file organization type
3. Name all the SQL DML Queries
4. Which keyword is used for basic retrieval of data in SQL
5. What is the technique used to prevent ambiguity in attribute names
6. What is the function of DISTINCT keyword
7. What are the SET operations used in SQL
8. Name the keyword used for substring matching
9. How to sort a table in SQL
10.Explain EXISTS and UNIQUE functions in SQL
11.Name and comment on the Aggregate functions used in SQL
12.Name different types of JOIN

MODULE 4
1)What are the disadvantages of not normalizing a database

Any relational database without normalization may lead to problems like large
tables, difficulty maintaining the database as it involves searching many
records, poor disk space utilization, and inconsistencies.

2)different types of Normalization forms in a DBMS.

1NF
2NF
3NF
BCNF
4NF
5NF

3)What are the advantages of


normalization?

Database normalization is the process of organizing data to minimize data


redundancy and dependency, resulting in a more efficient and well-structured
database schema.
4)what is insert anomaly and delete anomaly and update anomaly

Insertion anomaly: when a new row is added to a table and it causes an


inconsistency

Update anomaly: if there are changes in database ,we have to apply that
changes in all row if we miss any row we will have one more field creating an
update anomaly in the database

Deletion Anomaly. A deletion anomaly occurs when you delete a record that
may contain attributes that shouldn't be deleted.

5)What is database normalization, and why is it important in database design?

Normalization is the process of organizing data in a database. It includes


creating tables and establishing relationships between those tables according to
rules designed both to protect the data and to make the database more flexible
by eliminating redundancy and inconsistent dependency.

6)What is the First Normal Form (1NF) in database normalization?

1NF requires that each column in a table holds only atomic (indivisible) values
and that all values in a column are of the same data type.

7)What is the Second Normal Form (2NF), and why is it an improvement over
1NF?

2NF builds upon 1NF by adding a requirement that all non-key attributes
(columns) are fully functionally dependent on the entire primary key. It
eliminates partial dependencies.
8)What is the Third Normal Form (3NF), and how does it further refine the
database schema?

The third normal form (3NF) is a means of organizing database tables by


removing the transitive dependencies from a relational system

9)Explain partial dependency and provide an example.

Partial dependency occurs in 2NF when a non-key attribute is functionally


dependent on only part of the primary key. For example, if a table’s primary key
is (OrderID, ProductID), and a non-key attribute depends only on OrderID, it
exhibits partial dependency.

10)Explain transitive dependency and provide an example.

Transitive dependency occurs when a non-key attribute depends on another non-


key attribute, which, in turn, depends on the primary key. For example, if a table
has a primary key (StudentID) and a non-key attribute (ProfessorName), where
ProfessorName depends on a non-key attribute (CourseName), it exhibits
transitive dependency

11)What do you mean by functional dependency?

In relational database theory, a functional dependency is a constraint between


two sets of attributes in a relation from a database

12)Explain the concept of closure in functional dependencies and how it is used


in normalization.
The Closure Of Functional Dependency means the complete set of all possible
attributes that can be functionally derived from given functional dependency
using the inference rules known as Armstrong’s Rules.
If “F” is a functional dependency then closure of functional dependency can be
denoted using “{F}+”.

14)what is BCNF

BCNF stands for Boyce-Codd Normal Form and is an advanced form of 3NF. It
is also referred to as 3.5NF for the same reason. A table to be in its BCNF
normal form should satisfy the following conditions:
The table should be in its 3NF i.e. satisfy all the conditions of 3NF.
For every functional dependency of any attribute A on B
(A->B), A should be the super key of the table. It simply implies that A can’t be
a non-prime attribute if B is a prime attribute.

15)What is meant by redundancy and why do we want to avoid it when creating


a database?

Data redundancy occurs when the same piece of data exists in multiple places,
whereas data inconsistency is when the same data exists in different formats in
multiple tables. Unfortunately, data redundancy can cause data inconsistency,
which can provide a company with unreliable and/or meaningless information

MODULE 5
1)List out any three salient features of a database system?
Ans: a)Low repetition and redundancy
b)Maintanence of large databases
c)Enhanced Security
d)Multi-User Environment Support
2)Discuss the four ACID properties

Ans: a) Atomicity
b) consistency
c) Isolation
d) Durability

3)What is 2PL protocol

Ans: It is a method of concurrency control in DBMS that ensures serializability


by applying a lock to the transaction data which blocks other transactions. Used
to access the same data simultaneously.

4)What is a schedule and its importance

Ans:A series of operations from one transaction to another transaction.Used to


oreserve the order of operation in each individual transaction.

5)What is checkpointing?

Ans:The methodology used for removing all previous transaction logs and
storing them in permanent storage. It is used for the recovery if there is an
unexpected shutdown in the database

6)What is a key-value database?

Ans: uses a simple key value method to store the data.These databases contain a
simple string(the key) that is always unique and an arbitrary large data field(the
value).
7)Explain NoSQL database

Ans: They are non tabular databases. They provide flexible schemas and scale
easily with large amounts of data and high user loads

8)Under what conditions should you use an index?

Ans:
An index can be used when you want to enforce uniqueness in a database. You
can also use it to facilitate sorting and perform fast retrieval. A column that is
frequently used can be a good candidate for an index.

9)What is a database transaction? Explain the concept of atomicity.

Ans:database transaction is a logical unit of work that consists of one or more


database operations. Atomicity ensures that either all operations within a
transaction are executed successfully, or none of them are. It ensures the
transaction's "all or nothing" property.

10)How does a shared lock differ from an exclusive lock during a transaction in
a database?

Ans:shared lock allows multiple transactions to read data concurrently, while an


exclusive lock ensures only one transaction can perform write operations to
maintain data consistency.

11)When does a checkpoint occur in DBMS?

Ans:A checkpoint occurs as a snapshot of the current state of the database


management system. It limits the amount of work needed during system restart
after a subsequent crash. Checkpoints are used for database recovery following
a system crash. They are particularly employed in log-based recovery solutions
to restart the system without having to redo all transactions from the beginning.

12)What is Live Lock?

Ans:Livelock is a situation in which an exclusive lock request is repeatedly


denied as many overlapping shared locks keep interfering with each other. The
processes keep changing their status, preventing them from completing the task.

13)What is a Deadlock?

Ans:A Deadlock is a situation that occurs in OS when any process enters a


waiting state as another waiting process is holding the demanded resource. It is
a common problem in multi-processing where several processes share a specific
type of mutually exclusive resource known as a soft lock.

14)What is Starvation?

Ans:Starvation is a situation where all the low-priority processes get blocked. In


any system, requests for high and low-priority resources keep happening
dynamically. Therefore, some policy is required to decide who gets support and
when.

You might also like