Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Database : Application of Databases

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Database;

is a collection of data organized to service many applications at the same time by


storing and managing data so that they appear to be in one location.

Application of Databases

•   Banking;
For customer information, accounts, and loans, and banking transactions.

•    Airlines;
For reservations and schedule information.

•    Universities;
For student information, course registrations, and grades.

• Credit card transactions;


For purchases on credit cards and generation of monthly
statements.

• Telecommunications;
For keeping records of calls made, generating monthly bills,
maintaining balances on prepaid calling cards, and storing information about the communication
networks.

• Finance;
For storing information about holdings, sales, and purchases of financial instrument
such as stocks and bonds.

• Sales;
For customers, product, and purchase information.

• Manufacturing;
For management of supply chain and for tracking production of items in
factories, inventories of items in warehouses/stores, and orders for items.
• Human resources;
For information about employees, salaries, payroll taxes and benefits,
and for generation of paychecks.

Data Hierarchy;
The data hierarchy comprises: bits, bytes, fields, records, files, and database.

Bit;
Smallest unit of data represented by 1 or 0.

Byte;
A group   of 8 bits.

Field;
Unit of data consisting of one or more characters. For example id, name, address.

Record;
A collection of related fields.

File;
A collection of related records.

Database;
A collection of related files.

Disadvantages of traditional file system

• Data redundancy;
Same information may be duplicated in several places.

• Inconsistency;
The various copies of same data may no longer agree. 

• Difficulty in accessing data;


Conventional file processing environments do not allow
needed data to be retrieved in a convenient and efficient manner.
• Data isolation;
Data are scattered in various files, and files may be in different formats.

•    Integrity problems;
Data values stored in the database must satisfy certain types of
consistency constraints. It is difficult to satisfy these constraints in traditional file system.

• Atomicity problems;
It must happen in its entirety or not at all. It is difficult to ensure
atomicity in a conventional file processing system.

• Security problems ;
Hard to provide user access to some, but not all, data.

Database-Management System;

• A database-management system (DBMS);


is a collection of interrelated data and a
set of programs to access those data.

Three Components • Data-Definition Language (DDL) • Data Manipulation Language


(DML) • Data Dictionary

DDL;
• We specify a database schema by a set of definitions expressed by a special language called a
data-definition language (DDL). For instance, the following statement in the SQL language
defines the account table:

Create table account (account-number char(10), balance integer).

Execution of the above DDL statement creates the account table.  In addition, it updates a
special set of tables called data dictionary or data directory. A data dictionary contains metadata-
that is, data about data.
DML;
Data manipulation is

• The retrieval of information stored in the database

• The insertion of new information into the database

•The deletion of information from the database

•The modification of information stored in the database

A data-manipulation language (DML);


is a language that enables users to access or
manipulate data as organized by the appropriate data model.

•Example: SQL (Structured Query Language) QBE (Query By Example).

Example of an SQL

SELECT id, name FROM student WHERE id=10

Execution of the above SQL statement display the student information with id value equal to 10.

Data Dictionary;
Data dictionary is an automated or manual tool for storing and organizing
information about the data maintained in a database.

View of Data;

• Data Abstraction:
A major purpose of a database system is to provide users with an
abstract view of the data. That is, the system hides certain details of how the data are stored and
maintained.

You might also like