Dbms Documentation
Dbms Documentation
Submitted by
Guided by,
MRS.T.PRABHA KUMARI M.Sc.,M.Phil.,(Ph.D)
Assistant Professor, Department of BSC CS(AI),
PSGR Krishnammal College for Women,
Coimbatore – 641 004.
This is to certify that this DBMS project entitled “ONLINE BANKING SYSTEM” Submitted
to PSGR Krishnammal College for Women, Coimbatore in partial fulfillment of the requirement
for the award of the Degree of Bachelor of Computer Science is a record of original work done
by NAVYA SURESH (23BAI030),NAVEENA SHREE A(23BAI029),MONISHA
M(23BAI028) during her period of study in Department of BSC CS(AI), PSGR Krishnammal
College for Women, Coimbatore under my supervision and guidance and her DBMS Project has
not formed the basis for the award of any Degree/ Diploma/ Associate/ Fellowship or similar title
to any candidate of any university.
Forwarded by
I hereby declare that the DBMS project entitled “ONLINE BANKING SYSTEM” submitted to
PSGR Krishnammal College for Women, Coimbatore for the award of the Degree of Bachelor
of Computer Science is a record of original work done by NAVYA SURESH (23BAI030)
under the guidance of MRS.T.PRABHA KUMARI Assistant Professor, Department of BSC
CS(AI), PSGR Krishnammal College for Women, Coimbatore and this project have not found
the basis for the award of any Degree/Diploma or similar title to any candidate of any university.
Endorsed by
III ER DIAGRAM
3.1 Description of ER diagram
3.2 Model of ER Diagram
3.3 Notations of ER Diagram
3.4 Primary Key Definition
3.5 Foreign Key Definition
3.6 Composite Key Definition
3.7Composite attributes
3.8 Simple attributes
3.9 Single valued attributes
3.10Multi valued attributes
3.11 Derived attributes
3.12Stored attributes
3.13 Complex attributes
3.14 Null value attributes
3.15 Key attributes
3.16 Value set of attributes
IV DATA DEFINITION LANGUAGE
4.1.Create
4.2.Alter
4.3. Drop
4.4. Truncate
XI SUB QUERIES
11.1. Inserting Values In a Table
11.2. Select, Displaying Values In a Table
11.3. Using Where Clause
11.4. Aggregate Functions With Select
11.5. Deleting A Row
XII VB.NET
12.1. Form Design
12.2. Connectivity
12.3. Result
XIV BIBLIOGRAPHY
13.1 Book References
13.2 Website References
CHAPTER 1
CASE STUDY
1.1. ABSTRACT
Oracle Database provides a robust and scalable environment for data storage and
management, leveraging advanced features for complex queries and data manipulation.
The integration of Vb.Net allows for the creation of an intuitive graphical user interface,
enhancing user interaction and experience.
Key features of the system include stringent security measures, such as data encryption
and user authentication, ensuring the protection of sensitive financial information.
Additionally, the project emphasizes best practices in database normalization and
transaction management to maintain data integrity. Overall, this Online Banking System
serves as a practical application of Oracle and Vb.Net, demonstrating their effectiveness
in delivering a reliable and user-friendly banking solution.
Many-to-One (N:1): Multiple records in Table A can relate to a single record in Table B.
Example: Many students can be enrolled in one class.
Many-to-Many (M:N): Records in Table A can relate to multiple records in Table B and
vice versa.
Example: Students and courses where each student can enroll in multiple courses, and
each course can have multiple students. This typically requires a junction table to
manage the relationships.
Relationships are defined by the cardinality and the type of relationship between two
entities. They can be used to enforce data integrity and ensure that data is consistent
across multiple tables.
The Online Banking System is designed to provide a secure platform for users to
manage their banking needs remotely. This system leverages modern technology to
offer a wide range of banking services through an intuitive web interface and a robust
backend powered by a relational database.
An Entity Relationship (ER) Diagram is a type of flowchart that illustrates how entities or
concepts relate to each other within a system. This model is used to define the data elements and
relationship for a specified system. An ER Diagram explains the logical structure and the flow of
information within a data model. An entity-relationship diagram highlights entities,attributes,and
relationships through predefined symbols for effective visualization of the architecture.
ENTITIES: Article, Author, Category, and comments. Each entity has its own set of
attributes. For example, the Article entity has attributes such as Title, Content, and Publish Date. The
Author entity has attributes such as Name, Email, and Bio.
The relationships between entities are represented by lines connecting the entities. For
example, the relationship between Article and Author is represented by a line connecting the two
entities. This relationship indicates that each article is written by one author, and each author can write
multiple articles.
Similarly, the relationship between Article and Category is represented by a line connecting
the two entities. This relationship indicates that each article can belong to one category, and each
category can have multiple articles.
3.2 NOTATIONS OF ER DIAGRAM
3.3 PRIMARY KEY DEFINITION
A primary key is an attribute or set of attributes that uniquely identifies each record in a
table. Primary keys are used to enforce data integrity and ensure that each record in a table is unique.
They can be composed of one or more attributes, and they must be unique for each record in the table.
Primary keys are used to link tables together and create relationships between them. They are an
essential part of any database management system.
1. User UserID
2. Article ArticleID
3. Category CategoryID
4. Comment CommentID
5. Advertisement AdvertisementID
6. Subscription SubscriptionID
3.4 FOREIGN KEY DEFINITION
A foreign key is a key that links two tables together. It is a field in one table that refers to
the primary key in another table. The foreign key establishes a relationship between the two tables and
ensures referential integrity.
Foreign keys are used to enforce data integrity and ensure that data is consistent across multiple tables.
They can be used to create relationships between tables, enforce referential integrity, and improve query
performance.
1. Comments ArticleID
UserID
2. Subscription SubscriberID
A composite key is a key that consists of two or more attributes that uniquely identify each
record in a table. It is also known as a compound key. Composite keys are used when a single attribute
cannot uniquely identify each record in a table. Composite keys can be used to enforce data integrity and
ensure that each record in a table is unique. They can also be used to link tables together and create
relationships between them.
Composite attributes are attributes that can be broken down into smaller sub-attributes.
They are also known as complex attributes. Composite attributes are used to represent complex data
types that cannot be represented by a single attribute.
Composite attributes can be used to improve data organization and reduce redundancy in a database
management system. They can also help improve query performance by allowing for more efficient
indexing and searching of data.
3.6 SINGLE VALUED ATTRIBUTES
Single-valued attributes are attributes that can have only one value for a single record. They
are also known as simple attributes. Single-valued attributes are the most common type of attribute in a
database management system. They are used to represent simple data types that can be represented by a
single attribute.
Multi-valued attributes accept one or more values that are separated with spaces
and enclosed in braces. Multi-valued attributes are attributes that can have multiple values for
a single record. They are also known as repeating groups. Multi-valued attributes can be
problematic when designing a database management system. They can lead to data redundancy
and inconsistency. To avoid these issues, it is recommended to use a separate table to store the
multi-valued attribute and link it to the original table using a foreign key.
Those attributes, which can be formed by the nesting of composite and multi-valued
attributes, are called “Complex Attributes" .Complex attributes are attributes that can be
broken down into smaller sub-attributes. They are also known as composite attributes.
Composite attributes are used to represent complex data types that cannot be represented by a
single attribute. Composite attributes can be used to improve data organization and reduce
redundancy in a database management system. They can also help improve query performance
by allowing for more efficient indexing and searching of data.
Null value attributes are attributes that do not have a value or contain no data. They are
used to represent missing or unknown data. Null values can be assigned to any attribute in a table,
including primary keys. However, it is generally not recommended to assign null values to primary keys
as they are used to uniquely identify each record in a table . A null value is a special indicator that
represents the absence of a value.
Key attributes are the attributes that uniquely identify each record in a table. They are also
known as primary keys. Primary keys are used to enforce data integrity and ensure that each record in a
table is unique. They can be composed of one or more attributes, and they must be unique for each
record in the table. Primary keys are used to link tables together and create relationships between them.
They are an essential part of any database management system .
Attributes are the characteristics that describe an entity. They are also known as
fields or columns. Attributes can be of different types such as single-valued, multi-valued,
composite, stored, and derived attributes.
CHAPTER IV
4.1 CREATE
Create database defines a logical database under the active location root directory. The database
normally consists of a subdirectory of the same name that holds the physical table and index
files. Users can use stogroups to implicitly specify different storage directories for individual
database objects. Create table creates a table by defining its columns and each column's data type
and field length. The command can also be used to create primary and foreign keys for the table.
Alter table adds, removes or alters columns and their data types. It can also enforce referential
and domain integrity by creating or dropping unique, primary key , foreign key and check constraints in
mode. Alter Tablespace changes the specifications of a tablespace within the current location.Alter view
uses an existing view definition at the current server to regenerate a view.Alter sequence changes
sequence attributes at the current server.
4.3 DROP
Drop database does the exact opposite of the create database It deletes a database
defined at a certain location, along with all the objects logically associated with it. It also
deletes the database subdirectory even if it is empty and contains no objects logically associated
with the database.DROP STOGROUP deletes a stogroup by severing the logical connection
between data objects defined using the stogroup and the directory path specified in the deleted
stogroup definition. It doesn't delete the objects associated with the stogroup. As with other
DROP commands, the DROP STOGROUP command should be used sparingly and with
caution.
figure 4.3 : dropping table user
4.4 TRUNCATE
figure
4.4 : to truncate the table article
The rename operator ρ is one of the unary operators in relational algebra and is used to
rename relations in a DBMS.The RENAME TABLE statement can be used to rename a table in
SQL. We use the RENAME keyword followed by the old name of the table followed by the To
keyword followed by the new name of the table.
5.1 SELECT
The SELECT Statement in SQL is used to retrieve or fetch data from a database.
We can fetch either the entire table or according to some specified rules. The data returned
is stored in a result table. This result table is also called the result set.A select query helps
you retrieve only the data that you want, and also helps you combine data from several data
sources.
5.2
INSERT
Insert command is data manipulation commands, which is used to manipulate data by inserting
the information into the tables. This command is used to add records to a table. While inserting a
record using the insert statement, the number of records being entered should match in the columns
of the table.Use the insert command to enter data into a table. Insert one row at a time, or select
several rows from an existing table and insert them all at once.
Update command is a data manipulation command which is used to edit the records
of a table. It may be used to update a single row based on a condition, all rows or sets of
rows based on the condition given by the user.UPDATE statement changes the data of one
or more records in a table. Either all the rows can be updated, or a subset may be chosen
using a condition.
5.3
DELETE
6.1 BEGIN
Begin SQL is the keyword that is used to mark up and specify the beginning of the
transaction or stored procedure or functions or simply the collection of multiple statements inside
the logical block whose body starts from the specification of the BEGIN keyword and stops with
the use of END keyword.
6.2 COMMIT
The COMMIT command is a fundamental transactional command used to save changes made
by a particular transaction in a database management system. It ensures that all changes made
before committing are permanent and cannot be rolled back. The COMMIT command is the
transactional command used to save changes invoked by a transaction. It saves all the transactions
that occurred on the database since the last COMMIT.
6.3 ROLLBACK
The rollback statement undoes part or all of the current transaction. If you omit the to
save_point_name clause, the statement terminates the transaction and rolls back any changes
made by the transaction.If you use the to save_point_name clause, the transaction is not
terminated, and only those changes made after the specified savepoint are rolled back.
Processing resumes with the statement following the rollback statement. A rollback statement
also closes any open cursors.
figure 6.3: rollback
6.4 SAVEPOINT
7.1 GRANT
7.2 REVOKE
The revoke command functions as the opposite of the grant command. It is used to remove
the privileges on user accounts for access to a database object. It revokes permission granted to a
user on a database object and also revokes the access rights assigned to users.
CHAPTER VIII
A unique key is a candidate key. All the candidate keys of a relation can uniquely identify
the records of the relation, but only one of them is used as the primary key of the relation. A
unique key is used to remove the duplicity of values in a table. However, the usage of a primary
key is the same, but there is a difference between both keys. A primary key cannot take a null
value, but a unique key can have one null value as its value.
8.2 PRIMARY KEY
figure 6.2:
primary key for table news
A Primary Key is the minimal set of attributes of a table that has the task to uniquely identify
the rows, or we can say the tuples of the given particular table.A primary key of a relation is one
of the possible candidate keys which the database designer thinks it's primary. It may be selected
for convenience, performance and many other reasons.
A foreign key is the one that is used to link two tables together via the primary key. It means the
columns of one table point to the primary key attribute of the other table. It further means that if
any attribute is set as a primary key attribute will work in another table as a foreign key attribute.
But one should know that a foreign key has nothing to do with the primary key.
figure 8.3: foreign key for table news
The NOT NULL constraint is used to ensure that a given column of a table is never assigned the
null value. Once a NOT NULL constraint has been defined for a particular column, any insert or
update operation that attempts to place a null value in that column will fail.The NOT NULL
constraint enforces a column to not accept NULL values, which means that you cannot insert or
update a record without adding a value to this field.
8.5 CHECK
Check constraint ensures that the data entered by the user for that column is within the range
of values or possible values specified.The CHECK constraint is used to limit the value range
that can be placed in a column. If you define a CHECK constraint on a column it will allow
only certain values for this column. If you define a CHECK constraint on a table it can limit
the values in certain columns based on values in other columns in the row.
CHAPTER XIII
CHAPTER XI
PL/SQL FUNCTIONS
Function can be used as a part of SQL expression. We can use them with select/update/merge
commands. One most important characteristic of a function is that, unlike procedures, it must return
a value
figure 11.1: Multiplication in function
PL/SQL PROCEDURE
A procedure in PL/SQL is nothing but a series of declaration SQL statements which can be stored in the
database catalog. A procedure can be thought of as a function or a method. A news portal management system
implemented in PL/SQL can utilize the COUNT function to efficiently gather critical information.A news
portal management system implemented in PL/SQL can utilize the MAX function.We have created procedures
namely article.PL/SQL procedure could be designed to find maximum salary from the table. Then call the
procedure article.
figure 12.1: Count in procedure
TRIGGERS IN PL/SQL
Trigger is a statement that a system executes automatically when there is any modification
to the database. In a trigger, we first specify when the trigger is to be executed and then the action to
be performed when the trigger executes.
Statement level triggers executes only once for each single transactions.
CURSOR IN PL/SQL
To execute SQL statements a work area is used by the Oracle engine for its internal
processing and storing the information. This work area is private to SQL’s operations. The ‘Cursor’
is the PL/SQL construct that allows the user to name the work area and access the stored
information in it.
IMPLICIT CURSOR
Implicit cursors are automatically created when select statements are executed.
CHAPTER IV
BIBLIOGRAPHY
1. Mischel, W., & Baker, N. (1975). Cognitive transformations of reward objects through
instructions. Journal of Personality and Social Psychology, 31, 254-261.
2. Mischel, W., & Baker, N. (1975). Cognitive transformations of reward objects through
instructions. Journal of Personality and Social Psychology, 31, 254-261.
3. Mischel, W., & Baker, N. (1975). Cognitive transformations of reward objects through
instructions. Journal of Personality and Social Psychology, 31, 254-261.
4. Mischel, W., & Baker, N. (1975). Cognitive transformations of reward objects through
instructions. Journal of Personality and Social Psychology, 31, 254-261.
5. Mischel, W., & Baker, N. (1975). Cognitive transformations of reward objects through
instructions. Journal of Personality and Social Psychology, 31, 254-261.
1. https://www.sourcecodester.com/php/16525/lost-and-found-information-system- using-php-
and-mysql-db-source-code-free-download.html
2. https://www.sourcecodester.com/php/16525/lost-and-found-information-system- using-php-
and-mysql-db-source-code-free-download.html
3. https://www.sourcecodester.com/php/16525/lost-and-found-information-system- using-php-
and-mysql-db-source-code-free-download.html
4. https://www.sourcecodester.com/php/16525/lost-and-found-information-system- using-php-
and-mysql-db-source-code-free-download.html
5. https://www.sourcecodester.com/php/16525/lost-and-found-information-system- using-php-
and-mysql-db-source-code-free-download.html