A database is a structured collection of interrelated data
that is stored in a physical location with a specific name. A database can be a
Flat File Database, Relational Database, Distributed Databases etc. A Database
Management System is a system that helps us perform various operations on the
data that is stored in a database.
Databases are designed to offer an organized mechanism for
storing, managing, and retrieving information. A database schema defines the
objects that are represented in the database and the structural description of
the facts that are held in that database.
A database model describes the database schema as per the stated
requirements. These models are also called data models. There are three types
of models. These are:
Relational Database Management System
A Relational Database Management System facilitates the
organization, storage, access, security, and integrity of data and eliminates
data redundancy. It stores the data in a set of tables each of which contains
a unique identifier. Typical examples of RDBMS software include Oracle,
Microsoft SQL Server, Sybase, PostgreSQL, MySQL, etc.
Normalization may be defined as the process of designing the
structure of the database in a way which will reduce redundancy and facilitate
easy data manipulation and better performance. It is a process that breaks down
data into record groups for faster and more efficient data processing. The most
common forms of normalization applied to databases are called the normal forms.
Database normalization is available in the following four levels:
First Normal Form
Second Normal Form
Third Normal Form and
Boyce Codd Normal Form
A tuple is a collection of one or more attributes. It is a
row of information in a database table that is constructed over a given
database schema. It should be noted that a tuple usually represents some object
and its associated data. Further, a relation is defined as a set of n-tuples.
A stored procedure is a group of SQL statements that are
stored in the database using a name such that these statements can be executed
as a group by the database server. It is a group of executable code associated
with a database which often facilitates common database operations. The use of
stored procedures helps reduce network traffic, simplifies data management, and
facilitates data security.
In a relational database an index is a copy of part of a
table that is used to speed up data retrieval in a database.
Database triggers are stored procedures that are implicitly
executed whenever an INSERT, UPDATE, or DELETE statement is issued against the
associated table. It is used to maintain referential integrity in the database
and may also be used to execute a stored procedure.
A trigger has basically the following three parts:
A triggering event or statement
A trigger restriction
A trigger action
Database triggers are of the following types:
Row and Statement trigger
Before and After trigger
Instead Of trigger
A view is a logical table that contains the result set of a query.
Unlike an ordinary table in the database, a view is a virtual table and its
contents change as and when the data in the database table changes.
A constraint is used to restrict the type of data that can
be stored in a database table. Hence, they facilitate implementing business
rules into the database. A primary key constraint as an example, does not allow
any row to contain a duplicate value.
A relation is a link between two tables and is defined as a
set of tuples all of which have the same attributes. The following are the
types of relations that can exist:
A database table is a collection of rows and columns which describe
the necessary structure to store data pertaining to a specific entity.
A field is an attribute pertaining to an entity, and it is
organized as a column in a database table.
A primary key is responsible for uniquely identifying a
particular record belonging to a specific entity. It is the unique identifier
for each row of a database table.
A unique key is an attribute which is unique for that column
of the table. A unique key unlike a primary key may or may not be null. Note
that a primary key or candidate key should always be a unique key, but the
reverse is not always true.
A candidate key is a unique identifier that enforces the
rule that no tuple will be duplicated. A Composite key is composed of a number
of attributes that together maintain the uniqueness.
A foreign key is a reference to another key in a different
table and is used to declare referential integrity constraints. These are
actually integrity constraints which enforce that the principle "value of
the attribute set is drawn from a candidate key in another relation."
A transaction is a unit of statements that are guaranteed
either to be executed by the database server in whole or aborted altogether. A
transaction abides by the ACID (Atomicity, Consistency, Isolation and
Replication is the process of synchronizing databases to
improve reliability, fault-tolerance, and database performance.
Database clustering is one way of achieving higher
availability of a database. It is focused on moving the database execution
environment to another server in the cluster to address database server failure
A distributed database is a collection of one or more
logically interrelated databases that are distributed i.e., they are spread across
Object Oriented Databases
Object Oriented databases organize the attributes "of a
given object into a unit or template that can be stored or retrieved by its
natural name". Object Database Management Systems are designed to work
with Object Oriented Programming languages like C++, Java, C#, etc.
Data Description Language (DDL)
This is a language that is used to define data and their
relationships to other data in a database.
Data Manipulation Language (DML)
This is a 4 GL programming language that defines how to
manipulate the data that is stored in the database.