SlideShare a Scribd company logo
DATABASE MANAGEMENT SYSTEM
VIVA QUESTIONS
Kindly read the instructions carefully
1. All these questions are important for examination and interview point
of view, so practice them well.
2. If you have any doubt or facing any problem regarding these questions
you can mail us at coderslodgeofficial@gmail.com or drop a message
in our WhatsApp or telegram group.
3. If you want to support us, give your valuable feedback so that next
time we can improve while interacting with you.
4. Reminder-Practice all questions well it will build your concept clear
and you can easily score good in your exams.
Connect with us
• If you want to join our WhatsApp community then mail us at: -
coderslodgeofficial@gmail.com
• Join our Telegram group: - https://t.me/coderslodgeofficial
• Like our Facebook page: - https://www.facebook.com/coderslodge
• Follow us on Instagram:- https://www.instagram.com/coderslodge/
• Follow us on Twitter: - https://twitter.com/CodersLodge
• Follow us on LinkedIn:- https://www.linkedin.com/company/coderslodge
1. What is DBMS?
DBMS is a collection of programs that facilitates users to create and
maintain a database. In other words, DBMS provides us an interface
or tool for performing different operations such as the creation of a
database, inserting data into it, deleting data from it, updating the
data, etc.
2. What is a database system?
The collection of database and DBMS software together is known as
a database system. Through the database system, we can perform
many activities such as-
The data can be stored in the database with ease, and there are no
issues of data redundancy and data inconsistency.
3. What are the advantages of DBMS?
• Redundancy control
• Restriction for unauthorized access
• Provides multiple user interfaces
• Provides backup and recovery
• Enforces integrity constraints
• Ensure data consistency
• Easy accessibility
• Easy data extraction and data processing due to the use of
queries
4. What is RDBMS?
RDBMS stands for Relational Database Management Systems. It is
used to maintain the data records and indices in tables. RDBMS is
the form of DBMS which uses the structure to identify and access
data concerning the other piece of data in the database.
5. How many types of database languages are?
There are four types of database languages:
• Data Definition Language (DDL) e.g., CREATE, ALTER, DROP,
TRUNCATE, RENAME, etc. All these commands are used for
updating the data that’s why they are known as Data Definition
Language.
• Data Manipulation Language (DML) e.g., SELECT, UPDATE,
INSERT, DELETE, etc. These commands are used for the
manipulation of already updated data that's why they are the
part of Data Manipulation Language.
• DATA Control Language (DCL) e.g., GRANT and REVOKE. These
commands are used for giving and removing the user access on
the database. So, they are the part of Data Control Language.
• Transaction Control Language (TCL) e.g., COMMIT, ROLLBACK,
and SAVEPOINT. These are the commands used for managing
transactions in the database. TCL is used for managing the
changes made by DML.
6. Why is the use of DBMS recommended? Explain by listing some
of its major advantages?
Some of the major advantages of DBMS are as follows:
• Controlled Redundancy: DBMS supports a mechanism to
control the redundancy of data inside the database by
integrating all the data into a single database and as data is
stored in only one place, the duplicity of data does not
happen.
• Data Sharing: Sharing of data among multiple users
simultaneously can also be done in DBMS as the same
database will be shared among all the users and by different
application programs.
• Backup and Recovery Facility: DBMS minimizes the pain of
creating the backup of data again and again by providing a
feature of ‘backup and recovery’ which automatically
creates the data backup and restores the data whenever
required.
• Enforcement of Integrity Constraints: Integrity Constraints
are very important to be enforced on the data so that the
refined data after putting some constraints are stored in the
database and this is followed by DBMS.
• Independence of Data: It simply means that you can change
the structure of the data without affecting the structure of
any of the application programs.
7. What do you understand by Data Model?
The Data model is specified as a collection of conceptual tools for
describing data, data relationships, data semantics and
constraints. These models are used to describe the relationship
between the entities and their attributes.
There is the number of data models:
• Hierarchical data model
• network model
• relational model
• Entity-Relationship model and so on.
8. Define a Relation Schema and a Relation.
A Relation Schema is specified as a set of attributes. It is also known
as table schema. It defines what the name of the table is. Relation
schema is known as the blueprint with the help of which we can
explain that how the data is organized into tables. This blueprint
contains no data.
A relation is specified as a set of tuples. A relation is the set of
related attributes with identifying key attributes.
9. What is a degree of Relation?
The degree of relation is a number of attributes of its relation
schema. A degree of relation is also known as Cardinality it is
defined as the number of occurrences of one entity which is
connected to the number of occurrences of other entity. There are
three degree of relation they are one-to-one (1:1), one-to-
many(1:M), many-to-one(M:M).
10. What is the Relationship?
The Relationship is defined as an association among two or more
entities. There are three type of relationships in DBMS-
• One-To-One: Here one record of any object can be related to
one record of another object.
• One-To-Many (many-to-one): Here one record of any object
can be related to many records of other object and vice versa.
• Many-to-many: Here more than one records of an object can
be related to n number of records of another object.
11. What is the difference between having and where clause?
HAVING is used to specify a condition for a group or an
aggregate function used in a select statement. The WHERE
clause selects before grouping. The HAVING clause selects
rows after grouping. Unlike the HAVING clause, the WHERE
clause cannot contain aggregate functions.
12. What are the disadvantages of file processing systems?
• Inconsistent
• Not secure
• Data redundancy
• Difficult in accessing data
• Data isolation
• Data integrity
• Concurrent access is not possible
• Limited data sharing
• Atomicity problem
13. What is data abstraction in DBMS?
Data abstraction in DBMS is a process of hiding irrelevant
details from users. Because database systems are made of
complex data structures so, it makes accessible the user
interaction with the database.
14. Define Aggregate functions.
Functions which operate against a collection of values and
returning single value is called aggregate functions.
15. What are the three levels of data abstraction?
Following are three levels of data abstraction:
• Physical level: It is the lowest level of abstraction. It describes
how data are stored.
• Logical level: It is the next higher level of abstraction. It
describes what data are stored in the database and what the
relationship among those data is.
• View level: It is the highest level of data abstraction. It
describes only part of the entire database.
16. What is Relational Algebra?
Relational Algebra is a Procedural Query Language which
contains a set of operations that take one or two relations as
input and produce a new relationship.
There are few fundamental operations of relational algebra:
• select
• project
• set difference
• union
• rename, etc.
17. What is Relational Calculus?
Relational Calculus is a Non-procedural Query Language which
uses mathematical predicate calculus instead of algebra.
Relational calculus doesn't work on mathematics fundamentals
such as algebra, differential, integration, etc. That's why it is
also known as predicate calculus.
There are two types of relational calculus:
• Tuple relational calculus
• Domain relational calculus
18. What are super, primary, candidate, and foreign keys?
A super key is a set of attributes of a relation schema upon
which all attributes of the schema are functionally dependent.
No two rows can have the same value of super key attributes.
A Candidate key is a minimal super key, i.e., no proper subset
of Candidate key attributes can be a super key.
A Primary Key is one of the candidate keys. One of the
candidate keys is selected as most important and becomes the
primary key. There cannot be more than one primary key in a
table.
A Foreign key is a field (or collection of fields) in one table that
uniquely identifies a row of another table.
19. What is normalization?
Normalization is a process of analysing the given relation
schemas according to their functional dependencies. It is used
to minimize redundancy and also used to minimize insertion,
deletion and update distractions. Normalization is considered
as an essential process as it is used to avoid data redundancy,
insertion anomaly, updation anomaly, deletion anomaly.
There most commonly used normal forms are:
o First Normal Form(1NF)
o Second Normal Form(2NF)
o Third Normal Form(3NF)
o Boyce & Codd Normal Form (BCNF)
20. Define Join and enlist its types.
Joins help in explaining the relation between different tables.
They also enable you to select data with relation to data in
another table.
The various types are:
o INNER JOINs: Blank rows are left in the middle while more than
equal to two tables are joined.
o OUTER JOINs: Divided into Left Outer Join and Right Outer Join.
Blank rows are left at the specified side by joining tables in
other side.
Other joins are CROSS JOINs, NATURAL JOINs, EQUI JOIN and
NON-EQUI JOIN.
21. What is functional Dependency?
Functional Dependency is the starting point of normalization. It
exists when a relation between two attributes allows you to
determine the corresponding attribute's value uniquely. The
functional dependency is also known as database dependency
and defines as the relationship which occurs when one attribute
in a relation uniquely determines another attribute. It is written
as A->B which means B is functionally dependent on A.
22. What is a Trigger?
A Trigger is a code associated with insert, update or delete
operations. The code is executed automatically whenever the
associated query is executed on a table. Triggers can be useful to
maintain integrity in the database.
23. What is a stored procedure?
A stored procedure is like a function that contains a set of
operations compiled together. It contains a set of operations that
are commonly used in an application to do some common
database tasks.
24. What is the difference between Trigger and Stored
Procedure?
Unlike Stored Procedures, Triggers cannot be called directly. They
can only be associated with queries.
25. What is the E-R model?
E-R model is a short name for the Entity-Relationship model.
This model is based on the real world. It contains necessary
objects (known as entities) and the relationship among these
objects.
In E-R diagram, entities are represented by rectangles,
relationships are represented by diamonds, attributes are the
characteristics of entities and represented by ellipses, and data
flow is represented through a straight line.
26. What is an Entity type?
An entity type is specified as a collection of entities, having the
same attributes. Entity type typically corresponds to one or
several related tables in the database. A characteristic or trait
which defines or uniquely identifies the entity is called entity
type.
For example, a student has student_id, department, and
course as its characteristics.
27. What is Weak Entity set?
An entity set that doesn't have sufficient attributes to form a
primary key is referred to as a weak entity set. The member of
a weak entity set is known as a subordinate entity.
28. What are the integrity rules in DBMS?
Data integrity is one significant aspect while maintaining the
database. So, data integrity is enforced in the database system
by imposing a series of rules. Those set of integrity is known as
the integrity rules.
There are two integrity rules in DBMS:
o Entity Integrity: It specifies that "Primary key cannot have
a NULL value."
o Referential Integrity: It specifies that "Foreign Key can be
either a NULL value or should be the Primary Key value of
other relation
29. Explain ACID properties
ACID properties are some basic rules, which has to be satisfied
by every transaction to preserve the integrity. These properties
and rules are:
o ATOMICITY: Atomicity is more generally known as? all or
nothing rule.' Which implies all are considered as one
unit, and they either run to completion or not executed
at all.
o CONSISTENCY: This property refers to the uniformity of
the data. Consistency implies that the database is
consistent before and after the transaction.
o ISOLATION: This property states that the number of the
transaction can be executed concurrently without leading
to the inconsistency of the database state.
o DURABILITY: This property ensures that once the
transaction is committed it will be stored in the non-
volatile memory and system crash can also not affect it
anymore.
30. What is the difference between a DELETE command and
TRUNCATE command?
o DELETE command: DELETE command is used to delete
rows from a table based on the condition that we provide
in a WHERE clause.
o DELETE command delete only those rows which are
specified with the WHERE clause.
o DELETE command can be rolled back.
o DELETE command maintain a log, that's why it is slow.
o DELETE use row lock while performing DELETE function.
o TRUNCATE command: TRUNCATE command is used to
remove all rows (complete data) from a table. It is similar
to the DELETE command with no WHERE clause.
o The TRUNCATE command removes all the rows from the
table.
o The TRUNCATE command cannot be rolled back.
o The TRUNCATE command doesn't maintain a log. That's
why it is fast.
o TRUNCATE use table log while performing the TRUNCATE
function.
31. What is 1NF in the DBMS?
1NF is known as the First Normal Form.
This is the easiest form of the normalization process which states
that the domain of an attribute should have only atomic values. The
objective of this is to remove the duplicate columns that are present
in the table.
32. What is 2NF in the DBMS?
2NF is the Second Normal Form.
Any table is said to have in the 2NF if it satisfies the following 2
conditions:
A table is in the 1NF.
Each non-prime attribute of a table is said to be functionally
dependent in totality on the primary key.
33. What is 3NF in the DBMS?
3NF is the Third Normal Form.
Any table is said to have in the 3NF if it satisfies the following 2
conditions:
A table is in the 2NF.
Each non-prime attribute of a table is said to be non-transitively
dependent on every key of the table.
34. What is BCNF in the DBMS?
BCNF is the Boyce Codd Normal Form which is stricter than the 3NF.
Any table is said to have in the BCNF if it satisfies the following 2
conditions:
A table is in the 3NF.
For each of the functional dependencies X->Y that exists, X is the
super key of a table.
35. Difference between primary key and unique key and why one
should use unique key if it allows only one null ?
Primary key:
• Only one in a row(tuple).
• Never allows null value(only key field).
• Unique key identifier and can not be null and must be
unique.
Unique Key:
• Can be more than one unique key in one row.
• Unique key can have null values(only single null is allowed).
• It can be a candidate key.
• Unique key can be null and may not be unique.
36. Explain the basic structure followed in PL/SQL?
The basic structure of PL/SQL follows the BLOCK structure.
Each PL/SQL code comprises SQL and PL/SQL statement that
constitutes a PL/SQL block.
Each PL/SQL block consists of 3 sections:
• The optional Declaration Section
• The mandatory Execution Section
• The optional Exception handling Section
[DECLARE]
--declaration statements (optional)
BEGIN
--execution statements
[EXCEPTION]
--exception handling statements (optional)
END;
37. What is a PL/SQL cursor?
• A PL/SQL cursor is nothing but a pointer to an area of memory
having SQL statements and the information of statement
processing. This memory area is called a context area. This
special area makes use of a special feature called cursor for the
purpose of retrieving and processing more than one row.
• In short, the cursor selects multiple rows from the database
and these selected rows are individually processed within a
program.
• There are two types of cursors:
➢ Implicit Cursor:
o Oracle automatically creates a cursor while running any of the
commands - SELECT INTO, INSERT, DELETE or UPDATE
implicitly.
o The execution cycle of these cursors is internally handled by
Oracle and returns the information and status of the cursor by
making use of the cursor attributes- ROWCOUNT, ISOPEN,
FOUND, NOTFOUND.
➢ Explicit Cursor:
o This cursor is a SELECT statement that was declared explicitly in
the declaration block.
o The programmer has to control the execution cycle of these
cursors starting from OPEN to FETCH and close.
o The execution cycle while executing the SQL statement is
defined by Oracle along with associating a cursor with it.
38. Differentiate between SQL and PL/SQL.
SQL PL/SQL
SQL is a natural language meant
for the interactive processing of
data in the database.
PL/SQL is a procedural
extension of SQL.
Decision-making and looping are
not allowed in SQL.
PL/SQL supports all features
of procedural language such
as conditional and looping
statements.
All SQL statements are executed
at a time by the database server
PL/SQL statements are
executed one block at a time
SQL PL/SQL
which is why it becomes a time-
consuming process.
thereby reducing the network
traffic.
There is no error handling
mechanism in SQL.
This supports an error
handling mechanism.
39. What are the various methods of controlling concurrency?
1. Locking
2. Time stamp
Locking data item to prevent multiple transactions from accessing
the item concurrently.
A time stamp is a unique identifier for each transaction,
generated by the system.
40. What are various types of locking techniques?
1. A binary lock
2. Shared/Exclusive lock
3. Two phase locking
41. What is a deadlock?
Dead lock occurs when each transaction T in a set of two or more
transactions is waiting for some item that is locked by some other
transaction T’ in the set. Hence each transaction is in a waiting
queue, waiting for one of the other transactions to release the
lock on them.
42. What is Serializability in DBMS?
A database may be inconsistent if multiple transactions are
running concurrently. Serializability helps to ensure that the data
is consistent at all times and the serial schedules are in order. A
serial schedule achieves this as a new transaction will start after
the other transaction has completed execution.
43. What is Concurrency Control in DBMS?
Concurrency control is performed for multiple database
operations without them being affected by each other. In large
databases where read and write operations are performed,
problems in concurrency may occur. So, the main aim of
concurrency control is to maintain data integrity.
44. What is a transaction in DBMS?
A transaction may be a group of tasks or a single processing unit
that cannot be divided further. A transaction can also be
considered as a group of tasks where the contents of the
database may be updated.
45. What is Tuple in DBMS?
A tuple is a single row of a database table that contains all the
information of an individual record. It is a single entry in the table
also called record or row, having related information. For example,
1 Jason Roy England Batsman
Here, the column headings may be a Serial number, Player name,
Country and Specialty.

