Purchase Solution

features and uses of SQL

Not what you're looking for?

Ask Custom Question

Outline the specific features and uses of SQL. Put in examples of each point or feature that you explain.

Purchase this Solution

Solution Summary

This job examines features and uses of SQL.

Solution Preview

Please see the attached file.

SQL

(Structured Query Language) Pronounced "S-Q-L" a language used to interrogate and process data in a relational database. Originally developed by IBM for its mainframes, all database systems designed for client/server environments support SQL. SQL commands can be used to interactively work with a database or can be embedded within a programming language to interface to a database. Programming extensions to SQL have turned it into a full-blown database programming language, and all major database management systems (DBMSs) support the language.

When SQL was not developed File-processing System was very popular for processing and storing the data. But some of the major disadvantages of File-processing System like Data redundancy and inconsistency, difficulty in accessing data, data isolation, concurrent access anomalies lead to the development of SQL.

SQL is a non-procedural language and a language that all commercial RDBMS implementations understand.

Example:
The following SQL query selects customers with credit limits of at least $5,000 and puts them into sequence from highest credit limit to lowest. The bold words are SQL verbs.

select name, city, state, zipcode
from customer
where creditlimit > 4999
order by creditlimit desc

Data Types:
There are various data types that SQL supports like:
Integers

Decimal numbers

Floating point numbers---- FLOAT

Fixed length character strings---- CHAR (len)
Fixed length character data of length len bytes. This should be used for fixed length data.

Variable length character strings --- Varchar2(len)
Variable length character string having maximum length len bytes. We must pecify the size
Dates-----DATE

SQL has three flavors of statements. The DDL, DML and DCL.

DDL is Data Definition Language statements. Some examples:
CREATE - to create objects in the database
ALTER - alters the structure of the database
DROP - delete objects from the database
TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed
COMMENT - add comments to the data dictionary
GRANT - gives user's access privileges to database
REVOKE - withdraw access privileges given with the GRANT command

DML is Data Manipulation Language statements. Some examples:
SELECT - retrieve data from the a database
INSERT - insert data into a table
UPDATE - updates existing data within a table
DELETE - deletes all records from a table, the space for the records remain
CALL - call a PL/SQL or Java subprogram
EXPLAIN PLAN - explain access path to data
LOCK TABLE - control concurrency

DCL is Data Control Language statements. Some examples:
COMMIT - save work done
SAVEPOINT - identify a point in a transaction to which you can later roll back
ROLLBACK - restore database to original since the last COMMIT
SET TRANSACTION - Change transaction options like what rollback segment to use

Set Operational Features:

The SQL operations union, intersect ...

Purchase this Solution


Free BrainMass Quizzes
C++ Operators

This quiz tests a student's knowledge about C++ operators.

Basic Networking Questions

This quiz consists of some basic networking questions.

Javscript Basics

Quiz on basics of javascript programming language.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.