You are on page 1of 3

What Is a Database?

Database is a collection of structured information. Databases are designed specifically to manage large
bodies of information, and they store data in an organized and structured manner that makes it easy for
users to manage and retrieve that data when required.
A database management system (DBMS) is a software program that enables users to create and
maintain databases. A DBMS also allows users to write queries for an individual database to perform
required actions like retrieving data, modifying data, deleting data, and so forth.
DBMSs support tables (a.k.a. relations or entities) to store data in rows (a.k.a. records or tuples) and
columns (a.k.a. fields or attributes), similar to how data appears in a spreadsheet application.
A relational database management system, or RDBMS, is a type of DBMS that stores information in
the form of related tables. RDBMS is based on the relational model.
Choosing Between a Spreadsheet and a Database
1. Retrieve all records that match particular criteria.
2. Update or modify a complete set of records at one time.
3. Extract values from records distributed among multiple tables.
Why Use a Database?
Following are some of the reasons we use databases:
Compactness: Databases help in maintaining large amounts of data, and thus completely
replace voluminous paper files.
Speed: Searches for a particular piece of data or information in a database are much
faster than sorting through piles of paper.
Less drudgery: Maintaining files by hand is dull work; using a database completely
eliminates such maintenance.
Currency: Database systems can easily be updated and so provide accurate information
all the time and on demand.
Benefits of Using a Relational Database Management System
Advantages:
1. Redundancy - prevent having multiple duplicate copies of the same data, which takes up disk
space unnecessarily.
2. Inconsistency
3. Data integrity
4. Data atomicity
5. Access anomalies
6. Data security
7. Transaction processing: A transaction is a sequence of database operations that represents a
logical unit of work. In RDBMSs, a transaction either commits all the changes or rolls back all the
actions performed until the point at which failure occurred.
8. Recovery: Recovery features ensure that data is reorganized into a consistent state after a
transaction fails.
9. Storage Management.

Comparing Desktop and Server RDBMS Systems


Desktop Databases - Desktop databases are designed to serve a limited number of users and run on
desktop PCs, and they offer a less-expensive solution wherever a database is required.
Advantage: Less expensive, User friendly
Server Databases - specifically designed to serve multiple users at a time and offer features that allow
you to manage large amounts of data very efficiently by serving multiple user requests simultaneously.

What is SQL?

SQL stands for Structured Query Language

SQL lets you access and manipulate databases

SQL is an ANSI (American National Standards Institute) standard

SQL is a Standard - BUT....


Although SQL is an ANSI (American National Standards Institute) standard, there are many
different versions of the SQL language.
However, to be compliant with the ANSI standard, they all support at least the major commands
(such as SELECT, UPDATE, DELETE, INSERT, WHERE) in a similar manner.

SQL DML and DDL


SQL can be divided into two parts: The Data Manipulation Language (DML) and the Data
Definition Language (DDL).
The query and update commands form the DML part of SQL:

SELECT - extracts data from a database

UPDATE - updates data in a database

DELETE - deletes data from a database

INSERT INTO - inserts new data into a database

The DDL part of SQL permits database tables to be created or deleted. It also defines indexes
(keys), specifies links between tables, and imposes constraints between tables. The most
important DDL statements in SQL are:

CREATE DATABASE - creates a new database

ALTER DATABASE - modifies a database

CREATE TABLE - creates a new table

ALTER TABLE - modifies a table

DROP TABLE - deletes a table

CREATE INDEX - creates an index (search key)

DROP INDEX - deletes an index