More Related Content

What's hot

Slide 4 dbms users
Slide 4 dbms usersSlide 4 dbms users
Slide 4 dbms users
Visakh V
 
Data structure - Graph
Data structure - GraphData structure - Graph
Data structure - Graph
Madhu Bala
 
Sparse matrix and its representation data structure
Sparse matrix and its representation data structureSparse matrix and its representation data structure
Sparse matrix and its representation data structure
Vardhil Patel
 
Jdk,jre,jvm
Jdk,jre,jvmJdk,jre,jvm
Jdk,jre,jvm
Kritika Goel
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and Answers
OXUS 20
 
BAB II ISI MAKALAH REPRESENTASI DATA
BAB II ISI MAKALAH REPRESENTASI DATABAB II ISI MAKALAH REPRESENTASI DATA
BAB II ISI MAKALAH REPRESENTASI DATA
Iez Risma Nursida
 
SOLID - Principles of Object Oriented Design
SOLID - Principles of Object Oriented DesignSOLID - Principles of Object Oriented Design
SOLID - Principles of Object Oriented Design
Riccardo Cardin
 
sparse matrix in data structure
sparse matrix in data structuresparse matrix in data structure
sparse matrix in data structure
MAHALAKSHMI P
 
Normalization
NormalizationNormalization
Normalization
Wangu Thupa
 
