Vous êtes sur la page 1sur 23

DATABASE

Sir Z. A Bhutto

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.

Database
DBMS
Functions of DBMS
Guideline writing SQL statements
Guideline for creating table
Sub-Languages of SQL
SQL operators
Index: Create and not to create
About views
SQL Functions

DATABASE

A computerize record keeping system is called


Database. A Database is collection of information
that is organized so that it can easily be accessed,
managed and updated. In one view, Database can
be classified according to types of context;
Bibliographic, full-text, numeric and images.
Database is collection of data which is related by
some aspect. Data is collection of facts and figures
which can be processed to produce information,
Name of student, age, class his/her subject can be
counted as data for recording purpose.
Database is used for record keeping system, like:
Airline, Books Library etc

DBMS

(DBMS) Database Management System


A system which manage all data is called
DBMS.
DBMS is a system software which handles all
excess of database.
A user issue an excess request using some
particular data sub-language called (SQL)
Structure Quarry Language.
The DBMS intersect the request and analyze
it , The DBMS execute necessary operations
on the store data in the database.

FUNCTION OF DBMS

Data Derivation
Data Manipulation
Data Security and Interpret
Data Recovery
Data Dictionary
Database Performance

DATA DERIVATION

Data Derivation refers to the process of creating a


data value from one or more contributing data
values through a data derivation algorithm.

Data Manipulate

Data Manipulation is the manipulation of


data.

DATA SECURITY AND INTERPRET

Database security concerns the use of a broad


range of information security controls to protect
database.

Data Recovery

DATA DICTIONARY

Database Performance

GUIDELINE OF SQL STATEMENTS

Select * From employees;


Select * sal From emp;
Select sal from emp where ename=Ali;
Select * from students where Admin date=01JAN-2015;
SQL statements are not case sensitive.
Means you can use capital or small letters.
SQL statements can on one or more lines.
Every SQL statement ENDS with semicolon. ;
Keyword can split or crossline

GUIDELINE FOR CREATING


TABLE

Table name must begin or start with the


alphabet, Example Create table Department.
First letter should be capital
The name can be up to 30 characters long.
The table name can contain capital A to Z,
small a to z or 0 to 9 and symbols also.
The name must not duplicate the name of
another table owned by the same user.

SUB-LANGUAGE OF SQL

(DDL) Data Definition Language


(DML) Data Manipulation Language
(DCL) Data Control Language
(DRL) Data Retrieval Language

DDL

DDL support SQL when we are creating new


database, creating table, altering table, rename
table, drop table

DML
DML is generally is a subset of SQL.
Insert, Update & Delete

DCL

DCL supports Grant, Revoke, Comment and


Rollback

DRL

SQL OPERATORS

Relational operators
Logical operators
Arithmetic operators
Compregion

INDEX

An index is an Oracle object that can speed


up the retrieval of rows,
Index is used by the Oracle Server
Index can reduced this input and output
Index is an independent object.
Index is used and maintained by the Oracle
server.

WHEN TO CREATE INDEX

When column is frequently is used in the were


condition.
When the column contains a wide range of
values
When the column contains a large number of
null values

WHEN NOT TO CREATE INDEX

When table is very small


When column are not offering used in a were
condition.
The table is update frequently

ABOUT VIEWS

View is a logical sub-set of table or condition


of data.
A view is a logical table based on real, base
table.
View provide to restrict database excess.
To make complete queries easy.
To allow data indecency.
To present different view of same data.
View does not reserve any space on hard
disk.

SQL FUNCTIONS
Function are the set of instruction of small
program that perform a specific task.
Functions are very powerful features of
Oracle and can be used to do the following:
1. Perform calculation on data.
2. Modifying individuals data items.
3. Manipulate output for group of rows.
4. Format dates and number of display
5. Convert denim data types

THERE ARE THREE TYPES OF


FUNCTIONS

Single row functions


Multi row functions
Character functions

SINGLE ROW FUNCTIONS

Date function
Month-between
Add-month
Next-day
Last-day

MULTI ROW FUNCTIONS

Avenger
Count
Max
Min

CHARACTER FUNCTIONS

Lower function
Upper function
Length function
Lpad function
Rpad function
Initial function

Vous aimerez peut-être aussi