What do you understand by Functional dependency?
A relation is said to be in functional dependency when one attribute uniquely defines another attribute.
For Example, R is a Relation, X and Y are two attributes. T1 and T2 are two tuples. Then,
T1[X]=T2[X] and T1[Y]=T2[Y]
This means, the value of component X uniquely defines the value of component Y.
Also, X->Y means Y is functionally dependent on X.
When is functional dependency said to be the fully functional dependent?
To fulfill the criteria of fully functional dependency, the relation must meet the requirement of functional dependency.
A functional dependency 'A' and 'B' are said to be fully functional dependent when removal of any attribute say 'X' from 'A' means the dependency does not hold anymore.
What is normalization?
Normalization is the process of minimizing redundancy and dependency by organizing fields and table of a database. The main aim of Normalization is to add, delete or modify fields that can be made in a single table.
What is Denormalization?
Denormalization is a technique used to access the data from higher to lower normal forms of the database. It is also the process of introducing redundancy into a table by incorporating data from the related tables.
What are the different types of Normalization?
Different types of Normalization are:
What do you understand by Data Redundancy?
Duplication of data in the database is known as data redundancy. As a result of data redundancy, duplicated data is present at multiple locations, hence it leads to wastage of the storage space, and the integrity of the database is destroyed.
Explain the terms ‘Record’, ‘Field’, and ‘Table’ in terms of database.
How to fetch alternate records from a table?
Records can be fetched for both Odd and Even row numbers:
Select studentId from (Select rowno, studentId from student) where mod(rowno,2)=0
Select studentId from (Select rowno, studentId from student) where mod(rowno,2)=1
How to fetch common records from two tables?
Common records result set can be achieved by:
Select studentID from student INTERSECT Select StudentID from Exam
How to select unique records from a table?
Select unique records from a table by using the DISTINCT keyword:
Select DISTINCT StudentID, StudentName from Student