0% found this document useful (0 votes)
21 views12 pages

Dbms Final

DBMS

Uploaded by

Rohith Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views12 pages

Dbms Final

DBMS

Uploaded by

Rohith Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

A Micro Project report on

Designing a Relational Database for the University Register’s office

Submitted to the CMR Institute of Technology in partial fulfillment of the


requirement for the award of the Laboratory of
DATABASE MANAGEMENT SYSTEM
of

II-B. Tech II-Semester in


ELECTRONICS AND COMMUNICATION ENGINEERING
Submitted by

P. SANDEEP REDDY 22R01A0451


P. RUPA SRI 22R01A0452
P. SAI CHARAN 22R01A0453
R. TEENA SREE 22R01A0454

Under the Guidance of


Mrs.B.Annapoorna

(Asst. Professor CSE-AIML)

CMR INSTITUTE OF TECHNOLOGY

(UGC AUTONOMOUS)

(Approved by AICTE, Affiliated to JNTU, Kukatpally, Hyderabad)

Kandlakoya, Medchal road, Hyderabad.

2023-2024
CMR INSTITUTE OF TECHNOLOGY

(UGCAUTONOMOUS)

(Approved by AICTE, Affiliated to JNTU, Kukatpally, Hyderabad)

Kandlakoya,Medchal road, Hyderabad.

ELECTRONICS AND COMMUNICATION ENGINEERING

CERTIFICATE

This is to certify that a Micro Project entitled with " Designing a Relational Database
for the University Register’s office " is being
Submitted by

P. SANDEEP REDDY 22R01A0451


P. RUPA SRI 22R01A0452
P. SAI CHARAN 22R01A0453
R. TEENA SREE 22R01A0454

In partial fulfilment of the requirement for completion of the “Database Management


System Lab” of II- B. Tech II- Semester in ECE(DBMS) towards a record of a Bonafide work
carried out under our guidance and supervision.

Signature of Faculty Signature of HOD


Mrs.B.Annapoorna Dr. K. NiranjanReddy
(Asst. professor CSE AIML) (Head Of Department ECE)
ACKNOWLEDGEMENT

We are extremely grateful to Dr. M. Janga Reddy, Director, Dr.G. Madusudhana Rao
, Principal and Dr.K. Niranjan Reddy, Head Of Department , CMR Institute of Technology for
their during entire duration.
We are extremely thankful to our Data Base Management System Laboratory faculty-in-
charge Mrs.B.Annapoorna ,Electronics and Communication Engineering(DBMS) department,
CMR Institute of Technology for her constant guidance, encouragement and moral support
throughout the project.
We express our thanks all staff members and friends for all the help and coordination extended
inbringing out this micro project successfully in time.
Finally, we are very much thankful to our parents and relatives who guided directly or
indirectly for the successful completion of the project.

P. SANDEEP REDDY 22R01A0451


P. RUPA SRI 22R01A0452
P. SAI CHARAN 22R01A0453
R. TEENA SREE 22R01A0454
CONTENTS

Particulars Page No.


1.Introduction 5

2.Advantages of RDBM 9

3. SQL QUERY 10

4.Conclusion 12

5.References 12
INTRODUCTION:

Database Management Systems:


● A database management system (or DBMS) is essentially nothing more than a
computerized data-keeping system.
● Users of the system are given facilities to perform several kinds of operations on
such a system for either manipulation of the data in the database or the management
of the database structure itself.
● There are several types of databases that can be used on a mainframe to exploit
z/OS®: inverted list, hierarchic, network, or relational.

Relational Database Management Systems (RDBMS):


● All modern database management systems like SQL, MS SQL Server, IBM DB2,
ORACLE, My-SQL and Microsoft Access are based on RDBMS.
● It is called Relational Data Base Management System (RDBMS) because it is based
on a relational model introduced by E.F. Codd.
● Relational database is most used database. It contains a number of tables, and each
table has its own primary key.

SQL:

● SQL stands for Structured Query Language. It is used for storing and managing
data in relational database management system (RDBMS).
● It is a standard language for Relational Database System. It enables a user to create,
read, update and delete relational databases and tables.
● All the RDBMS like MySQL, Informix, Oracle, MS Access and SQL Server use
SQL as their standard database language.
● SQL allows users to query the database in a number of ways, using English-like
statements.

SQL follows the following rules:


● Structure query language is not case sensitive. Generally, keywords of SQL are
written in uppercase.
● Statements of SQL are dependent on text lines. We can use a single SQL statement
on one or multiple text line.
● Using the SQL statements, you can perform most of the actions in a database.
● SQL depends on tuple relational calculus and relational algebra.
SQL Commands:
● SQL commands are instructions. It is used to communicate with the database. It is
also used to perform specific tasks, functions, and queries of data.
● SQL can perform various tasks like create a table, add data to tables, drop the table,
modify the table, set permission for users.

Types of SQL Commands:


There are five types of SQL commands: DDL, DML, DCL, TCL, and DQL.

Data Definition Language (DDL):


● DDL changes the structure of the table like creating a table, deleting a table, altering
a table, etc.
● All the command of DDL is auto-committed that means it permanently saves all
the changes in the database.
Here are some commands that come under DDL:
● CREATE
● ALTER
● DROP
● TRUNCATE

a. DROP: It is used to delete both the structure and record stored in the table. Syntax:
DROP TABLE table_name;

b. ALTER: It is used to alter the structure of the database. This change could be either
to modify the characteristics of an existing attribute or probably to add a new attribute.
Syntax: ALTER TABLE table_name ADD column_name COLUMN-definition;

