DBMS - Quick reference - 8

36. What is functional Dependency?
A functional dependency in a database enforces a set of constraints between attributes. This occurs when one attribute in a relation uniquely determines another attribute. This can be written A -> B which means "B is functionally dependent upon A." This is also called a database dependency.

37. What is the purpose of SQL ?
SQL stands for Structured Query Language and is used to communicate with a database. The data in a relational database is stored in the form of tables. SQL Commands allow you to create a host of components such as tables, schemas, stored procedures, indexes ...etc or even new databases altogether.

38. What is Primary key and Foreign Key ?
Primary keys and foreign keys are two types of constraints that can be used to enforce data integrity in SQL Server tables. These are important database objects.
A primary key is a column or a set of columns in a table whose values uniquely identify a row in the table. A relational database is designed to enforce the uniqueness of primary keys by allowing only one row with a given primary key value in a table.
A foreign key is a column or a set of columns in a table whose values correspond to the values of the primary key in another table. In order to add a row with a given foreign key value, there must exist a row in the related table with the same primary key value.

39. What are the differences between DROP, TRUNCATE and DELETE commands?
DELETE command will temporarily delete the data from database.
For DELETE , Before commit operation ,if we roll back we will get the data.
DELETE won’t re-initialize the table .
TRUNCATE command will permanently delete the data from database.
For TRUNCATE, If we roll back also we won’t get the data.
TRUNCATE will re-initialize the table.
DROP command will completely destroy table from database.

40. What are the different levels of abstraction in the DBMS?
The process of hiding the internal details is called data Abstraction.
three level of data abstraction.
Physical level : This is the lowest level of abstraction. It describes how data is actually stored in the database. We can get the complex data structures at this level.
Logical level : This is the middle level of the data abstraction architecture. It describes what type of data structures, we are storing at this level. It includes description of their attributes, datatype along with fields and their relationship.
View level : It is the highest level of data abstraction architecture. This level describes the user interaction with database system.

1 2 3 4 5 6 7 8 9 10