0% found this document useful (0 votes)
3 views28 pages

DMS MP Report

The micro project focuses on developing a Railway Ticket Booking System using a database management system to enhance students' understanding of database design, SQL operations, and security measures. It outlines the methodology followed, including schema development, DDL, DML, and DCL commands, and emphasizes the practical application of these concepts in real-world scenarios. The project aims to provide hands-on experience and skills in managing and manipulating data effectively.

Uploaded by

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

DMS MP Report

The micro project focuses on developing a Railway Ticket Booking System using a database management system to enhance students' understanding of database design, SQL operations, and security measures. It outlines the methodology followed, including schema development, DDL, DML, and DCL commands, and emphasizes the practical application of these concepts in real-world scenarios. The project aims to provide hands-on experience and skills in managing and manipulating data effectively.

Uploaded by

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

MICROPROJECT REPORT

Database Management System (313302)

RAILWAY TICKET BOOKING SYSTEM


1.0 RATIONALE
The micro project on "Railway Ticket Booking System" is designed to provide hands-on experience in
developing a database management system (DBMS) for real-world applications. The railway ticket booking
system is a critical application that requires robust data management, ensuring that passengers can seamlessly
book tickets, manage bookings, and retrieve necessary information. This micro project helps in understanding
key database concepts like data organization, relational integrity, and SQL operations in a practical context.

2.0 AIMS AND BENEFITS OF THE MICROPROJECT

The primary aim of this micro project is to design and implement a functional database system that manages
railway ticket bookings efficiently. The project aims to develop students' understanding of:

 Database design and normalization processes.


 SQL operations including DDL, DML, DCL, and PL/SQL.
 Schema development.
 Database security measures such as user access control.

Benefits:

 Enhanced understanding of how database systems function in real-world applications.


 Practical exposure to using SQL and PL/SQL to manage and manipulate data.
 Gaining skills in implementing security protocols in databases.

3.0 COURSE OUTCOMES ADDRESSES


CO1 - Explain concept of database management system.
CO2 - Design the database for given problem.
CO3 - Manage database using SQL.
CO4 - Implement PL/SQL codes for given application.
CO5 - Apply security and backup methods on database.

4.0 ACTUAL METHODOLOGY FOLLOWED

1. Entities of database and their attributes along with data types were identified
2. Development of schema diagram based on entities and attributes.
3. Creation of a relational database by creating tables with minimum 5 records.
4. DDL commands like alter, rename, truncate and drop on a single table was executed
5. Enforcement of Parent-Child Relationship (Foreign Key) on two tables from the database.
6. DML commands like select, insert, update, delete was performed on a single table.
7. Aggregate functions and JOIN Clause were implemented on the table
8. Advanced SQL (VIEW) & PL/SQL (Cursor) were implemented respectively.
9. DCL commands like grant and revoke was successfully executed.
5.0 Actual resources used:
Sr. no Name of resources / Specifications Quantity
material
1. Computer System Windows 10, 4GB RAM 1
2. MySQL Software Database 1
Management Software
3. Oracle 10g Express Version 8.0 1
Edition

6.0 Output of the Micro project :

1. Entity of database and their attributes along with their identified datatypes:
 An entity can be a real-world object, either animate or inanimate, that can be easily identifiable.
 Entities are represented by means of their properties, called attributes.

2. Schema Structure:

Entities Attributes
Passenger info  PID
 P_name
 P_gender
 P_age
 P_addr
 P_contact
Bill  BID
 B_date
 Total
 PID
 Ticket_number
Ticket info  Ticket_number
 Ticket_type
 Ticket_price
 Train_number
Train info  Train_number
 T_name
 D_location
 D_time
 D_date
 A_location
Route info  RID
 R_name
 No_of_stops

3. Schema Diagram:
4. DDL:

 DDL stands for Data Definition Language.


 It used for describing structures or patterns and its relationship in a database.

1) Create-
 This command is used to create the database or its objects (like table, index, function, views, store
procedure and triggers.

2) Alter-
 This is used to alter the structure of the database.
3) Rename-
 This is used to rename an object existing in the database.

5. DML:

 DML stands for Data Manipulation Language.


 It is used to manipulate the data/content present in the table within the database.

1) Select-

 It is used to retrieve data from the database.


 Also it can be used with a where clause.
