0% found this document useful (0 votes)
24 views21 pages

Dbms Viva Questions

The document provides a comprehensive overview of Database Management Systems (DBMS), including definitions, types, advantages, and components. It covers various database models, such as relational, object-oriented, and hierarchical models, as well as key concepts like ER diagrams, keys, and relationships. Additionally, it discusses the roles of users and administrators in database systems and outlines operations performed in relational databases.

Uploaded by

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

Dbms Viva Questions

The document provides a comprehensive overview of Database Management Systems (DBMS), including definitions, types, advantages, and components. It covers various database models, such as relational, object-oriented, and hierarchical models, as well as key concepts like ER diagrams, keys, and relationships. Additionally, it discusses the roles of users and administrators in database systems and outlines operations performed in relational databases.

Uploaded by

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

DBMS VIVA QUESTIONS

Module-1

1) Define Database.
A prearranged collection of figures known as data is called database.

2) What is Database.
▪ record keeping system that is used to record , maintain and retrieve data.
▪ Operate and handle large amount of information.
▪ Storing, retrieving and managing data in database.

3) What is DBMS?
Database Management Systems (DBMS) are applications designed especially which
enable user interaction with other applications.

4) What are the various kinds of interactions catered by DBMS?


The various kind of interactions catered by DBMS are:
● Data definition
● Update
● Retrieval
● Administration

5) Why Database ?

● Collection of interrelated data


● Set of programs to access the data
● An environment that is both convenient and efficient to use.

6) Where can we find Database

– Collection of interrelated data


– Set of programs to access the data
– An environment that is both convenient and efficient to use
Database Applications:
– Banking: transactions
– Airlines: reservations, schedules
– Universities: registration, grades
– Sales: customers, products, purchases
– Online retailers: order tracking, customized recommendations
– Manufacturing: production, inventory, orders, supply chain
– Human resources: employee records, salaries, tax deductions
• Databases can be very large.
• Databases touch all aspects of our lives

ADVANTAGE OF DBMS:-
▪ No redundant data

▪ Data Consistency

▪ Secure

▪ Privacy – Limited access

▪ Easy access to data

▪ Easy recovery

7)What are the features of Database language?


A database language may also incorporate features like:
DBMS-specific Configuration and management of storage engine
Computations to modification of query results by computations, like summing,
counting, averaging, grouping, sorting and cross-referencing Constraint
enforcement Application Programming Interface

8) What do database languages do?


As special-purpose languages, they have:
● Data definition language
● Data manipulation language
● Query language
9)Define database model.
A data model determining fundamentally how data can be stored, manipulated and
organised and the structure of the database logically is called database model.

10) What are the different type of database system ?

DBMS- Relational Database Management Systems

OODBMS- Object Oriented Database Management Systems

ORDBMS- Object Oriented Database Management Systems

11) What is relational database management system ?

The software used to store, manage, query, and retrieve data stored in a relational database is
called a relational database management system (RDBMS). The RDBMS provides an interface
between users and applications and the database, as well as administrative functions for
managing data storage, access, and performance.

12) What is Object Oriented Database Management Systems?

An object-oriented database management system (OODBMS) is a database management system


that supports the creation and modeling of data as objects. OODBMS also includes support for
classes of objects and the inheritance of class properties, and incorporates methods, subclasses
and their objects.

13) What is Object Relational Database Management Systems?

An object-relational database (ORD) is a database management system (DBMS) that's composed of both
a relational database (RDBMS) and an object-oriented database (OODBMS). ORD supports the basic
components of any object-oriented database model in its schemas and the query language used, such as
objects, classes and inheritance.

14) What is a database system ?

Major components of a database system:-

Data: integrated and shared.


Hardware: disk, CPU, Main Memory, ...
Software: DBMS

Users:
1. Application programmers
2. End users
3. Database administrator (DBA)
Defining external schema
Defining conceptual schema
Defining internal schema
Liaison with users
Defining security and integrity checks
Defining backup and recovery procedures
Monitoring performance and changing requirements

