0% found this document useful (0 votes)
77 views3 pages

DDL Stands For Data Definition Language. SQL Queries Like CREATE, ALTER, DROP and

The document contains answers to important questions on DBMS lab concepts. It discusses the advantages of DBMS over file systems, defines key concepts like super keys, primary keys, foreign keys and normalization. It also explains the differences between DDL, DML and DCL statements in SQL, differences between HAVING and WHERE clauses, uses of JOIN, views, triggers and transactions. It describes DROP, TRUNCATE and DELETE commands and abstraction levels in DBMS.

Uploaded by

Simarjeet Singh
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)
77 views3 pages

DDL Stands For Data Definition Language. SQL Queries Like CREATE, ALTER, DROP and

The document contains answers to important questions on DBMS lab concepts. It discusses the advantages of DBMS over file systems, defines key concepts like super keys, primary keys, foreign keys and normalization. It also explains the differences between DDL, DML and DCL statements in SQL, differences between HAVING and WHERE clauses, uses of JOIN, views, triggers and transactions. It describes DROP, TRUNCATE and DELETE commands and abstraction levels in DBMS.

Uploaded by

Simarjeet Singh
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/ 3

IMPORTANT VIVA QUESTIONS ON DBMS LAB

What are advantages of DBMS over traditional file based systems?


Ans: Database management systems were developed to handle the following difficulties of
typical Fille-processing systems supported by conventional operating systems.
1. Data redundancy and inconsistency
2. Difficulty in accessing data
3. Data isolation – multiple files and formats
4. Integrity problems
5. Atomicity of updates
6. Concurrent access by multiple users
7. Security problems

What are super, primary, candidate and foreign keys?


Ans: 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 minimal superkey, i.e., no proper subset of Candidate key attributes can be
a superkey.
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 that one primary keys in a
table.
A Foreign key is a field (or collection of fields) in one table that uniquely identifies a row of
another table

What is database normalization?


Ans: It is a process of analyzing the given relation schemas based on their functional
dependencies and primary keys to achieve the following desirable properties:
1) Minimizing Redundancy
2) Minimizing the Insertion, Deletion, And Update Anomalies
Relation schemas that do not meet the properties are decomposed into smaller relation schemas
that could meet desirable properties.

What are the differences between DDL, DML and DCL in SQL?
Ans: Following are some details of three.
DDL stands for Data Definition Language. SQL queries like CREATE, ALTER, DROP and
RENAME come under this.
DML stands for Data Manipulation Language. SQL queries like SELECT, INSERT and
UPDATE come under this.
DCL stands for Data Control Language. SQL queries like GRANT and REVOKE come under
this.
What is the difference between having and where clause?
Ans: HAVING is used to specify a condition for a group or an aggregate function used in
select statement. The WHERE clause selects before grouping. The HAVING clause selects
rows after grouping. Unlike HAVING clause, the WHERE clause cannot contain aggregate
functions.

What is Join?
Ans: An SQL Join is used to combine data from two or more tables, based on a common field
between them. For example, consider the following two tables.

What are the uses of view?


1. Views can represent a subset of the data contained in a table; consequently, a view can limit
the degree of exposure of the underlying tables to the outer world: a given user may have
permission to query the view, while denied access to the rest of the base table.

What is a Trigger?
Ans: A Trigger is a code that 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 database.

What is a transaction? What are ACID properties?


Ans: A Database Transaction is a set of database operations that must be treated as whole,
means either all operations are executed or none of them.
An example can be bank transaction from one account to another account. Either both debit
and credit operations must be executed or none of them.
ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that guarantee that
database transactions are processed reliably.

What is the use of DROP command and what are the differences between DROP,
TRUNCATE and DELETE commands?
Answer: DROP command is a DDL command which is used to drop/delete the existing table,
database, index or view from the database.
The major difference between DROP, TRUNCATE and DELETE commands are:
DROP and TRUNCATE commands are the DDL commands which are used to delete tables
from the database and once the table gets deleted, all the privileges and indexes that are related to
the table also get deleted. These 2 operations cannot be rolled back and so should be used only
when necessary.
DELETE command, on the other hand, is a DML Command which is also used to delete rows
from the table and this can be rolled back.

What are the different levels of abstraction in the DBMS?


Answer: There are 3 levels of data abstraction in the DBMS.
They include:
 Physical Level: This is the lowest level of the data abstraction which states how the data
is stored in the database.
 Logical Level: This is the next level of the data abstraction which states the type of the
data and the relationship among the data that is stored in the database.
 View Level: This is the highest level in the data abstraction which shows/states only a
part of the database.

What is E-R model in the DBMS?


Answer: 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.

What is a functional dependency in the DBMS?


Answer: This is basically a constraint which is useful in describing the relationship among the
different attributes in a relation

What is BCNF in the DBMS?


Answer: BCNF is the Boyce Codd Normal Form which is stricter than the 3NF.

What are different types of joins in SQL?


Answer: There are 4 types of SQL Joins:
 Inner Join: This type of join is used to fetch the data among the tables which are
common in both the tables.
 Left Join: This returns all the rows from the table which is on the left side of the join but
only the matching rows from the table which is on the right side of the join.
 Right Join: This returns all the rows from the table which is on the right side of the join
but only the matching rows from the table which is on the left side of the join.
 Full Join: This returns the rows from all the tables on which the join condition has put
and the rows which do not match hold null values.

What are the different type of relationships in the DBMS?
Answer: Relationships in DBMS depicts an association between the tables.
Different types of relationships are:
 One-to-One: This basically states that there should be a one-to-one relationship between
the tables i.e. there should be one record in both the tables. Example: Among a married
couple, both wife and husband can have only one spouse.
 One-to-Many: This states that there can be many relationships for one i.e. a primary key
table hold only one record which can have many, one or none records in the related
table. Example: A Mother can have many children.
 Many-to-Many: This states that both the tables can be related to many other
tables. Example: One can have many siblings and so do they have.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy