2.2. Structured Query Language (SQL)

Structured Query Language (SQL) is a language designed to access a relational database. Based on the work of Dr. E. F. Codd, the first implementation of SQL was developed by IBM in the mid-1970s. IBM's implementation of SQL was part of a research project known as System R. In 1979, a company then known as Relational Software Inc. (now Oracle Corporation) released the first commercial version of SQL. SQL was later adopted by the American National Standards Institute (ANSI) as the standard language for accessing relational databases. Today, SQL is supported by most relational databases, including Oracle, Microsoft SQL Server, Informix, and MySQL.

SQL uses a simple syntax that is easy to learn and use. You'll see examples of it throughout this chapter. As you learn to use SQL, you'll discover that there are two basic types of SQL statements:

  • Data Definition Language (DDL) statements

  • Data Manipulation Language (DML) statements

DDL statements are used to define the data structures, such as tables, that make up your database. DML statements allow you to retrieve, add, modify, and delete rows stored in tables. You will learn about DDL and DML in this chapter.

Oracle supplies an interactive, text-based tool called SQL*Plus that allows you to enter SQL statements, execute them, and view the results. Many of the examples in this chapter use SQL*Plus. SQL statements may also be embedded in programs written in other languages, which is what SQLJ is all ...

Get Java Programming with Oracle SQLJ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.