Data Retrieval Using SQL Plus

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email

We have already seen that information is stored as data 'in a DBMS. To, use this data first we have to retrieve it. This section deals with various ways of retrieving and manipulating data Commands

What are SQL Commands?

SQL commands are the statements needed to communicate with Oracle. They direct the Oracle server to perform a specific task SQL commands are classified as follows

Data Definition Language (DDL) commands. DDL commands are used to manage schema objects and user privileges.

Data Manipulation (DML) commands. DML commands assist the user in accessing and manipulating database data.
Data Control (DCL) commands
DCL commands control access to database or revoke database transactions.

Why use SQL Commands?

SQL commands provide a predefined and consistent way to manage and administrator the Oracle database. These commands have a specific syntax and semantic that enable the user to communicate with the server. These commands ensure that the server understand your commands. Without these formal statements, chaos would prevail because it would be difficult for the server to know or understand any of your command.

How to use SQL Commands?

Structuring the Database: Database Definition Language ALTER SPACE Alter a space definition
ALTER TABLE - Adds a column to define a column in an existing table
COMMENT - Inserts a comment about a table or column into the data dictionary
CREATE CLUSTER - Creates a cluster which may contain two or more tables
CREATE INDEX - Creates an index for a table
CREATE SPACE - Creates a space definition which then allocation properties of a table
CREATE SYNONYM - Creates a table and defines its columns and other properties
CREATIVE VIEW - Defines a view of one or more tables or other views.
DROP - Deletes a cluster, table, view, or index from the database
RENAME - Changes the name of a table view, or synonym
You use the Data Definition Language Statements CREATE, ALTER, and DROP to create new objects, er the structure of existing objects, or completely remove objects from the system.

Using the Database : Data Manipulation Language

A database is established, data manipulation statements are the most frequently used of the three ds of SQL statements. You use them to extract records from a database or to alter it in some way.

ECT statements are used to query the database. You can construct a variety of SELECTs to retrieve display rows from one or more tables. The UPDATE, INSERT, and DELETE statements alter existing ,base rows, place new records into a database, or more one or remore records from the database selectively.
Data manipulation Language

DELETE - Deletes one or more rows from a table or view
INSERT - Adds new rows to a table or view

SELECT - Performs a query and selects rows and columns from one or more tables or views
UPDATE - Changes the value of fields in a table or view

Securing the Database: Data Control Language

Data Control Language statements such as GRANT, REVOKE, COMMIT, and ROLLBACK control access to database or revoke database transactions. Used frequently by the database administrator, DCL statements also control who has access to what tables, who can log on the Oracle system, and what privileges each user has for various database tables. The COMMIT and ROLLBACK commands permit groups of database transactions to be made permanent or to be nullified.

SQL Data Control Language

AUDIT - Makes Oracle audit use of table, view', synonym, or system facility.
COMMIT Makes database transactions irreversible
GRANT Grants access to objects stored in database
LOCK TABLE Locks a table and thus permits shared access to the table by multiple users while simultaneously preserving the tables integrity.
REVOKE Revokes database privileges or table access privileges from users
ROLLBACK Cancels database transactions



Domain Name Search

www.


Copyright (C) 2007. Web Domain design hosting. All rights reserved.