Rdbms 3
Rdbms 3
Contents
Introduction
Objectives:
Introduction:
Database is a collection of Data. DBMS is Data Base Management System which is a software
system that helps in creating, searching, arranging the data in database.
Relational Database is a collection of Data in the form of tables used to assemble or reassemble
the data easily. All the data are brought together to a single server connected together to a single
administrator. The administrator can provide privileges to various users and also data allocation
in the database can also be possible.
A method for structuring data in the form of sets of records or tuples so that relations between
different entities and attributes can be used for data access and transformation.( Burroughs,
1986)
Relational Database Management System – a database system made up of files with data
elements in two-dimensional array (rows and columns). This database management system has
the capability to recombine data elements to form different relations resulting in a great
flexibility of data usage.(Martin, 1976)
Relational Database Management System:
It consists of rows and columns to store the data. Tuple is called as row and Attribute is
called as Column. This system proved to be highly useful in the production industry for
recording data of new incomes and parts. Generally the transactions of money for banks and
other online money transactions are done through Relational database management systems
coordinated along with a mainframe server to function promptly with high frequencies that there
is almost no delay between processes. This system also can give privileges to specific users and
restriction of data access to users and these are all controlled by the administrator of the main
server.
Let us have a new table with Courses(Name, Grade, Average, SSNO) where Courses is the table
and Name, Grade, Average, SSO are attributes. SSNO is the foreign key. In this table, the
foreign key is used to switch between tables. The foreign key is compared with the primary key
in the Student table and data can be extracted and combined with both the tables using the single
foreign key. This mainly came into existence because very long table with a lot of attributes
cannot be managed. In order to make this process of data entry and verification shorter and
easier, the table can be split up into a number of small individual tables linked using the foreign
key to connect with the main mother table. Hence using this method data entry and extraction
became easier.
The following table shows the serial number of the student, Name, Grade and the average marks.
The following table shows the serial number, Name age and the marks of the student.
Foreign key is used to reference sno in students table. This is how the relations are maintained in
Relational Database Management System.
In software systems SQL are used to select a specific data from multiple tables.
Example : CREATE TABLE :Create a new table, e.g., students, courses, enrolled
2. Many to Many
3. One to One
Let us consider an employee working in a company. An employee could work for one
department but a department can have many employees. So in a table when one attribute matches
another unique single data in the attribute, and that unique single data can have many data in
another attribute. This is known as one to many and many to one relationship. The following
tables can show a better example of the processes.
1. Group all the relationships for which the "many" side of the relationship is the same
entity.
2. Define a single table for all the relationships in the group.
In the following example, the "many" side of the first and second relationships is "employees" so
an employee table, EMPLOYEE, is defined.
The following table consists of the employee number, working department and their
corresponding Job.
The following table consists of the department number and the administrative department
DEPTNO ADMRDEPT
C01 A00
D01 A00
D11 D01
Many-to-many relationships
The following table shows how a many-to-many relationship (an employee can work on
many projects, and a project can have many employees working on it) is represented.
The following table consists of the employee number and project number
EMPNO PROJNO
000030 IF1000
000030 IF2000
000130 IF1000
000140 IF2000
000250 AD3112
One-to-one relationships
The following table consists of the department number and the manager number.
DEPTNO MGRNO
A00 000010
B01 000020
D11 000060
Ensure that equal values represent the same entity
You can have more than one table describing the attributes of the same set of entities. For
example, the EMPLOYEE table shows the number of the department to which an employee is
assigned, and the DEPARTMENT table shows which manager is assigned to each department
number. To retrieve both sets of attributes simultaneously, you can join the two tables on the
matching columns, as shown in the following example. The values in WORKDEPT and
DEPTNO represent the same entity, and represent a join path between the DEPARTMENT and
EMPLOYEE tables.
The following table consists of the department number, department name, manager number and
the administrative department.
The following table consists of the employee number, first and last names, working department
and the job in the company.
Conclusion:
Hence an overall study of RDBMS was conducted and the various data creation
procedures were studied in detail. Details and detailed maintenance procedures of a relational
database management system is also studied. Finally a better approach towards understanding
the relationship models were done and explained using examples for the individual cases with
individual tables.
References