Open Source Projects
This page consists of DBMS interview questions and answers.
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.
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.
ER Model or Entity Relationship Model is based on real world and deals with entities and their relationships.
An Entity is a real word object. It is a set of attributes in database.
For example, student is an entity.
Collection of entities having same attributes is called an Entity Type.
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.
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.
Following are the attributes in ER Model.
Attributes with atomic value that can't be broken down further.
For example, age of a student is a simple 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.
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 valued attribute consists of single value.
Multi valued attributes consists of multiple value.
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.
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.
Have fun learning :-)
Copyright © 2014 - 2018 DYclassroom. All rights reserved.
rendered in 0.0509 sec