c. TRUNCATE: It is used to delete all the rows from the table and free the space
containing the table.
Syntax: TRUNCATE TABLE table_name;

Data Manipulation Language:


● DML commands are used to modify the database. It is responsible for all form of
changes in the database.
● The command of DML is not auto-committed that means it can't permanently
save all the changes in the database. They can be rollback.
● INSERT
● UPDATE
● DELETE
a. INSERT: The INSERT statement is a SQL query. It is used to insert data into the row
of a table.
Syntax: INSERT INTO TABLE_NAME (col1, col2, col3. col N) VALUES (value1,
value2, value3, valueN);

b. UPDATE: This command is used to update or modify the value of a column in the table.
Syntax: UPDATE table_name SET [column_name1= value1,...column_nameN =
valueN] [WHERE CONDITION]

c. DELETE: It is used to remove one or more row from a table. Syntax: DELETE FROM
table_name [WHERE condition];

Data Control Language:


DCL commands are used to grant and take back authority from any database user. Here are
some commands that come under DCL:
● Grant
● Revoke

a.Grant: It is used to give user access privileges to a database.


Syntax: GRANT SELECT, UPDATE ON MY_TABLE TO SOME_USER,
ANOTHER_USER;
b.Revoke: It is used to take back permissions from the user.
Syntax: REVOKE SELECT, UPDATE ON MY_TABLE FROM USER1, USER2;
Transaction Control Language:
TCL commands can only use with DML commands like INSERT, DELETE and UPDATE
only.
These operations are automatically committed in the database that's why they cannot be
used while creating tables or dropping them.
Here are some commands that come under TCL:
• COMMIT
• ROLLBACK • SAVEPOINT
a.Commit: Commit command is used to save all the transactions to the database.
Syntax: COMMIT;

b.Rollback: Rollback command is used to undo transactions that have not already been
saved to the database.
Syntax: ROLLBACK;

c.SAVEPOINT: It is used to roll the transaction back to a certain point without rolling
back
the entire transaction.
Syntax: SAVEPOINT SAVEPOINT_NAME;

Data Query Language:


DQL is used to fetch the data from the database. It uses only one command:
•SELECT
a. SELECT: This is the same as the projection operation of relational algebra. It is used
to select the attribute based on the condition described by WHERE clause. Syntax:
SELECT expressions FROM TABLES WHERE conditions;

Relational Algebra
Relational algebra is a procedural query language, which takes instances of relations as
input and yields instances of relations as output. It uses operators to perform queries. An
operator can be either unary or binary. They accept relations as their input and yield
relations as their output. Relational algebra is performed recursively on a relation and
intermediate results are also considered relations.

REQUIREMENTS:
Hardware Requirements:

• Intel(R) Core (TM) i7-1005G1 CPU @ 1.20GHz 1.19 GHz


• 4 GB OF RAM

Software Requirements:

• Windows 11 Home Single Language


• Oracle Database 11g Express Edition

ADVANTAGES OF RDMS
The pros of a relational database management system offer a methodical view of data,
which helps businesses improve their decision-making processes by enhancing different
areas.

Various other advantages of a relational database model:

● Enhanced Data Security

● Retain Data Consistency

● Better Flexibility and Scalability

● Easy Maintenance

● Reduced Risk of Errors

The tables can be connected in different ways, such as:

● A record in one table could be related to another record in a different table (1:1
relationship)
● A record in one table may be related to several records in other tables (1:M
relationship)
● Several table records could be linked to multiple records in a different table (M:
N relationship)

However, before tables are created, a relational database management system must ensure

that:

● Each table has a unique primary key, which has no null values.

● The foreign key, which is used to relate to 2 tables, is preserved in one table and
refers to the primary key of another table.
● No column has a null value (empty cell).
SQL Query---
1.create table University1(sno int(10),roll no varchar(20),name
varchar(20),sub varchar(20),day_date date ,section varchar(10));

2.Course (courseno, title, syllabus, credits)


SQL> Create table Course (courseno varchar2 (10) primary key, title char
(10), syllabus char(10), credits number(10));

OUTPUT:

courseno title syllabus credits

3. faculty (Faculty-id, name, dept, title)


SQL> Create table Faculty (faculty_id number (7) primary key, name char (10), dept char
(7), title char (10));
OUTPUT:

faculty_id name dept title

4. Enrols (student-id, course no, secno, semester, year, grade)


SQL> Create table Enrolls (student_id number (10), courseno varchar2 (10), secno char
(10), semester varchar2(10), year number (5), grade varchar2(5), foreign key(courseno)
references Course(course no), foreign key(student_id) references student(student_id),
foreign key (secno) references
Course-offering(secno), foreign key(semester) references
Course-offering(semester));

OUTPUT:

student_id courseno secno semester year grade


CONCLUSION
Relational databases store data in tables. Tables can grow large and have a multitude of
columns and records. Relational database management systems (RDBMSs) use SQL (and
variants of SQL) to manage the data in these large tables. The RDBMS you use is your
choice and depends on the complexity of your application.

You learned that the structure of a relational database is based on the relational model. You
also learned that the largest structure in a relational database is a table, which contains
fields, records, and a primary key. You discovered that using the primary-key field to link
tables allows data to be accessed in a relational database.

Finally, you learned that Structured Query Language (SQL) is the programming language
used to create relational databases, and that a relational database management system
(RDBMS) is a software package used to manage relational databases.

REFERENCES

● https://www.oracle.com/in/database/what-is-a-relation al-database/
● https://www.ionos.com/digitalguide/hosting/technical
matters/relational-databases/

You might also like