21-12-2012, 04:55 PM
Teach Yourself SQL in 21 Days, Second Edition
1Teach Yourself SQL.pdf (Size: 1.25 MB / Downloads: 43)
Introduction to SQL
A Brief History of SQL
The history of SQL begins in an IBM laboratory in San Jose, California, where SQL was
developed in the late 1970s. The initials stand for Structured Query Language, and the
language itself is often referred to as "sequel." It was originally developed for IBM's
DB2 product (a relational database management system, or RDBMS, that can still be
bought today for various platforms and environments). In fact, SQL makes an RDBMS
possible. SQL is a nonprocedural language, in contrast to the procedural or thirdgeneration
languages (3GLs) such as COBOL and C that had been created up to that
time.
A Brief History of Databases
A little background on the evolution of databases and database theory will help you
understand the workings of SQL. Database systems store information in every
conceivable business environment. From large tracking databases such as airline
reservation systems to a child's baseball card collection, database systems store and
distribute the data that we depend on. Until the last few years, large database systems
could be run only on large mainframe computers. These machines have traditionally
been expensive to design, purchase, and maintain. However, today's generation of
powerful, inexpensive workstation computers enables programmers to design software
that maintains and distributes data quickly and inexpensively.
Dr. Codd's 12 Rules for a Relational Database Model
The most popular data storage model is the relational database, which grew from the
seminal paper "A Relational Model of Data for Large Shared Data Banks," written by
Dr. E. F. Codd in 1970. SQL evolved to service the concepts of the relational database
model. Dr. Codd defined 13 rules, oddly enough referred to as Codd's 12 Rules, for the
relational model:
0. A relational DBMS must be able to manage databases entirely through its
relational capabilities.
1. Information rule-- All information in a relational database (including table
and column names) is represented explicitly as values in tables.
2. Guaranteed access--Every value in a relational database is guaranteed to be
accessible by using a combination of the table name, primary key value, and
column name.
3. Systematic null value support--The DBMS provides systematic support for the
treatment of null values (unknown or inapplicable data), distinct from default
values, and independent of any domain.
4. Active, online relational catalog--The description of the database and its
contents is represented at the logical level as tables and can therefore be
queried using the database language.
Designing the Database Structure
The most important decision for a database designer, after the hardware platform and
the RDBMS have been chosen, is the structure of the tables. Decisions made at this stage
of the design can affect performance and programming later during the development
process. The process of separating data into distinct, unique sets is called normalization.