Remote Method Innovation (RMI) In JAVA
Remote Method Innovation (RMI) In JAVARemote Method Innovation (RMI) In JAVA
Remote Method Innovation (RMI) In JAVA
Prankit Mishra
 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
Dashani Rajapaksha
 
Tugas pengelolaan proyek sistem informasi
Tugas pengelolaan proyek sistem informasiTugas pengelolaan proyek sistem informasi
Tugas pengelolaan proyek sistem informasiYudi Efriansyah
 
Ii pu cs practical viva voce questions
Ii pu cs  practical viva voce questionsIi pu cs  practical viva voce questions
Ii pu cs practical viva voce questions
Prof. Dr. K. Adisesha
 
basis data lanjut modul
 basis data lanjut modul basis data lanjut modul
basis data lanjut modul
Denny Safardan
 
joins and subqueries in big data analysis
joins and subqueries in big data analysisjoins and subqueries in big data analysis
joins and subqueries in big data analysis
SanSan149
 
Previous question papers of Database Management System (DBMS) By SHABEEB
Previous question papers of Database Management System (DBMS) By SHABEEBPrevious question papers of Database Management System (DBMS) By SHABEEB
Previous question papers of Database Management System (DBMS) By SHABEEB
Shabeeb Shabi
 
Dwh lecture 08-denormalization tech
Dwh   lecture 08-denormalization techDwh   lecture 08-denormalization tech
Dwh lecture 08-denormalization tech
Sulman Ahmed
 