2) Insert-
 It is used to add data into a table.

3) Update-
 It is used to modify existing data in a table.

6. DCL:

 DCL stands for Data Control Language.


 It is used to enforce database security in a multiple user database environment.
1) Grant-
 It is used to give access or privilege to a specific database user.
2) Revoke-
 It is used to take back the access or privilege given to a specific database user.
7. TCL:

 TCL stands for Transaction Control Language.


 It can be grouped into a logical transaction and used to run the changes made by the DML commands in
the database.

1) Commit-

 It ends the current transaction and makes permanent changes to transaction.

2)Rollback-

 It stores the database to last commited state.

3)Savepoint-

 It marks and saves the current point of transaction.


8. Operators:

 An SQL operator is a reserved word or a character used primarily in an SQL statement’s WHERE clause
to perform operation(s) such as comparisons and arithmetic operations.

1) Arithmetic Operators-

a. Additon (+) :-
 Adds value on either side of the operator.

b. Subtraction (-) :-

 Subtracts right hand operand from left hand operand.

c. Multiplication (*) :-

 Multiplies values on either side of the operator.


d. Division (/) :-
 Divides left hand operand by right hand operand.

e. Modulo (%) :-
 Calculates the remainder of the division of one number by another.

2) Word Comparison Operators-

a. IN :-

 True if the operator is equal to one of the list of expression.

b. NOT IN :-
 True if the operator is not equal to one of the list of expression.

c. ALL :-

 True if all the subquery values meet the condition.

d. BETWEEN :-

 True if the operand is within the range of comparisons.

e. NOT BETWEEN :-

 True if the operand is not within the range of comparisons.

f. LIKE :-
 True if the operand matches a pattern using % and _

g. NOT LIKE :-

 True if the operand not matches a pattern using % and _

h. IS NULL ;-

 Used to compare a value with NULL value.

3) Logical Operators-

a. AND :-

 True if all the conditions separated by AND is true.

b. OR :-
 True if any of the conditions separated by OR is true.

c. NOT :-

 Displays record if the condition is NOT true.

4) Relational Operators-

a. Equal to (=) :-

 Checks if the value of two operands are equal or not, if yes then condition becomes true.

b. Not Equal to (!=) :-

 Checks if the value of two operands are equal or not, if values are not equal then condition becomes
true.

c. Greater than Equal to (>=_) :-


 Checks if the value of left operand is greater than or equal to the value of right operand, if yes then
condition becomes true.

d. Less than Equal to (<=) :-

 Checks if the value of left operand is less than or equal to the value of right operand, if yes then
condition becomes true.

5) Set Operators-

a. UNION :-

 This operator results from both queries after eliminating duplications.


 It is equivalent to OR.

b. UNION ALL :-
 All rows selected by either query including all duplications.

c. INTERSECT :-

 Only common rows selected by both query equivalent to AND.

d. MINUS :-

 All rows returned by first query that are not present in the second query.

9. Functions:
1) String Functions-

a. LOWER() :-

 This function is used to convert the uppercase string into lowercase.

b. UPPER() :-

 This function is used to convert the lowercase string into uppercase.

c. Length(char) :-

 It returns length of the character string.

d. ASCII(char) :-

 It returns a decimal representation of a character.

e. SUBSTR(char, m, n) :-
 It returns a portion of character beginning at character m and n character long.

f. REPLACE(char, search string , replace string) :-


 It returns character string each occurances of search string with replaced string.

g. LPAD(char1, length, char2) :-


 It returns character1 with left padding by given sequence of characters in character2.

h. RPAD(char1, length, char2) :-

 It returns character1 with rigth padding by given sequence of characters in character2.

g. CONCAT(char1, char2) :-
 Char1 is concatenated to char2.
 It merges over two or more string values.

2) Arithmetic Functions-

a. ABS() :-

 It returns the absolute value of a number passed as argument.

b. CEIL() :-

 It will round up any positive or negative decimal value.

c. FLOOR() :-

 It will round down any positive or negative decimal value.

d. POWER() :-
 It returns power of any number.

e. MOD() :-
 It returns remainder of first number divided by second number passed as parameter.

f. SQRT() :-

 It returns square root of a number.

g. ROUND() :-

 It rounds off the value of a number.