15) What is a file system ?


▪ Stores electronic data in a set of files.

▪ If a file consists of only one file, then it is a flat file

▪ To search data, first, it is necessary to parse each row and load it to an array at runtime.

16) What is Data Reductancy?

Data redundancy is when same piece of the data is store in two or more places

17) What is Data inconsistency?

Data inconsistency is a situation where there are multiple tables within a database that deal with the same data
but may receive it from different inputs.

18) What is concurrent access?

Multiple users are allowed to access the data simultaneously(concurrently). This is for sake of
better performance and faster response.

19) Difference between file system and database management system ?

DBMS File Processing System


Minimal data redundancy problem in DBMS Data Redundancy problem exits

Data Inconsistency does not exist Data Inconsistency exist here

Accessing is comparatively
Accessing database is easier
difficult

Data is scattered in various files


The problem of data isolation is not found in and files may be of different
database format, so data isolation
problem exists

Transactions like insert, delete, view, updating, In file system, transactions are
etc are possible in database not possible

Concurrent access and recovery is possible in Concurrent access and recovery


database is not possible

Security of data Security of data is not good

A file manager is used to store


A database manager (administrator) stores the
all relationships in directories in
relationship in form of structural tables
file systems.

20) What is database model ?

A database model is a type of data model that determines the logical structure of a database. It
fundamentally determines in which manner data can be stored, organized and manipulated. The
most popular example of a database model is the relational model, which uses a table-based
format.

21) What is hierarchical database model?

● Based on Parent Child Relationship.

● Oldest form of database.

● Organizes the data in the tree structure


Advantages:-
Data access is quite predictable in structure and retrieval and updates can be highly optimized
by a DBMS.

Disadvantages:-
The link is permanently established and cannot be modified which makes this model rigid

22) What is a Relational Database Model ?


● It represents all data in the database as simple two-dimensional tables called relations.
● Each row of a relational table, called tuple, represents a data entity with columns of the table
representing attributes(fields).

Advantages

Provides flexibility that allows changes to the database structure to be easily accommodated. It facilitates
multiple views of the same database for different users.

Disadvantages

it does not easily support the distribution of one database across a number of servers

▪ Most Commonly used model In industry.

▪ Include Oracle, MySql, MSSQL, MSAccess

23) Who are naive users ?


▪ who interact with the system by invoking one of the application programs
▪ Eg. 1. A bank teller need to transfer money through money transfer program
▪ Eg. 2, Customer can check the account balance using World Wide Web application

Application Programmers :
▪ computer professionals who write application programs.
▪ Rapid application development (RAD) tools are tools that enable an application
programmer to construct forms and reports without writing a program.
▪ Most major commercial database systems include a fourth generation language.

Sophisticated users :
▪ interact with the system without writing programs
▪ Instead they use database query language
▪ Submit query to query processor
▪ Online analytical processing (OLAP) tools simplify analysts’ tasks by letting them view
summaries of data in different ways.

Specialized users :
▪ users who write specialized database
▪ applications that do not fit into the traditional data-processing framework.
▪ Knowledge base and expert systems
▪ E.g Graphics data and audio data.

Storage manager:-

▪ Provides interface between the low level data stored in the database and the application
programs and queries submitted to the system.

▪ It is responsible for storing, retrieving, and updating data in the database.

❑ Components in storage manager :

▪ Authorization and integrity manager : which tests for the satisfaction of integrity constraints
and checks the authority of users to access data.

▪ Transaction manager : which ensures that the database remains in a consistent (correct) state
despite system failures, and that concurrent transaction executions proceed without conflicting.

▪ File manager : which manages the allocation of space on disk storage and the data structures
used to represent information stored on disk.
▪ Buffer manager :
• which is responsible for fetching data from disk storage into main memory, and deciding what
data to cache in main memory.
• The buffer manager is a critical part of the database system,
• to handle data sizes that are much larger than the size of main memory.