Kleisli Composition
Kleisli CompositionKleisli Composition
Kleisli Composition
Philip Schwarz
 
Data and File Structure Lecture Notes
Data and File Structure Lecture NotesData and File Structure Lecture Notes
Data and File Structure Lecture Notes
FellowBuddy.com
 

What's hot (20)

Slide 4 dbms users
Slide 4 dbms usersSlide 4 dbms users
Slide 4 dbms users
 
Data structure - Graph
Data structure - GraphData structure - Graph
Data structure - Graph
 
Dbms viva questions
Dbms viva questionsDbms viva questions
Dbms viva questions
 
Sparse matrix and its representation data structure
Sparse matrix and its representation data structureSparse matrix and its representation data structure
Sparse matrix and its representation data structure
 
Jdk,jre,jvm
Jdk,jre,jvmJdk,jre,jvm
Jdk,jre,jvm
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and Answers
 
BAB II ISI MAKALAH REPRESENTASI DATA
BAB II ISI MAKALAH REPRESENTASI DATABAB II ISI MAKALAH REPRESENTASI DATA
BAB II ISI MAKALAH REPRESENTASI DATA
 
SOLID - Principles of Object Oriented Design
SOLID - Principles of Object Oriented DesignSOLID - Principles of Object Oriented Design
SOLID - Principles of Object Oriented Design
 
sparse matrix in data structure
sparse matrix in data structuresparse matrix in data structure
sparse matrix in data structure
 
Normalization
NormalizationNormalization
Normalization
 
Remote Method Innovation (RMI) In JAVA
Remote Method Innovation (RMI) In JAVARemote Method Innovation (RMI) In JAVA
Remote Method Innovation (RMI) In JAVA
 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
 
Tugas pengelolaan proyek sistem informasi
Tugas pengelolaan proyek sistem informasiTugas pengelolaan proyek sistem informasi
Tugas pengelolaan proyek sistem informasi
 
Ii pu cs practical viva voce questions
Ii pu cs  practical viva voce questionsIi pu cs  practical viva voce questions
Ii pu cs practical viva voce questions
 
basis data lanjut modul
 basis data lanjut modul basis data lanjut modul
basis data lanjut modul
 
joins and subqueries in big data analysis
joins and subqueries in big data analysisjoins and subqueries in big data analysis
joins and subqueries in big data analysis
 