h. TRUNC() :-
 It truncates the value of a number by n places.

3) Aggregate Functions-

a. AVG() :-

 It calculates average value of a column of numeric type.

b. COUNT() :-

 It returns number of rows a table satisfying criteria in the where caluse.

c. MAX() :-

 It finds the maximum or higher value of a particular column.

d. MIN() :-
 It finds the minimum or higher value of a particular column.

e. SUM() :-
 It returns sum of all numeric values in a specific column.

10. Clauses:

1) where –

 It is used to mention the condition in a select query.

2) group by-

 It is used to divide the rows into smaller groups which is based on certain condition.

3) having-
 It is used with group by clause and imposes condition on group by clause which further filters the group
created by group by clause.

4) Order by-
 This clause sorts or orders according to values present in column.

11. JOIN:

 Join works on two or more tables if they have at least one common field and have a relationship between
them.

1) Equijoin-

 It is a type of join that combines tables based on matching values in specified columns.

2) Non Equijoin-
 It performs a join using comparison operator other than equal to like >,<,>=,<= with condition.

3) Natural join-

 It joins two tables based on same attribute names and datatype.

4) Left join-

 It joins all rows of a table on left side of join and matching rows for table on right side of the join.

5) Right join-

 It joins all rows of a table on right side of join and matching rows for table on left side of the join.
6) Inner join-

 It selects records that have matching values in both the tables as long as the condition is satisfied.

7) Cross join-

 When each row of first table is combined with each row from the second table it is known as Cartesian
product of two tables and also we call it as cross join.

8) Self join-
 In self join a table is join to itself i.e. each row of table is joined with itself and all other rows depending
on some conditions.
 In other words it is a join between two copies of same table.

12. VIEW:

 It is a logical representation of subsets of data from one or more tables.


 A view takes the output of a query and treats it as a table.
 A view can be called as stored query or a virtual table.
 All operations performed on a view actually affect the base table of the view.

13. INDEX:

 Indexes are optional structures associated with tables and clusters that allow SQL statements to execute
more quickly against a table.
 They are logically and physically independent of the data in the associated table.
 Being independent structures, they require storage space.
 We can create or drop an index without affecting the base tables, database applications, or other indexes.
 Types of Indexes are:-

1. Simple Index-

 A simple index is one that is created based on only one table column.

2. Composite Index-

 A composite index is an index on two or more columns of a table.

3. Unique Index-

 A unique index does not allow any duplicate values to be inserted into the table.
14. CURSORS:

 PL/SQL cursor is a pointer that points to the results set of the SQL query against database table.
 Cursor is a work area in PL/SQL which is used by SQL server used to store the result of a query.
 There are two kinds of cursors:

1) Implicit Cursor –

 These are created by default when DML statements like INSERT, UPDATE and DELETE
statements are executed.
 They are also created when a SELECT statement that returns just one row is executed.

2) Explicit Cursor-
 If select statements in PL/SQL returns multiple rows then we have to create an explicit cursor.
 The set of rows returned by a multi-row query is called the result set.

15. EXCEPTION HANDLING:

 An exception is an error situation, which arises during program execution.


 When an error occurs exception is raised, normal execution is stopped and control transfers to
exception-handling part.
 It is of two types:

1)Predefined Exception-

 System exceptions are automatically raised by Oracle, when a program violates a RDBMS
rule.
 There are some system exceptions which are raised frequently, so they are pre-defined and
given a name in Oracle which are known as Named System Exceptions.

2) User Defined Exception-


 A user-defined exception has to be defined by the programmer.
 They are declared in the declaration section with their type as exception.

16. PL/SQL:

 PL/SQL is one of the core technologies at Oracle and is essential to leveraging the full potential of
Oracle Database.
 It combines the relational data access capabilities of the Structured Query Language with a flexible
embedded procedural language.
7.0 Skills developed
 Proficiency in SQL and PL/SQL operations.
 Ability to design relational databases with integrity constraints.
 Problem-solving skills while implementing complex queries.
 Familiarity with database security practices and permission management.
8.0 Application of Micro project
The Railway Ticket Booking System can be applied in real-world railway networks where efficient data management
is necessary for ticketing services. The system can be further scaled and customized to meet the demands of larger
railway networks or integrated with other transportation services.

You might also like