Saturday 8 September 2012

SQL - The language

SQL is a tool for organizing managing and retrieving data stored by a computer database. The acronym SQL is an abbreviation for structured Query Language for historical reasons SQL is usually pronounced sequel but the alternate pronunciation S.Q.L is also used. As the name implies SQL is a computer language that you use to interact with a database SQL works with one specific type of database, called the relational database. The database is stored in the computer system. If the computer system is in a business, the database might store inventory, production, sales or payroll data. On personal computers (Pc’s) the database might store data about the checks you written, lists of people and their phone numbers, or data extracted from a larger computer system. The computer program that controls the database is called a database management system, or DBMS. When you need to retrieve data from the database, you use the SQL language to make the request the DBMS processes the SQL request, retrieves the requested data, and returns it to you. This process of requesting data from a database and receiving back the results is called database query----- hence the name structured query language. The name “Structured Query Language” is actually somewhat of a misnomer. First of all, SQL is far more than a query tool although that was its original purpose, and retrieving data is still one of its most important functions. SQL is used to control all of the functions that a DBMS provides for its users including:

  • Data definition: SQL lets a user define the structure and organization of the stored data and relationships among the stored data items.
  • Data retrieval: SQL allows a user or an application program to retrieve stored data from the database and use it.
  • Data manipulation: SQL allows a user or an application program to update the database by adding new data, removing old data, and modifying previously stored data.
  • Access control: SQL can be used to restrict a user’s ability to retrieve, add, and modify data, protecting stored data against unauthorized access.
  • Data sharing: SQL id used to coordinate data sharing by concurrent users, ensuring that they do not interfere with one another.
  • Data integrity: SQL defines integrity constraints in the database, protecting it from corruption due to inconsistent updates or system failures.

SQL is thus a comprehensive language for controlling and interacting with a database management system. SQL is not a complete computer language like COBOL, C, C++, or java.SQL contains no if statement for testing conditions, and no go to, do or for statements for program flow control. Instead, SQL is a database sublanguage, consisting of about 40 statements specialized for database management tasks.SQL has emerged as the standard language for using relational databases. SQL is both a powerful language and one that is relatively easy to learn.

No comments:

Post a Comment