0% found this document useful (0 votes)
27 views14 pages

Introduction of SQL Oracale 2

Uploaded by

rvikash9128
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views14 pages

Introduction of SQL Oracale 2

Uploaded by

rvikash9128
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

PRACTICAL 1

INTRODUCTION OF SQL ORACALE


Structured Query Language (SQL) is the set of statements with which all programs and users
access data in an Oracle Database. Application programs and Oracle tools often allow users
access to the database without using SQL directly, but these applications in turn must use
SQL when executing the user's request. This chapter provides background information on
SQL as used by most database systems.

What Can SQL do

 SQL can execute queries against a database


 SQL can retrieve data from a database
 SQL can insert records in a database
 SQL can update records in a database
 SQL can delete records from a database
 SQL can create new databases
 SQL can create new tables in a database
 SQL can create stored procedures in a database
 SQL can create views in a database
 SQL can set permissions on tables, procedures, and views

Data types in SQL

Each value manipulated by Oracle Database has a data type. The data type of a value
associates a fixed set of properties with the value.

1. Numerical Datatypes
Oracle offers several numerical datatypes, including
NUMBER is used to store numeric values with high precision
INTEGER is used to store whole numbers
FLOAT is used to store approximate numeric values.
2. Character Datatypes
Oracle has 8 character datatypes
 CHAR
 NCHAR
 VARCHAR
 VARCHAR2
 NVARCHAR
 CLOB
 NCLOB
 LONG
3. Date and Time Datatypes
Oracle provides two datatypes for date and time information:
 DATE is used to store date and time information
 TIMESTAMP is used to store more precise date and time information.

4. Large Object Datatypes


Oracle has two datatypes for large objects
 BLOB is used to store binary data
 CLOB is used to store character data.
5. Raw Datatype
RAW is used to store variable-length binary data. It's often used for data that's not meant to
be interpreted or manipulated, like encrypted information.
DDL (Data Definition Language)
actually consists of the SQL commands that can be used to define the database schema. It
simply deals with descriptions of the database schema and is used to create and modify the
structure of database objects in the database.
DDL is a set of SQL commands used to create, modify, and delete database structures but not
data. These commands are normally not used by a general user, who should be accessing the
database via an application.
List of DDL Commands
Some DDL commands and their syntax are:
 CREATE
 DROP
 ALTER
 TRUNCATE
 COMMENT
 RENAMEDATA QUER

DML(data manipulation language):Y Language)


The SQL commands that deal with the manipulation of data present in the database belong to
DML or Data Manipulation Language and this includes most of the SQL statements.
It is the component of the SQL statement that controls access to data and to the database.
Basically, DCL statements are grouped with DML statements.
List of DML commands
Some DML commands and their syntax are:

 INSERT
 UPDATE
 DELETE
 LOCK
 CALL

DCL(data control language):DCL (Data Control Language)


DCL includes commands such as GRANT and REVOKE which mainly deal with the rights,
permissions, and other controls of the database system.
List of DCL commands:
Two important DCL commands and their syntax are:
 GRANT
 REVOKE
Some most important SQL commands

 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
 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

INSTALLATION OF ORACLE SQL


Frist of all we create a new account on oracle
Log into your Oracle web account. If you do not have an Oracle account, click the "Sign Up"
link to create one
Open a web browser of your choice and navigate to http://otn.oracle.com/windows.
By default, the page displays the What's New tab, showcasing news about Oracle on
Windows.

Step 1: Click the Downloads tab.


Step 2 : Click on the latest version of Oracle Database 12c (x64).

Step 3 : Accept the license agreements..

Step 4: click one of zip link according to your system bits (64bits ,32bits )
Step 5: Go to file location where you download oracle zip file
Select one zip file and click right button of your mouse
Then click on Extract All

Step 6 : Choose the folder of your choice and click Extract

Note : basically all user Extract in same folder


Step 7 : Expand the database folder that you extracted in the previous section.
Double-click setup.

Step 8: Click Yes in the User Account Control window to continue with the installation.
Step 8 : Enter email and password that created on oracle
Then click Next

Step 9: select skip software updates.


Then click on next
Step 10: . Select the Create and configure a database option and click Next.

Step 11 : Select Desktop class and click Next.


Step 12: select new window user and enter user name for oracle account .Enter strong
password .And conform it .Then click on next

Step 13: Enter global database name .Again make a strong password for Administrative.
Select create as container database then enter database name. then clink Next
Step 14: Review the settings and click Install.
Note: Depending on your firewall settings, you may need to grant permissions to allow java
to access the network.

The progress window appears.


The Database Configuration Assistant creates the database.
Step 15: After creation complete click Ok

Step 16: you see your database Express URL


Click on Ok
Step 17: click on close button

You might also like