Who is a Database Administrator(DBA):-


▪ DBA is a resource that supervises both the database and the use of the DBMS.

▪ DBA is usually a group, but sometimes it refers to the database administrator.

MODULE 2

1. What is an ER model ?
● ENTITY RELATIONAL (ER) MODEL is a high-level conceptual data model diagram.
● ER modeling helps you to analyze data requirements systematically to produce a well-designed
database.

2. What is an ER diagram and what is its purpose ?


● ENTITY-RELATIONSHIP DIAGRAM (ERD) displays the relationships of entity set stored
in a database.
● In other words, we can say that ER diagrams help you to explain the logical structure of
databases.
● The purpose of ER Diagram is to represent the entity framework infrastructure.

3. What is an Entity ?
● A real-world thing either living or non-living that is easily recognizable and
nonrecognizable.
● An entity can be place, person, object, event or a concept, which stores data in the
database.
4. What is an Entity Set?
An entity set is a set of entities of the same type that share the same properties.
Examples: set of all persons, companies, holidays,Students.
5. What is an relationship?
Relationship is nothing but an association among two or more entities.
Relationship is represented by the Diamond.

6. What is an attribute?
An entity is represented by a set of attributes, that is descriptive properties possessed by
all members of an entity set.

Attributes are represented by means of ellipses.

7. What are the types of attribute?

Simple attribute − Simple attributes are atomic values, which cannot be divided further

For example, a student's phone number is an atomic value of 10 digits.

A key attribute can uniquely identify an entity from an entity set. For example, student roll
number can uniquely identify a student from a set of students.

Key attribute is represented by oval same as other attributes however the text of key attribute is
underlined.

Composite attribute − Composite attributes are made of more than one simple attribute.

For example, a student's complete name may have first name and lastname.

Derived attribute − Derived attributes are the attributes that do not exist in the physical
database, but their values are derived from other attributes present in the database.
For example, average_salary in a department should not be saved directly in the database,
instead it can be derived

8. What is a primary key?

Which is Unique & Can’t be have NULL Value

9. What is a super key ?

● Super Key is defined as a set of attributes within a table that can uniquely identify each
record within a table. Super Key is a superset of Candidate key.

10. What is a candidate key?


A candidate key is a minimal super key or a super key with no redundant attribute.

11. What is a foreign key?


● Generally foreign key is a primary key from one table, which has a relationship with
another table.

12. What is a unique key ?


● Unique key is same as primary with the difference being the existence of null.
● Unique key field allows one value as NULL value.

13. Difference between weak entity set and strong Entity Set?
14. What is Generalization ?
● Generalization is a bottom-up approach in which two lower level entities combine to form a
higher level entity. In generalization, the higher level entity can also combine with other lower
level entities to make further higher level entity.

15. What is Specialization in Dbms?


Specialization is opposite to Generalization. It is a top-down approach in which one higher
level entity can be broken down into two lower level entity.

16. What is Aggregation in dbms?


Aggregation is a process when relation between two entities is treated as a single entity.

Enlist the various relationships of database.


The various relationships of database are:
● One-to-one: Single table having drawn relationship with another table
having similar kind of columns.
● One-to-many: Two tables having primary and foreign key relation.
● Many-to-many: Junction table having many tables related to many tables.
MODULE 3 :-

Q)What is a relation model


• RELATIONAL MODEL (RM) represents the database as a collection of relations. A relation is
nothing but a table of values. Every row in the table represents a collection of related data values.
These rows in the table denote a real-world entity or relationship.

• Relational Model represents how data is stored in Relational Databases.

Q) What is a Relational Schema ?


▪ Relation schema defines the design and structure of the relation.

▪ It consists of the :
• Relation name
• Set of attributes/field names/column names
• Every attribute would have an associated domain.

