A database is an organized collection of data.
Database handlers create database in such a way that only one set of software program provide access of data to all the users.
The main purpose of database is to operate large amount of information by storing, retrieving and managing.
There are many dynamic websites on the world wide web now a days which are handled through databases. For example, a model to checks the availability of rooms in a hotel. It is an example of dynamic website that uses database.
There are many database available like MySQL, Sybase, Oracle, Mango DB, Informix, Postgre, SQL Server etc.
SQL or Structured Query Language is used to perform operation on the data stored in a database. SQL depends on relational algebra and tuple relational calculus.
A cylindrical structure is used to display the image of a database.
Traditional databases are organized by fields, records, and files. A field is a single piece of information; a record is one complete set of fields; and a file is a collection of records. For example, a telephone book is analogous to a file. It contains a list of records, each of which consists of three fields: name, address, and telephone number.
SQL:
What is SQL- SQL stands for Structured Query Language.
- It is designed for managing data in a relational database management system (RDBMS).
- It is pronounced as S-Q-L or sometime See-Qwell.
- SQL is a database language, it is used for database creation, deletion, fetching rows and modifying rows etc.
- SQL depends on relational algebra and tuple relational calculus.
- All DBMS like MySQL, Oracle, MS Access, Sybase, Informix, Postgres and SQL Server use SQL as standard database language.
Why SQL is required
- SQL is required:
- To create new databases, tables and views
- To insert records in a database
- To update records in a database
- To delete records from a database
- To retrieve data from a database
What SQL does
- With SQL, we can query our database in a numbers of ways, using English-like statements.
- With SQL, user can access data from relational database management system.
- It allows user to describe the data.
- It allows user to define the data in database and manipulate it when needed.
- It allows user to create and drop database and table.
- It allows user to create view, stored procedure, function in a database.
- It allows user to set permission on tables, procedure and view.
What is RDBMS
- RDBMS stands for Relational Database Management Systems..
- 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 relational model introduced by E.F. Codd.
How it works
- Data is represented in terms of tuples (rows) in RDBMS.
- Relational database is most commonly used database. It contains number of tables and each table has its own primary key.
- Due to a collection of organized set of tables, data can be accessed easily in RDBMS.
Brief History of RDBMS
- During 1970 to 1972, E.F. Codd published a paper to propose the use of relational database model.
- RDBMS is originally based on that E.F. Codd's relational model invention.
What is table
- The RDBMS database uses tables to store data. A table is a collection of related data entries and contains rows and columns to store data.
- A table is the simplest example of data storage in RDBMS.
- Let's see the example of student table.
ID
|
Name
|
AGE
|
COURSE
|
1
|
Ajeet
|
24
|
B.Tech
|
2
|
aryan
|
20
|
C.A
|
3
|
Mahesh
|
21
|
BCA
|
4
|
Ratan
|
22
|
MCA
|
5
|
Vimal
|
26
|
BSC
|
What is field
- Field is a smaller entity of the table which contains specific information about every record in the table. In the above example, the field in the student table consist of id, name, age, course.
What is row or record
- A row of a table is also called record. It contains the specific information of each individual entry in the table. It is a horizontal entity in the table. For example: The above table contains 5 records.
- Let's see one record/row in the table.
Ajeet
|
24
|
B.Tech
|
What is column
- A column is a vertical entity in the table which contains all information associated with a specific field in a table. For example: "name" is a column in the above table which contains all information about student's name.
Ajeet
|
Aryan
|
Mahesh
|
Ratan
|
Vimal
|
NULL Values
- The NULL value of the table specifies that the field has been left blank during record creation. It is totally different from the value filled with zero or a field that contains space.
Data Integrity
- There are the following categories of data integrity exist with each RDBMS:
- Entity integrity: It specifies that there should be no duplicate rows in a table.
- Domain integrity: It enforces valid entries for a given column by restricting the type, the format, or the range of values.
- Referential integrity: It specifies that rows cannot be deleted, which are used by other records.
- User-defined integrity: It enforces some specific business rules that are defined by users. These rules are different from entity, domain or referential integrity.
Difference between DBMS and RDBMS:
Although DBMS and RDBMS both are used to store information in physical database but there are some remarkable differences between them.
The main differences between DBMS and RDBMS are given below:
DBMS
|
RDBMS
|
DBMS
applications store data as file.
|
RDBMS
applications store data in a
tabular form.
|
In
DBMS, data is generally stored in either a hierarchical form or a
navigational form.
|
In
RDBMS, the tables have an identifier called primary key and the data values
are stored in the form of tables.
|
Normalization is not present
in DBMS.
|
Normalization is present
in RDBMS.
|
DBMS
does not apply any
security with regards to data manipulation.
|
RDBMS defines the integrity constraint for the
purpose of ACID (Atomocity, Consistency, Isolation and Durability) property.
|
DBMS
uses file system to store data, so there will be no relation between the tables.
|
in
RDBMS, data values are stored in the form of tables, so arelationship between
these data values will be stored in the form of a table as well.
|
DBMS
has to provide some uniform methods to access the stored information.
|
RDBMS
system supports a tabular structure of the data and a relationship between
them to access the stored information.
|
DBMS does not support distributed database.
|
RDBMS supports distributed database.
|
DBMS is
meant to be for small organization and deal
with small data. it supports single user.
|
RDBMS
is designed to handle large
amount of data. it supportsmultiple users.
|
Examples
of DBMS are file systems, xml etc.
|
Example
of RDBMS are mysql, postgre, sql server, oracle etc.
|
After observing the differences between DBMS and RDBMS, you can say that RDBMS is an extension of DBMS. There are many software products in the market today who are compatible for both DBMS and RDBMS. Means today a RDBMS application is DBMS application and vice-versa.