Introduction to SQL

SQL is a comprehensive language for controlling and interacting with a database management system which consists of about 40 statements, specialized for database management tasks. It is a declarative or descriptive language rather than a procedural one (4th generation language).

The original name given it by IBM was Structured English Query Language, shortened to the acronym SEQUEL. When IBM discovered that SEQUEL was a trademark owned by the Hawker Siddeley Aircraft Company of the United Kingdom, they shortened the acronym to SQL. The word “English” was then dropped from the spelled-out name to match the new acronym.

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 is used to coordinate data sharing by concurrent users, ensuring that changes made by one user do not inadvertently wipe out changes made at nearly the same time by another user. 
  • Data integrity SQL defines integrity constraints in the database, protecting it from corruption due to inconsistent updates or system failures. 
Other roles played by SQL:
  • SQL is an interactive query language. Users type SQL commands into an interactive SQL program to retrieve data and display it on the screen, providing a convenient, easy-to-use tool for ad hoc database queries.
  • SQL is a database programming language. Programmers embed SQL commands into their application programs to access the data in a database. Both user-written programs and database utility programs (such as report writers and data entry tools) use this technique for database access. 
  • SQL is a database administration language. The database administrator responsible for managing a minicomputer or mainframe database uses SQL to define the database structure and to control access to the stored data. 
  • SQL is a client/server language. Personal computer programs use SQL to communicate over a network with database servers that store shared data. This client/server architecture is used by many popular enterprise-class applications. 
  • SQL is an Internet data access language. Internet web servers that interact with corporate data and Internet application servers all use SQL as a standard language for accessing corporate databases, often by embedding SQL database access within popular scripting languages like PHP or Perl. 
  • SQL is a distributed database language. Distributed database management systems use SQL to help distribute data across many connected computer systems. The DBMS software on each system uses SQL to communicate with the other systems, sending requests for data access. 
  • SQL is a database gateway language. In a computer network with a mix of different DBMS products, SQL is often used in a gateway that allows one brand of DBMS to communicate with another brand. 

No comments:

Post a Comment