DBMS Interview Questions - Set 7

DBMS Interview Questions

← Prev

This page consists of DBMS interview questions and answers.

Q1: What is Relational Algebra?

Relational Algebra is a Procedural Query Language consisting of a set of operations. It takes one or more relations (tables) as input and produces a new relation (table) as output.

Q2: What is Relational Calculus?

Relational Calculus is a non-procedural query language. It uses mathematical predicate calculus instead of algebra. So, its main focus is on what to do with the relations (tables) rather than how to do it.

Q3: What is ER model?

ER Model or Entity Relationship Model is based on real world and deals with entities and their relationships.

Q4: What is an Entity in ER Model?

An Entity is a real word object. It is a set of attributes in database.

For example, student is an entity.

Q5: What is an Entity Type in ER Model?

Collection of entities having same attributes is called an Entity Type.

Q6: What is an Entity Set in ER Model?

An Entity Set is a collection of entities of a particular Entity Type.

For example, if a student is an entity then collection of students make an entity set.

Q7: What is an Attribute in ER Model?

An attribute is a particular property that describes an entity.

For example, if student is an entity then, studentid, student_firstname and student_lastname are some of the attributes that describes the student.

Q8: What are the types of attributes in ER Model?

Following are the attributes in ER Model.

  • Simple Attributes
  • Composite Attributes
  • Derived Attributes
  • Single Valued Attributes
  • Multi Valued Attributes

Simple Attributes

Attributes with atomic value that can't be broken down further.

For example, age of a student is a simple attribute.

Composite Attribute

Attributes that are made up of simple attributes.

address of a person is a composite attribute as it consists of house number, stree, city, state, country and pincode.

Derived Attributes

These attributes are not present in the database but their values are derived from other attributes.

For example, the average age of all the students is a derived attribute as its value is computed using the age (simple attribute) of all the students.

Single and Multi valued Attributes

Single valued attribute consists of single value.

Multi valued attributes consists of multiple value.

Q9: What are keys in ER Model?

A key is an attribute or attributes that can uniquely identify an entity.

For example, studentid is a key of the student table as it can uniquely identify a student entiry (row) in the table.

Q10: What is a Relationship in ER Model?

If two entites are related with each other then we say a Relationship exists between the two.

If two entities are related then we call it a binary relationship.

Similarly, if three entities are related then we call it a ternary relationship.

← Prev