You are on page 1of 3

DBMS Concept

1. What is Normalization?

Normalization is the process of efficiently organizing data in a


database.
There are two goals of the normalization process:
A) Eliminating redundant data
B) Ensuring data dependencies

2. Explain the normal forms ?

1- NF Rule :
A) Remove duplicate columns from the same table.
B) Identify each row using the primary key.

2- NF Rule :
A) Meet all the requirements of the first normal form.
B) Create relationships between two tables using foreign keys.

3-NF Rule :
A) Meet all the requirements of the second normal form.
B) Remove columns that are not dependent upon the primary key.

BCNF Rule :
A) Meet all the requirements of the third normal form.
B) Every determinant must be a candidate key.

4-NF Rule :
A) Meet all the requirements of the third normal form.
B) A relation is in 4NF if it has no multi-valued dependencies.

3 . What is Difference between primary key & unique key ?

Primary Key it doesn't allow Null values.


Unique Key allows Null value. But only one Null value.

A table can have only one primary key


A table can have more than one unique key column

4. What is stored procedure ?


A stored procedure is a set of Structured Query Language (SQL)
statements with an assigned name that's stored in the database in
compiled form so that it can be shared by a number of programs
Advantage of a stored procedure :

A) Stored Procedure allows faster execution.


B) Stored Procedure can reduce network traffic.
C) Stored procedures provide better security to your data

In SQL we are having different types of stored procedures are there

a) System Stored Procedures


b) User Defined Stored procedures
c) Extended Stored Procedures

5. What is Indexing ?

Indexing as a technique how to quickly data can found in table.


Indexes can be created using one or more columns of a database table

6. What is Trigger ?

Triggers are stored programs, which are automatically executed or


fired when some events occur.

Benefits of Triggers
A) Generating some derived column values automatically
B) Synchronous replication of tables

7. What are the main differences between InnoDB and MyISAM?

A) InnoDB has row-level locking, MyISAM can only do full table-level


locking.
B) InnoDB implements transactions, foreign keys and relationship
constraints, MyISAM does not.

8. What is Referential integrity ?

Referential integrity ensures that relationships between tables


remains consistent.

More specifically, this means when a table has a foreign key


pointing to a different table (e.g. Products), when updates or
deletes occur to the pointed-to table, these changes are cascaded to
the linking table.

Example : if a product is renamed, the linking table 's foreign keys


will also update; if a product is deleted from the ‘Products’
table, any listings which point to the deleted entry will also be
deleted. Furthermore, any new listing must have that foreign key
pointing to a valid, existing entry.

You might also like