DBMS Interview Questions
DBMS Interview Questions
Ans: It is a set of programs that permits user to form and maintain a info. In alternative
words its general computer code that has the users with the processes of shaping,
constructing and manipulating the info for numerous applications.
Ans: The database and DBMS software together is called as Database system.
Ans:
1. Redundancy is controlled.
2. Unauthorized access is restricted.
3. Providing multiple user interfaces.
4. Enforcing integrity constraints.
5. Providing backup and recovery.
Ans:
1. Physical level: The lowest level of abstraction describes how data are stored.
2. Logical level: The next higher level of abstraction, describes what data are stored in
database and what relationship among those data.
3. View level: The highest level of abstraction describes only part of entire database.
1. Entity Integrity: States that "Primary key cannot have NULL value"
2. Referential Integrity: States that "Foreign Key can be either a NULL value or should
be Primary Key value of other relation.
Ans:
1. Extension: It is the number of tuples present in a table at any instance. This is time
dependent.
2. Intension: It is a constant value that gives the name, structure of table and the
constraints laid on it.
Ans: System R was designed and developed over a period of 1974-79 at IBM San Jose
Research Center. It is a prototype and its purpose was to demonstrate that it is possible to
build a Relational System that can be used in a real life environment to solve real life
problems, with performance at least comparable to that of existing system.
Research Storage
System Relational Data System.
Ques: How is the data structure of System R different from the relational structure?
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.
Student Table
COURSEID ENROLLNO
1 1000
2 1000
3 1000
1 1002
2 1003
Following is join query that shows names of students enrolled in different courseIDs.
FROM StudentCourse
ON StudentCourse.EnrollNo = Student.EnrollNo
ORDER BY StudentCourse.CourseID;
COURSEID STUDENTNAME
1 geek1
1 geek2
2 geek1
2 geek3
3 geek1
Ans: A view is a virtual table based on the result-set of an SQL statement. We can create
using create view syntax.
SELECT column_name(s)
FROM table_name
WHERE condition
Ques. There is a table where only one row is fully repeated. Write a Query to find the
repeated row
Name Section
abc CS1
bcd CS2
abc CS1
In the above table, we can find duplicate row using below query.
Ans:
FROM EMPLOYEES);
OR
Ques. Get employee details from employee table whose first name ends with 'n' and name
contains 4 letters
Ques. Get employee details from employee table whose first name starts with 'J' and name
contains 4 letters
Ques. Get employee details from employee table whose Salary greater than 600000
Ques. Get employee details from employee table whose Salary less than 800000
Ques. Get employee details from employee table whose Salary between 500000 and
800000
Ans: Select * from EMPLOYEE where Salary between 500000 and 800000