• Relational Model: Relational model represents data in the form of relations or tables.
• Relational Schema: Schema represents structure of a relation. e.g.; Relational Schema of
STUDENT relation can be represented as:
STUDENT (STUD_NO, STUD_NAME, STUD_PHONE, STUD_STATE, STUD_COUNTRY,
STUD_AGE)
• Relational Instance: The set of values present in a relation at a particular instance of time is known
as relational instance
• Cardinality of a relation: The number of tuples in a relation determines its cardinality
• Degree of a relation: Each column in the tuple is called an attribute. The number of attributes in a
relation determines its degree.
• Domains: A domain definition specifies the kind of data represented by the attribute.

Q) Differences Between E-R Model and Relational Model


The basic difference between E-R Model and Relational Model is that E-R model specifically deals
with entities and their relations. On the other hand, the Relational Model deals with Tables and
relation between the data of those tables.
1. An E-R Model describes the data with entity set, relationship set and attributes. However, the
Relational model describes the data with the tuples, attributes and domain of the attribute.
2. One can easily understand the relationship among the data in E-R Model as compared to
Relational Model.
3. E-R Model has Mapping Cardinality as a constraint whereas Relational Model does not have such
constraint.

ER Model Relational Model

Entity type Entity relation

1:1 and 1:N relationship type Foreign key or relationship relation

M:N relationship type Relationship relation and two foreign keys

n-ary relationship type Relationship relation and n foreign keys

Simple attribute Attribute

Composite attribute Set of component attributes

Multivalued attribute Relation and foreign key

Value set Domain

Key attribute Primary key or secondary key

1. Select Operation:
● The select operation selects tuples that satisfy a given predicate.
● It is denoted by sigma (σ).
σ is used for selection prediction
r is used for relation
p is used as a propositional logic formula which may use connectors like: AND OR and NOT.
These relational can use as relational operators like =, ≠, ≥, <, >, ≤.
Project Operation:
● This operation shows the list of those attributes that we wish to appear in the result. Rest
of the attributes are eliminated from the table.
● It is denoted by ∏.

Union Operation:
● Suppose there are two tuples R and S. The union operation contains all the tuples that
are either in R or S or both in R & S.
● It eliminates the duplicate tuples. It is denoted by ∪.
A union operation must hold the following condition:
● R and S must have the attribute of the same number.
● Duplicate tuples are eliminated automatically.

Set Intersection:
● Suppose there are two tuples R and S. The set intersection operation contains all tuples
that are in both R & S.
● It is denoted by intersection ∩.

Set Difference:
● Suppose there are two tuples R and S. The set intersection operation contains all tuples
that are in R but not in S.
● It is denoted by intersection minus (-).

Cartesian product
● The Cartesian product is used to combine each row in one table with each row in the
other table. It is also known as a cross product.
● It is denoted by X.

Join Operation:-
To combine two or more tables based on the related attributes.

It is basically a cross product followed by some more operations like select, project etc.

Inner Join
• Natural Join
• Theta Join
• Equi Join
Outer Join
• Left Outer Join
• Right Inner Join
• Full Outer Join

Inner Join
• Inner join is a type of join in which only those tuples are selected which full fill the required
conditions.

All those tuples which do not satisfy the required conditions are excluded

Natural Join(⋈)
• Natural Join is a join which is performed if there is a common attribute between the
relations.

• Notation: R1 ⋈ R2 where R1 and R2 are two relations.

Theta Join

• Theta join is a join which combines the tuples from different relations according to the
given theta condition.

• The join condition in theta join is denoted by theta (θ) symbol.

• This join uses all kind of comparison operator.

Equi Join
Equi Join is a type of theta join where we use only the equality operator.

Outer Join

• Difference : In Inner Join, we matched rows are returned and unmatched rows are not
returned. But, in outer join, we include those tuples which meet the given condition along
with that, we also add those tuples which do not meet the required condition.

Left Outer Join(⟕)


