My SQL by Sophia Fraser
My SQL by Sophia Fraser
My SQL by Sophia Fraser
Global Media | 2009 | ISBN: 9380168446 | 72 pages | PDF | 11 MB
Relational Databases
The main drive behind a relational database is to increase accuracy by increasing the efficiency with which data is stored. For example, the names of each of the millions of people who immigrated to the United States through Ellis Island at the turn of the 20th century were recorded by hand on large sheets of paper; people from the city of London had their country of origin entered as England, or Great Britain, or United Kingdom, or U.K., or UK, or Engl., etc. Multiple ways of recording the same information leads to future confusion when there is a need to simply know how many people came from the country now known as the United Kingdom.
The modern solution to this problem is the database. A single entry is made for each
country, for example, in a reference list that might be called the Country table. When
someone needs to indicate the United Kingdom, he only has one choice available to him
from the list: a single entry called "United Kingdom". In this example, "United Kingdom"
is the unique representation of a country, and any further information about this country
can use the same term from the same list to refer to the same country. For example, a list
of telephone country codes and a list of European castles both need to refer to countries;
by using the same Country table to provide this identical information to both of the new
lists, we've established new relationships among different lists that only have one item in
common: country. A relational database, therefore, is simply a collection of lists that
share some common pieces of information.
If you are not familiar with the concepts of databases, you can begin with Database
Programming.
Structured Query Language (SQL)
SQL, which is initialism for Structured Query Language, is a language to request data
from a database, to add, update, or remove data within a database, or to manipulate the
metadata of the database.
SQL is generally pronounced as the three letters in the name, e.g. ess-cue-ell, or in some
people's usage, as the word sequel.
SQL is a declarative language in which the expected result or operation is given without
the specific details about how to accomplish the task. The steps required to execute SQL
commands are handled transparently by the SQL database
. Sometimes SQL is
characterized as non-procedural because procedural languages generally require the
details of the operations to be specified, such as opening and closing tables, loading and
searching indexes, or flushing buffers and writing data to filesystems. Therefore, SQL is
considered to be designed at a higher conceptual level of operation than procedural