Sei sulla pagina 1di 7

1

RDBMS a Introduction
Database Management System
A Database Management System (DBMS) is a computer program for
managing a permanent, self-descriptive repository of data. This repository
of data is called a database and is store in one or more files. There are
many reasons why you could use a DBMS:
Crash recovery; The database is protected from hardware crashes,
disk media failures, and some user errors
Sharing between users; Multiple users can access the database at
the same time
Sharing between applications; Multiple application programs can
read and write data to the same database
Security; Data can be protected against unauthorized read and write
access
Integrity; You can specify rules that data must satisfy. A DBMS can
control the quality of its data over and above facilities that that may
be provided by application programs
Extensibility; Data may be added to the database without disrupting
existing programs. Data can be reorganized for faster performance.
Data distribution; The database may be partitioned across various
sites, organizations, and hardware platforms
An entire branch of computer science is devoted to studying DBMS issues
and answering questions such as:
What paradigm is most conducive it represents database structure?
What kind of language provides the most natural interaction?
How can a database capture more of the true meaning of its data?
How should a database be organized for maximum performance and
flexibility?
Several DBMS paradigms are available: hierarchical, network, relational,
and object-oriented. Hierarchical and network DBMS bring the conceptual
DBMS close to underlying physical data structures. Thus they are efficient
but difficult to use and fading in the marketplace. Relational DBMS
dominate todays marketplace. Relational DBMS present the database at a
higher level of abstraction than hierarchies and networks and are easy to
use. Relational DBMS implementations are improving in performance as
they mature and use smarter optimization techniques. Object-oriented
may be the wave to the future

Relational Database Management System


A Relational Database Management System (RDBMS) provides a
comprehensive and integrated approach to information management.
A relational model provides the basis for a relational database. A relational
model has three aspects:
Structures
Operations
Integrity rules
Structures consist of a collection of objects or relations that store data. An
example of relation is a table. You can store information in a table and use
the table to retrieve and modify data.
Operations are used to manipulate data and structures in a database.
When using operations. You must adhere to a predefined set of integrity
rules.
Integrity rules are laws that govern the operations allowed on data in a
database. This ensures data accuracy and consistency.
Relational database components include:
Table
Row
Column
Field
Primary key
Foreign key

Figure 1-1. Relational database components


A Table is a basic storage structure of an RDBMS and consists of columns
and rows. A table represents an entity. For example, the S_DEPT table
stores information about the departments of an organization.
A Row is a combination of column values in a table and is identified by a
primary key. Rows are also known as records. For example, a row in the
table S_DEPT contains information about one department.
A Column is a collection of one type of data in a table. Columns represent
the attributes of an object. Each column has a column name and contains
values that are bound by the same type and size. For example, a column
in the table S_DEPT specifies the names of the departments in the
organization.
A Field is an intersection of a row and a column. A field contains one data
value. If there is no data in the field, the field is said to contain a NULL
value.

Figure 1-2. Table, Row, Column & Field


A Primary key is a column or a combination of columns that is used to
uniquely identify each row in a table. For example, the column containing
department numbers in the S_DEPT table is created as a primary key and
therefore every department number is different. A primary key must
contain a value. It cannot contain a NULL value.
A Foreign key is a column or set of columns that refers to a primary key in
the same table or another table. You use foreign keys to establish
principle connections between, or within, tables. A foreign key must either
match a primary key or else be NULL. Rows are connected logically when
required. The logical connections are based upon conditions that define a
relationship between corresponding values, typically between a primary
key and a matching foreign key. This relational method of linking provides
great flexibility as it is independent of physical links between records.

Figure 1-3. Primary & Foreign key

RDBMS Properties
An RDBMS is easily accessible. You execute commands in the Structured
Query Language (SQL) to manipulate data. SQL is the international
Standards Organization (ISO) standard language for interacting with a
RDBMS.
An RDBMS provides full data independence. The organization of the data
is independent of the applications that use it. You do not need to specify
the access routes to tables or know how data is physically arranged in a
database.
A relational database is a collection of individual, named objects. The basic
unit of data storage in a relational database is called a table. A table
consists of rows and columns used to store values. For access purpose,
the order of rows and columns is insignificant. You can control the access
order as required.

Figure 1-4. SQL & Database


When querying the database, you use conditional operations such as joins
and restrictions. A join combines data from separate database rows. A
restriction limits the specific rows returned by a query.

Figure 1-5. Conditional operations


An RDBMS enables data sharing between users. At the same time, you
can ensure consistency of data across multiple tables by using integrity
constraints. An RDBMS uses various types of data integrity constraints.
These types include entity, column, referential and user-defined
constraints.

The constraint, entity, ensures uniqueness of rows, and the constraint


column ensures consistency of the type of data within a column. The other
type, referential, ensures validity of foreign keys, and user-defined
constraints are used to enforce specific business rules.
An RDBMS minimizes the redundancy of data. This means that similar
data is not repeated in multiple tables.