Previous question papers of Database Management System (DBMS) By SHABEEB
Previous question papers of Database Management System (DBMS) By SHABEEBPrevious question papers of Database Management System (DBMS) By SHABEEB
Previous question papers of Database Management System (DBMS) By SHABEEB
 
Dwh lecture 08-denormalization tech
Dwh   lecture 08-denormalization techDwh   lecture 08-denormalization tech
Dwh lecture 08-denormalization tech
 
Kleisli Composition
Kleisli CompositionKleisli Composition
Kleisli Composition
 
Data and File Structure Lecture Notes
Data and File Structure Lecture NotesData and File Structure Lecture Notes
Data and File Structure Lecture Notes
 

Similar to DBMS VIVA QUESTIONS_CODERS LODGE.pdf

Dbms interview ques
Dbms interview quesDbms interview ques
Dbms interview ques
SwatiJain303
 
Database Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdfDatabase Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdf
rsujeet169
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
SelshaCs
 
Bca examination 2015 dbms
Bca examination 2015 dbmsBca examination 2015 dbms
Bca examination 2015 dbms
Anjaan Gajendra
 
Sql interview questions and answers
Sql interview questions and  answersSql interview questions and  answers
Sql interview questions and answers
sheibansari
 
DBMS ppts unit1.pptx
DBMS ppts  unit1.pptxDBMS ppts  unit1.pptx
DBMS ppts unit1.pptx
VaibhavSaluja1
 
Database Concepts
Database ConceptsDatabase Concepts
Database Concepts
Upendra Reddy Vuyyuru
 
Relational data base management system (Unit 1)
Relational data base management system (Unit 1)Relational data base management system (Unit 1)
Relational data base management system (Unit 1)
Ismail Mukiibi
 
Unit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptxUnit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptx
nirajsharmapuneiat
 
Database Design Process
Database Design ProcessDatabase Design Process
Database Design Processmussawir20
 
Unit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptxUnit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptx
MaryJoseph79
 
Dbms Interview Question And Answer
Dbms Interview Question And AnswerDbms Interview Question And Answer
Dbms Interview Question And Answer
Jagan Mohan Bishoyi
 
Codds rules & keys
Codds rules & keysCodds rules & keys
Codds rules & keys
Balasingham Karthiban
 
DatabaseManagementSystem.pptx
DatabaseManagementSystem.pptxDatabaseManagementSystem.pptx
DatabaseManagementSystem.pptx
uwmctesting
 
Dbms basic nots
Dbms basic notsDbms basic nots
Dbms basic nots
nitinnitinnitin
 
Introduction to Database System-WEEK2.pptx
Introduction to Database System-WEEK2.pptxIntroduction to Database System-WEEK2.pptx
Introduction to Database System-WEEK2.pptx
melissaguillermo
 
Islamic University Previous Year Question Solution 2019 (ADBMS)
Islamic University Previous Year Question Solution 2019 (ADBMS)Islamic University Previous Year Question Solution 2019 (ADBMS)
Islamic University Previous Year Question Solution 2019 (ADBMS)
Rakibul Hasan Pranto
 
Unit 2 DBMS.pptx
Unit 2 DBMS.pptxUnit 2 DBMS.pptx
Unit 2 DBMS.pptx
ssuserc8e1481
 
Unit 1.pptx
Unit 1.pptxUnit 1.pptx
Unit 1.pptx
chatkall46
 

Similar to DBMS VIVA QUESTIONS_CODERS LODGE.pdf (20)

Dbms interview ques
Dbms interview quesDbms interview ques
Dbms interview ques
 
Nagaraju
NagarajuNagaraju
Nagaraju
 
Database Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdfDatabase Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdf
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Bca examination 2015 dbms
Bca examination 2015 dbmsBca examination 2015 dbms
Bca examination 2015 dbms
 
Sql interview questions and answers
Sql interview questions and  answersSql interview questions and  answers
Sql interview questions and answers
 
DBMS ppts unit1.pptx
DBMS ppts  unit1.pptxDBMS ppts  unit1.pptx
DBMS ppts unit1.pptx
 
Database Concepts
Database ConceptsDatabase Concepts
Database Concepts
 
Relational data base management system (Unit 1)
Relational data base management system (Unit 1)Relational data base management system (Unit 1)
Relational data base management system (Unit 1)
 
Unit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptxUnit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptx
 
Database Design Process
Database Design ProcessDatabase Design Process
Database Design Process
 
Unit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptxUnit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptx
 
Dbms Interview Question And Answer
Dbms Interview Question And AnswerDbms Interview Question And Answer
Dbms Interview Question And Answer
 
Codds rules & keys
Codds rules & keysCodds rules & keys
Codds rules & keys
 
DatabaseManagementSystem.pptx
DatabaseManagementSystem.pptxDatabaseManagementSystem.pptx
DatabaseManagementSystem.pptx
 
Dbms basic nots
Dbms basic notsDbms basic nots
Dbms basic nots
 
Introduction to Database System-WEEK2.pptx
Introduction to Database System-WEEK2.pptxIntroduction to Database System-WEEK2.pptx
Introduction to Database System-WEEK2.pptx
 
Islamic University Previous Year Question Solution 2019 (ADBMS)
Islamic University Previous Year Question Solution 2019 (ADBMS)Islamic University Previous Year Question Solution 2019 (ADBMS)
Islamic University Previous Year Question Solution 2019 (ADBMS)
 
Unit 2 DBMS.pptx
Unit 2 DBMS.pptxUnit 2 DBMS.pptx
Unit 2 DBMS.pptx
 
