Sunday, April 5, 2009

SQL (Structured Query Language)

The SQL is stand for Structured Query Language. It was originally developed as the query language of the system-R relational at IBM. It becomes the most common languare used for creating, manipulating and querying relational DBMS. There is a need for standard official SQL because many vendors sell SQL products and this new model allows users to measure a given seller’s vision of SQL for completeness. Also it allows users to differentiate SQL features specific to one product from other standard. "The SQL language standard uses the word table to denote relation. To subset of SQL that supports the creation, deletion, and modification on tables is called the Data Definition Language (DDL). For example to create table statement for students's used to define a new table." (pg.62, Ramakrishnan, Gehrke) The sample SQL statement would be following:


CREAT TABLE Students
(sid CHAR (20),
name CHAR (30),
login CHAR (20),
age INTEGER
GPA REAL)


Above information inserted in SQL by using the INSERT command. Students table statements write like the following:


INSERT
INTO Students (sid, name, login, age, GPA)
VALUES (53688, `Smith`, `smith@ee`, 18, 3.2)


Then Students' table show like the following;

sid name login age GPA


53688 Smith smith@ee 18 3.2


Writing SQL statements needs time and practice, especially when you complex databases with many entities and queries.



Resources: Database Management Systems, 3rd Edition, by Ramakrishnan & Gehrke and Information Systems Today, 2nd Edition, by Jessup, Valacich & Wade






No comments:

Post a Comment