All the tuples from left relation are included and only those tuples from right relation are included
which have a common value in the common attribute on which the join is being performed.

• Notation: R1⟕ R2 where R1 and R2 are relations.


Right Outer Join(⟖)

• All the tuples from right relation are included and only those tuples from left relation are
included which have a common value in the common attribute on which the right join is
being performed.

• Notation: R1 ⟖ R2 where R1 and R2 are relations.

Full Outer Join(⟗)


All the tuples from the left and right relation which are having the same value on the common
attribute.

• Also, all the remaining tuples which are not common on in both the relations.

• Notation: R1 ⟗ R2 where R1 and R2 are relations.

What is SQL?

Structured Query Language (SQL) being ANSI standard language updates database
and commands for accessing.

▪ Standard Relational Database Language

▪ Allows to create DB

▪ Allows to manipulate DB

▪ Supported Features:

• Data Definition Language


• Data Manipulation Language
• Data Control Language

What can SQL do?


▪ execute queries against a database
▪ retrieve data from a database

▪ insert records in a database

▪ update records in a database

▪ delete records from a database

▪ create new databases

▪ create new tables in a database

Q) Define DDL and DML.


Managing properties and attributes of database is called Data Definition
Language(DDL).
Manipulating data in a database such as inserting, updating, deleting is defined as
Data Manipulation Language. (DML)

Q)Enlist some commands of DDL.


They are:
CREATE:
Create is used in the CREATE TABLE statement. Syntax is:
CREATE TABLE [column name] ( [column definitions] ) [ table
parameters]

ALTER:
It helps in modification of an existing object of database. Its syntax is:
ALTER objecttype objectname parameters.

DROP:
It destroys an existing database, index, table or view. Its syntax is:
DROP objecttype objectname.
Q) What are Constrains ?
▪ Constraints enforce rules at the table level.

▪ Constraints ensures that changes made to a database do not result in a loss of data consistency.

▪ Types of Constraints :
– NOT NULL
– UNIQUE
– PRIMARY KEY
– FOREIGN KEY (Referential Integrity)
– CHECK

Q) DML Statements ?

▪ INSERT

▪ UPDATE

▪ DELETE

Define Normalization.
Organized data void of inconsistent dependency and redundancy within a database
is called normalization.

Enlist the advantages of normalizing database.


Advantages of normalizing database are:
● No duplicate entries
● Saves storage space
● Boasts the query performances.

Define Denormalization.
Boosting up database performance, adding of redundant data which in turn helps
rid of complex data is called denormalization.

Why Normalization in database?


• Normalization is the process of organizing the data in the database.

• Normalization is used to minimize the redundancy from a relation or set of relations. It is also
used to eliminate the undesirable characteristics like Insertion, Update and Deletion Anomalies.

• Normalization divides the larger table into the smaller table and links them using relationship.

• The normal form is used to reduce redundancy from the database table.

There are 6 different normalization benchmarks used which are –


•1 NF (normal form)
•2 NF
•3 NF
•BCNF (Boyce-Codd Normal Form
•4NF
•5NF
•6NF

Q) What is Functional Dependency ?


▪ If one attribute is determined by another attribute in a DBMS system then it is a functional
dependency

• Multivalued dependency occurs in the situation where there are multiple independent
multivalued attributes in a single table.
• The Trivial dependency is a set of attributes which are called a trivial if the set of
attributes are included in that attribute.

• In a relationship, if attribute B is not a subset of attribute A, then it is considered as a


non-trivial dependency.

• A transitive is a type of functional dependency which happens when it is indirectly formed


by two functional dependencies.

Advantages of Functional Dependency


• Functional Dependency avoids data redundancy. Therefore same data do not repeat at multiple
locations in that database

• It helps you to maintain the quality of data in the database

• It helps you to define meanings and constraints of databases

• It helps you to identify bad designs

• It helps you to find the facts regarding the database design

You might also like