Unit 1.pptx
Unit 1.pptxUnit 1.pptx
Unit 1.pptx
 

Recently uploaded

A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
abdulrafaychaudhry
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
QuickwayInfoSystems3
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 

Recently uploaded (20)

A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 

DBMS VIVA QUESTIONS_CODERS LODGE.pdf

  • 1. DATABASE MANAGEMENT SYSTEM VIVA QUESTIONS Kindly read the instructions carefully 1. All these questions are important for examination and interview point of view, so practice them well. 2. If you have any doubt or facing any problem regarding these questions you can mail us at coderslodgeofficial@gmail.com or drop a message in our WhatsApp or telegram group. 3. If you want to support us, give your valuable feedback so that next time we can improve while interacting with you. 4. Reminder-Practice all questions well it will build your concept clear and you can easily score good in your exams. Connect with us • If you want to join our WhatsApp community then mail us at: - coderslodgeofficial@gmail.com • Join our Telegram group: - https://t.me/coderslodgeofficial • Like our Facebook page: - https://www.facebook.com/coderslodge • Follow us on Instagram:- https://www.instagram.com/coderslodge/ • Follow us on Twitter: - https://twitter.com/CodersLodge • Follow us on LinkedIn:- https://www.linkedin.com/company/coderslodge
  • 2. 1. What is DBMS? DBMS is a collection of programs that facilitates users to create and maintain a database. In other words, DBMS provides us an interface or tool for performing different operations such as the creation of a database, inserting data into it, deleting data from it, updating the data, etc. 2. What is a database system? The collection of database and DBMS software together is known as a database system. Through the database system, we can perform many activities such as- The data can be stored in the database with ease, and there are no issues of data redundancy and data inconsistency. 3. What are the advantages of DBMS? • Redundancy control • Restriction for unauthorized access • Provides multiple user interfaces • Provides backup and recovery • Enforces integrity constraints • Ensure data consistency • Easy accessibility • Easy data extraction and data processing due to the use of queries 4. What is RDBMS? RDBMS stands for Relational Database Management Systems. It is used to maintain the data records and indices in tables. RDBMS is
  • 3. the form of DBMS which uses the structure to identify and access data concerning the other piece of data in the database. 5. How many types of database languages are? There are four types of database languages: • Data Definition Language (DDL) e.g., CREATE, ALTER, DROP, TRUNCATE, RENAME, etc. All these commands are used for updating the data that’s why they are known as Data Definition Language. • Data Manipulation Language (DML) e.g., SELECT, UPDATE, INSERT, DELETE, etc. These commands are used for the manipulation of already updated data that's why they are the part of Data Manipulation Language. • DATA Control Language (DCL) e.g., GRANT and REVOKE. These commands are used for giving and removing the user access on the database. So, they are the part of Data Control Language. • Transaction Control Language (TCL) e.g., COMMIT, ROLLBACK, and SAVEPOINT. These are the commands used for managing transactions in the database. TCL is used for managing the changes made by DML. 6. Why is the use of DBMS recommended? Explain by listing some of its major advantages? Some of the major advantages of DBMS are as follows: • Controlled Redundancy: DBMS supports a mechanism to control the redundancy of data inside the database by integrating all the data into a single database and as data is stored in only one place, the duplicity of data does not happen.
  • 4. • Data Sharing: Sharing of data among multiple users simultaneously can also be done in DBMS as the same database will be shared among all the users and by different application programs. • Backup and Recovery Facility: DBMS minimizes the pain of creating the backup of data again and again by providing a feature of ‘backup and recovery’ which automatically creates the data backup and restores the data whenever required. • Enforcement of Integrity Constraints: Integrity Constraints are very important to be enforced on the data so that the refined data after putting some constraints are stored in the database and this is followed by DBMS. • Independence of Data: It simply means that you can change the structure of the data without affecting the structure of any of the application programs. 7. What do you understand by Data Model? The Data model is specified as a collection of conceptual tools for describing data, data relationships, data semantics and constraints. These models are used to describe the relationship between the entities and their attributes. There is the number of data models: • Hierarchical data model • network model • relational model • Entity-Relationship model and so on.
  • 5. 8. Define a Relation Schema and a Relation. A Relation Schema is specified as a set of attributes. It is also known as table schema. It defines what the name of the table is. Relation schema is known as the blueprint with the help of which we can explain that how the data is organized into tables. This blueprint contains no data. A relation is specified as a set of tuples. A relation is the set of related attributes with identifying key attributes. 9. What is a degree of Relation? The degree of relation is a number of attributes of its relation schema. A degree of relation is also known as Cardinality it is defined as the number of occurrences of one entity which is connected to the number of occurrences of other entity. There are three degree of relation they are one-to-one (1:1), one-to- many(1:M), many-to-one(M:M). 10. What is the Relationship? The Relationship is defined as an association among two or more entities. There are three type of relationships in DBMS- • One-To-One: Here one record of any object can be related to one record of another object. • One-To-Many (many-to-one): Here one record of any object can be related to many records of other object and vice versa. • Many-to-many: Here more than one records of an object can be related to n number of records of another object.
  • 6. 11. What is the difference between having and where clause? HAVING is used to specify a condition for a group or an aggregate function used in a select statement. The WHERE clause selects before grouping. The HAVING clause selects rows after grouping. Unlike the HAVING clause, the WHERE clause cannot contain aggregate functions. 12. What are the disadvantages of file processing systems? • Inconsistent • Not secure • Data redundancy • Difficult in accessing data • Data isolation • Data integrity • Concurrent access is not possible • Limited data sharing • Atomicity problem 13. What is data abstraction in DBMS? Data abstraction in DBMS is a process of hiding irrelevant details from users. Because database systems are made of complex data structures so, it makes accessible the user interaction with the database. 14. Define Aggregate functions. Functions which operate against a collection of values and returning single value is called aggregate functions.
  • 7. 15. What are the three levels of data abstraction? Following are three levels of data abstraction: • Physical level: It is the lowest level of abstraction. It describes how data are stored. • Logical level: It is the next higher level of abstraction. It describes what data are stored in the database and what the relationship among those data is. • View level: It is the highest level of data abstraction. It describes only part of the entire database. 16. What is Relational Algebra? Relational Algebra is a Procedural Query Language which contains a set of operations that take one or two relations as input and produce a new relationship. There are few fundamental operations of relational algebra: • select • project • set difference • union • rename, etc. 17. What is Relational Calculus? Relational Calculus is a Non-procedural Query Language which uses mathematical predicate calculus instead of algebra. Relational calculus doesn't work on mathematics fundamentals such as algebra, differential, integration, etc. That's why it is also known as predicate calculus.
  • 8. There are two types of relational calculus: • Tuple relational calculus • Domain relational calculus 18. What are super, primary, candidate, and foreign keys? A super key is a set of attributes of a relation schema upon which all attributes of the schema are functionally dependent. No two rows can have the same value of super key attributes. A Candidate key is a minimal super key, i.e., no proper subset of Candidate key attributes can be a super key. A Primary Key is one of the candidate keys. One of the candidate keys is selected as most important and becomes the primary key. There cannot be more than one primary key in a table. A Foreign key is a field (or collection of fields) in one table that uniquely identifies a row of another table. 19. What is normalization? Normalization is a process of analysing the given relation schemas according to their functional dependencies. It is used to minimize redundancy and also used to minimize insertion, deletion and update distractions. Normalization is considered as an essential process as it is used to avoid data redundancy, insertion anomaly, updation anomaly, deletion anomaly.
  • 9. There most commonly used normal forms are: o First Normal Form(1NF) o Second Normal Form(2NF) o Third Normal Form(3NF) o Boyce & Codd Normal Form (BCNF) 20. Define Join and enlist its types. Joins help in explaining the relation between different tables. They also enable you to select data with relation to data in another table. The various types are: o INNER JOINs: Blank rows are left in the middle while more than equal to two tables are joined. o OUTER JOINs: Divided into Left Outer Join and Right Outer Join. Blank rows are left at the specified side by joining tables in other side. Other joins are CROSS JOINs, NATURAL JOINs, EQUI JOIN and NON-EQUI JOIN. 21. What is functional Dependency? Functional Dependency is the starting point of normalization. It exists when a relation between two attributes allows you to determine the corresponding attribute's value uniquely. The functional dependency is also known as database dependency and defines as the relationship which occurs when one attribute in a relation uniquely determines another attribute. It is written as A->B which means B is functionally dependent on A.
  • 10. 22. What is a Trigger? A Trigger is a code associated with insert, update or delete operations. The code is executed automatically whenever the associated query is executed on a table. Triggers can be useful to maintain integrity in the database. 23. What is a stored procedure? A stored procedure is like a function that contains a set of operations compiled together. It contains a set of operations that are commonly used in an application to do some common database tasks. 24. What is the difference between Trigger and Stored Procedure? Unlike Stored Procedures, Triggers cannot be called directly. They can only be associated with queries. 25. What is the E-R model? E-R model is a short name for the Entity-Relationship model. This model is based on the real world. It contains necessary objects (known as entities) and the relationship among these objects. In E-R diagram, entities are represented by rectangles, relationships are represented by diamonds, attributes are the characteristics of entities and represented by ellipses, and data flow is represented through a straight line. 26. What is an Entity type? An entity type is specified as a collection of entities, having the same attributes. Entity type typically corresponds to one or several related tables in the database. A characteristic or trait
  • 11. which defines or uniquely identifies the entity is called entity type. For example, a student has student_id, department, and course as its characteristics. 27. What is Weak Entity set? An entity set that doesn't have sufficient attributes to form a primary key is referred to as a weak entity set. The member of a weak entity set is known as a subordinate entity. 28. What are the integrity rules in DBMS? Data integrity is one significant aspect while maintaining the database. So, data integrity is enforced in the database system by imposing a series of rules. Those set of integrity is known as the integrity rules. There are two integrity rules in DBMS: o Entity Integrity: It specifies that "Primary key cannot have a NULL value." o Referential Integrity: It specifies that "Foreign Key can be either a NULL value or should be the Primary Key value of other relation 29. Explain ACID properties ACID properties are some basic rules, which has to be satisfied by every transaction to preserve the integrity. These properties and rules are: o ATOMICITY: Atomicity is more generally known as? all or nothing rule.' Which implies all are considered as one
  • 12. unit, and they either run to completion or not executed at all. o CONSISTENCY: This property refers to the uniformity of the data. Consistency implies that the database is consistent before and after the transaction. o ISOLATION: This property states that the number of the transaction can be executed concurrently without leading to the inconsistency of the database state. o DURABILITY: This property ensures that once the transaction is committed it will be stored in the non- volatile memory and system crash can also not affect it anymore. 30. What is the difference between a DELETE command and TRUNCATE command? o DELETE command: DELETE command is used to delete rows from a table based on the condition that we provide in a WHERE clause. o DELETE command delete only those rows which are specified with the WHERE clause. o DELETE command can be rolled back. o DELETE command maintain a log, that's why it is slow. o DELETE use row lock while performing DELETE function. o TRUNCATE command: TRUNCATE command is used to remove all rows (complete data) from a table. It is similar to the DELETE command with no WHERE clause. o The TRUNCATE command removes all the rows from the table. o The TRUNCATE command cannot be rolled back.
  • 13. o The TRUNCATE command doesn't maintain a log. That's why it is fast. o TRUNCATE use table log while performing the TRUNCATE function. 31. What is 1NF in the DBMS? 1NF is known as the First Normal Form. This is the easiest form of the normalization process which states that the domain of an attribute should have only atomic values. The objective of this is to remove the duplicate columns that are present in the table. 32. What is 2NF in the DBMS? 2NF is the Second Normal Form. Any table is said to have in the 2NF if it satisfies the following 2 conditions: A table is in the 1NF. Each non-prime attribute of a table is said to be functionally dependent in totality on the primary key. 33. What is 3NF in the DBMS? 3NF is the Third Normal Form. Any table is said to have in the 3NF if it satisfies the following 2 conditions: A table is in the 2NF.
  • 14. Each non-prime attribute of a table is said to be non-transitively dependent on every key of the table. 34. What is BCNF in the DBMS? BCNF is the Boyce Codd Normal Form which is stricter than the 3NF. Any table is said to have in the BCNF if it satisfies the following 2 conditions: A table is in the 3NF. For each of the functional dependencies X->Y that exists, X is the super key of a table. 35. Difference between primary key and unique key and why one should use unique key if it allows only one null ? Primary key: • Only one in a row(tuple). • Never allows null value(only key field). • Unique key identifier and can not be null and must be unique. Unique Key: • Can be more than one unique key in one row. • Unique key can have null values(only single null is allowed). • It can be a candidate key. • Unique key can be null and may not be unique.
  • 15. 36. Explain the basic structure followed in PL/SQL? The basic structure of PL/SQL follows the BLOCK structure. Each PL/SQL code comprises SQL and PL/SQL statement that constitutes a PL/SQL block. Each PL/SQL block consists of 3 sections: • The optional Declaration Section • The mandatory Execution Section • The optional Exception handling Section [DECLARE] --declaration statements (optional) BEGIN --execution statements [EXCEPTION] --exception handling statements (optional) END; 37. What is a PL/SQL cursor? • A PL/SQL cursor is nothing but a pointer to an area of memory having SQL statements and the information of statement processing. This memory area is called a context area. This special area makes use of a special feature called cursor for the purpose of retrieving and processing more than one row. • In short, the cursor selects multiple rows from the database and these selected rows are individually processed within a program.
  • 16. • There are two types of cursors: ➢ Implicit Cursor: o Oracle automatically creates a cursor while running any of the commands - SELECT INTO, INSERT, DELETE or UPDATE implicitly. o The execution cycle of these cursors is internally handled by Oracle and returns the information and status of the cursor by making use of the cursor attributes- ROWCOUNT, ISOPEN, FOUND, NOTFOUND. ➢ Explicit Cursor: o This cursor is a SELECT statement that was declared explicitly in the declaration block. o The programmer has to control the execution cycle of these cursors starting from OPEN to FETCH and close. o The execution cycle while executing the SQL statement is defined by Oracle along with associating a cursor with it. 38. Differentiate between SQL and PL/SQL. SQL PL/SQL SQL is a natural language meant for the interactive processing of data in the database. PL/SQL is a procedural extension of SQL. Decision-making and looping are not allowed in SQL. PL/SQL supports all features of procedural language such as conditional and looping statements. All SQL statements are executed at a time by the database server PL/SQL statements are executed one block at a time
  • 17. SQL PL/SQL which is why it becomes a time- consuming process. thereby reducing the network traffic. There is no error handling mechanism in SQL. This supports an error handling mechanism. 39. What are the various methods of controlling concurrency? 1. Locking 2. Time stamp Locking data item to prevent multiple transactions from accessing the item concurrently. A time stamp is a unique identifier for each transaction, generated by the system. 40. What are various types of locking techniques? 1. A binary lock 2. Shared/Exclusive lock 3. Two phase locking 41. What is a deadlock? Dead lock occurs when each transaction T in a set of two or more transactions is waiting for some item that is locked by some other transaction T’ in the set. Hence each transaction is in a waiting queue, waiting for one of the other transactions to release the lock on them. 42. What is Serializability in DBMS?
  • 18. A database may be inconsistent if multiple transactions are running concurrently. Serializability helps to ensure that the data is consistent at all times and the serial schedules are in order. A serial schedule achieves this as a new transaction will start after the other transaction has completed execution. 43. What is Concurrency Control in DBMS? Concurrency control is performed for multiple database operations without them being affected by each other. In large databases where read and write operations are performed, problems in concurrency may occur. So, the main aim of concurrency control is to maintain data integrity. 44. What is a transaction in DBMS? A transaction may be a group of tasks or a single processing unit that cannot be divided further. A transaction can also be considered as a group of tasks where the contents of the database may be updated. 45. What is Tuple in DBMS? A tuple is a single row of a database table that contains all the information of an individual record. It is a single entry in the table also called record or row, having related information. For example, 1 Jason Roy England Batsman Here, the column headings may be a Serial number, Player name, Country and Specialty.