Friday, April 4, 2014

couch mode print story

Database Management System Interview Questions and Answers

Database Management System Interview Questions and Answers

1. What is database?

A database is a collection of information that is organized. So that it can easily be accessed, managed, and updated.
OR
A database is a collection of related data .A database is a logically coherent collection of data with some inherent meaning.


2. What is DBMS?

DBMS stands for Database Management System. It is a collection of programs that enables user to create and maintain a database.A DBMS receives requests from applications and translates those requests into actions on a specific database. A DBMS processes SQL tatements or uses other functionality to create, process and administer databases.


3. What are the advantages of DBMS?

I. Redundancy is controlled.
II. Providing multiple user interfaces.
III. Providing backup and recovery
IV. Unauthorized access is restricted.
V. Enforcing integrity constraints.


4. What is SQL, and why is it important?

SQL stands for Structured Query Language, and is the most important data processing language in use today.
It is not a complete programming language like Java or C#, but a data sublanguage used for creating and
processing database data and metadata. All DBMS products today use SQL.


5. What is a Catalog?

A catalog is a table that contain the information such as structure of each file , the type and storage format of each data item and various constraints on the data .
The information stored in the catalog is called Metadata . Whenever a request is made to access a particular data, the DBMS s/w refers to the catalog to determine the structure of the file.


6. What’s difference between DBMS and RDBMS ?

DBMS provides a systematic and organized way of storing, managing and retrieving from collection of logically related information. RDBMS also provides what DBMS provides but above that it provides relationship integrity.
So in short we can say
RDBMS = DBMS + REFERENTIAL INTEGRITY
These relations are defined by using “Foreign Keys” in any RDBMS.Many DBMS companies claimed there DBMS product was a RDBMS compliant, but according to industry rules and regulations if the DBMS fulfills the twelve CODD rules it’s truly a RDBMS. Almost all DBMS (SQL SERVER, ORACLE etc) fulfills all the twelve CODD rules and are considered as truly RDBMS.


7. What are E-R diagrams?

E-R diagram also termed as Entity-Relationship diagram shows relationship between various tables in the
database. .


8. How many types of relationship exist in database designing?

There are three major relationship models:-
One-to-one
One-to-many
Many-to-many


9. What is normalization?

It is a process of analysing the given relation schemas based on their Functional Dependencies (FDs) and primary key to achieve the properties
(1).Minimizing redundancy,
(2). Minimizing insertion, deletion and update anomalies.


10. What is Data Model?

A collection of conceptual tools for describing data, data relationships data semantics and constraints.


11. What is an SQL subquery?

An SQL subquery is a means of querying two or more tables at the same time. The subquery itself is an SQL
SELECT statement contained within the WHERE clause of another SQL SELECT statement, and separated by being enclosed in parenthesis. Some subqueries have equivalent SQL join structures, but correlated subqueries cannot be duplicated by a join.


12. What is Object Oriented model?

This model is based on collection of objects. An object contains values stored in instance variables with in the object. An object also contains bodies of code that operate on the object. These bodies of code are called methods. Objects that contain same types of values and the same methods are grouped together into classes.


13. What is an Entity?

An entity is a thing or object of importance about which data must be captured.


14. What is DDL (Data Definition Language)?

A data base schema is specifies by a set of definitions expressed by a special language called DDL.


15. What is DML (Data Manipulation Language)?

This language that enable user to access or manipulate data as organised by appropriate data model. Procedural DML or Low level:
DML requires a user to specify what data are needed and how to get those data. Non-Procedural DML or High level: DML requires a user to specify what data are needed without specifying how to get those data.


16. What is a foreign key, and what is it used for?

A foreign key is used to establish relationships among relations in the relational model. Technically, a foreign
key is a column (or columns) appearing in one relation that is (are) the primary key of another table. Although there may be exceptions, the values in the foreign key columns usually must correspond to values existing in the set of primary key values. This correspondence requirement is created in a database using a referential integrity constraint on the foreign key.


17. What is 1 NF (Normal Form)?

The first normal form or 1NF is the first and the simplest type of normalization that can be implemented in a database. The main aims of 1NF are to:
1. Eliminate duplicative columns from the same table.
2. Create separate tables for each group of related data and identify each row with a unique column (the primary key).


18. What is 2NF?

A relation schema R is in 2NF if it is in 1NF and every non-prime attribute A in R is fully functionally dependent on primary key.


19. What is 3NF?

A relation is in third normal form if it is in Second Normal Form and there are no functional (transitive) dependencies between two (or more) non-primary key attributes.


20. What is BCNF (Boyce-Codd Normal Form)?

A table is in Boyce-Codd normal form (BCNF) if and only if it is in 3NF and every determinant is a candidate key.


21. What is 4NF?

Fourth normal form requires that a table be BCNF and contain no multi-valued dependencies.


22. What is 5NF?

A table is in fifth normal form (5NF) or Project-Join Normal Form (PJNF) if it is in 4NF and it cannot have a lossless decomposition into any number of smaller tables.


23. What is Functional Dependency?

Functional Dependency is the starting point of normalization. Functional Dependency exists when a relation between two attributes allows you to uniquely determine the corresponding attribute’s value.


24. What is Fully Functional dependency?

A functional dependency X Y is full functional dependency if removal of any attribute A from X means that the dependency does not hold any more.


25. Define and discuss data constraints.

Data constraints on a column are the limits put on the values the data can have. There are four types of data
constraints:
(1) domain constraints, which define a limited set of values for the column,
(2) range constraints, which specify that the values must fall within a certain range,
(3) intrarelation constraints, which define what values the column can have based on values of other columns
in the same table, and
(4) interrelation constraints, which define values the column can have based on values of columns in other
tables.

Written




0 comments:

Post a Comment