Home » RDBMS, Talent Transformation At WIPRO, Tech Corner

RDBMS Chapter-3

10 October 2009 No Comments Posted By:Lloyd

RDBMS Continued-3

According to me this is a very small chapter but very basic stuffs are discused in here.So read through very carefully try to understand the terms and feel free to ask any doubts we will try to clarify doubts as far as we can.From the previous chapters you would have got a brief idea about what is a database which are the different database models etc.Here we are going to start on a Relational database.

A Relational Database Management System uses the relational model that is relationship between records are maintained in the table.The features of an RDBMS include an interactive query language,retrieval of related data from more than one tables,a DataDictionary or catalog for easy access of data etc…

Some Important Terms with respect to DBMS

  1. TUPLE: a row in a table is called a tuple.
  2. RELATION: a table is usualy referred to as a relation.
  3. ATTRIBUTES: a column in a table.
  4. DEGREE: is number of attributes.
  5. DOMAIN: a set of values from which attributes can take values.

Understanding the TERMS

Consider the same employee example i mentioned in the first chapter.While creating a (relation)table for the employees,the NAME,EMPLOYEE ID,DOB,DEPARTMENT,ADDRESS etc are attributes(columns),all these together form a tuple(row).Consider the attribute EMPLOYEE ID ,it takes the value as 6 digit positive integers,so that is the DOMAIN.Hope it is clear now.

KEYS : is an important topic that all of you should read properly.I will explain it with examples rather than with definitions.For this am using the same old example of an EMPLOYEE.I am going to list down a few ATTRIBUTES of it.

-Employee Name

-Employee ID(Eid)

-Domain

-Department

-DOB

-Blood Group

-Manager to whom he is reporting(Manager)

-CUBICLE ID(desk id/seat number)

-CUBICLE PHONE NUMBER(desk phone)

-Email Id

-Date of Joining(DOJ)

Certain attributes alone or in combination can distinguish one employee from another.Like Eid,Email Id both can itself identify an employee.Combination of EmployeeName+DOB+DOJ,EmployeeName+Manager+CUBICLE ID can also identify an employee.There can be many more combinations.From these we can simply take Eid as a unique identifier as it is the simplest key.

DEFINITIONS:-

-There may be 2 or more attributes or there combinations which can uniquely identify a record.These attributes or combinations are called CANDIDATE KEYS.Eg:-(Eid,Email Id,CUBICLE ID+CUBICLE PHONE).These are candidates for the primary key.Rest other than primary key in this set are called ALTERNATE KEYS.

-An attribute or set of attributes whose values uniquely identify each entity in an entity set is called KEY.

-If we add additional attributes to a key and it STILL uniquely identify an instance of the entity set such keys are called SUPER KEYS.

-A minimum super key is called PRIMARY KEY,it cant be NULL.

-A UNIQUE key can be NULL.

-Attribute or group which refers to some other table is called a FORIEGN KEY.

Any key consisting of a single attribute is called a SIMPLE KEY.And those with a combination of attributes are called COMPOSITE KEYS.With this i am winding this chapter.

RDBMS Chapter-3
According to me this is a very small chapter but very basic stuffs are discused in here.So read through ver carefully try to understand the terms and feel free to ask any doubts we will try to clarify doubts as far as we can.From the previous chapters you would have got a brief idea about what is a database which are the different database models etc.Here we are going to start on a Relational database.
A Relational Database Management System uses the relational model that is relationship between records are maintained in the table.The features of an RDBMS include an interactive query language,retrieval of related data from more than one tables,a DataDictionary or catalog for easy access of data etc…
Some Important Terms with respect to DBMS
-TUPLE: a row in a table is called a tuple.
-RELATION: a table is usualy referred to as a relation.
-ATTRIBUTES: a column in a table.
-DEGREE: is number of attributes.
-DOMAIN: a set of values from which attributes can take values.
Understanding the TERMS
Consider the same employee example i mentioned in the first chapter.While creating a (relation)table for the employees,the NAME,EMPLOYEE ID,DOB,DEPARTMENT,ADDRESS etc are attributes(columns),all these together form a tuple(row).Consider the attribute EMPLOYEE ID ,it takes the value as 6 digit positive integers,so that is the DOMAIN.Hope it is clear now.
KEYS : is an important topic that all of you should read properly.I will explain it with examples rather than with definitions.For this am using the same old example of an EMPLOYEE.I am going to list down a few ATTRIBUTES of it.
-Employee Name
-Employee ID(Eid)
-Domain
-Department
-DOB
-Blood Group
-Manager to whom he is reporting(Manager)
-CUBICLE ID(desk id/seat number)
-CUBICLE PHONE NUMBER(desk phone)
-Email Id
-Date of Joining(DOJ)
Certain attributes alone or in combination can distinguish one employee from another.Like Eid,Email Id both can itself identify an employee.Combination of EmployeeName+DOB+DOJ,EmployeeName+Manager+CUBICLE ID can also identify an employee.There can be many more combinations.From these we can simply take Eid as a unique identifier as it is the simplest key.
DEFINITIONS:-
-There may be 2 or more attributes or there combinations which can uniquely identify a record.These attributes or combinations are called CANDIDATE KEYS.Eg:-(Eid,Email Id,CUBICLE ID+CUBICLE PHONE).These are candidates for the primary key.Rest other than primary key in this set are called ALTERNATE KEYS.
-An attribute or set of attributes whose values uniquely identify each entity in an entity set is called KEY.
-If we add additional attributes to a key and it STILL uniquely identify an instance of the entity set such keys are called SUPER KEYS.
-A minimum super key is called PRIMARY KEY,it cant be NULL.
-A UNIQUE key can be NULL.
-Attribute or group which refers to some other table is called a FORIEGN KEY.
Any key consisting of a single attribute is called a SIMPLE KEY.And those with a combination of attributes are called COMPOSITE KEYS.

Related posts:

  1. RDBMS-2
  2. RDBMS basics
  3. The PRP at WIPRO
  4. Operators & Expressions
  5. Unix Sample Questions

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>