Académique Documents
Professionnel Documents
Culture Documents
LAB #01
OVERVIEW OF SQL
OBJECTIVE
To learn the features of SQL and SQL* Plus commands
THEORY
SQL (Structured Query Language)
SQL is the industry standard language for relational databases. All RDBMS support
some form of SQL and most RDBMS vendors intend to comply with the ANSI
standard known as SQL-92.
SQL is a command language for communication with the Oracle 7 Server from any
tool or application. Oracle SQL has many extensions.
SQL*PLUS:
SQL *Plus is an Oracle tool that recognizes and submits SQL and PL/SQL statements
to the server for execution, and contains its own command language.
A p p l i c a t i o n
S Q L P l u s
S Q L
O r a c l e
O p e r a t i n g
S y s t e m
D A T A
Overview Of SQL 1
Relational Database Management Systems Lab #01
SQL*PLUS
BUFFER
User
Fig 1.2
Interaction of SQL & SQL*Plus
♦ System administrators
♦ Database administrators
♦ Security administrators
♦ Application programmers
♦ Decision support system personnel
♦ Many other types of end users
Overview Of SQL 2
Relational Database Management Systems Lab #01
SELECT QUERY
Retrieves data from the database. Most commonly used command
BASIC CONCEPTS
Command
An instruction you give SQL*Plus or Oracle.
Block
A group of SQL and PL/SQL commands related to one another through procedural
logic.
Table
The basic unit of storage in Oracle
Overview Of SQL 3
Relational Database Management Systems Lab #01
Query
A SQL command
Query Result
Retrieves data from the database. Most commonly used command
Report
Query results formatted by You through SQL*Plus commands.
SAMPLE TABLES
Many of the concepts and operations in this Guide are illustrated by a set of sample
tables. These tables contain personnel records for a fictitious company.
The exercises make use of the information in two sample tables:
Emp
Contains information about the employees of the Sample Company.
Dept
Contains information about the departments in the company.
Overview Of SQL 4
Relational Database Management Systems Lab #01
STARTING SQL*PLUS.
♦ Make sure that Oracle has been installed on your computer.
♦ Turn on your computer (if it is off) and log on to the host operating system (if
required). If you are already using your computer, you need not log off or reset it.
Simply exit from the program you are using (if any).
♦ Click Sql-Plus menu in the Pop up Menu.
Overview Of SQL 5
Relational Database Management Systems Lab #01
♦ Enter your username and press [Return]. SQL*Plus displays the prompt "Enter
password:".
♦ Enter your password and press [Return] again. For your protection, your password
does not appear on the screen.
The process of entering your username and password is called logging in. SQL*Plus
displays the version of Oracle to which you connected and the versions of available
tools such as PL/SQL
SQL>
ASSIGNMENTS
3. What is Block?
Overview Of SQL 6
Relational Database Management Systems Lab #01
6. What is Schema?
Overview Of SQL 7