While Dr. Codd’s paper defined the structure, his colleagues Donald D. Chamberlin and Raymond F. Boyce at IBM had been developing a query language known as SQUARE (Specifying Queries As Relational Expressions), which used set theory and predicate mathematics to select data from the database. This language had a terse mathematical syntax, but became the proving ground for concepts which are important to database manipulation.
By 1974, Chamberlin and Boyce published “SEQUEL: A Structured English Query Language” which detailed their refinements to SQUARE and introduced us to the data retrieval aspects of SEQUEL. This new SEQUEL language was as powerful as SQUARE, but Chamberlin and Boyce “kept in mind the notions of top down structured programming, the need for linear notation, and the need for readable programs that are easy to maintain and modify”. The resulting syntax could be described as block-structured English keyword syntax.
Using SQUARE to find all the names and salaries of employees who are in the toy department and whose manager is Anderson would be represented as:
NAME, SAL EMP DEPT, MGR ('TOY', 'ANDERSON')
The equivalent query in SEQUEL would be represented as:
SELECT NAME, SAL FROM EMP WHERE DEPT = 'TOY' AND MGR = 'ANDERSON'
This type of syntax had many advantages, such as being easily learned by non-experts. Both SQUARE and SEQUEL had the advantage of being declarative languages. This allowed users to specify ‘what’ to do rather than ‘how’ to do it as in imperative, or procedural languages.
SEQUEL was later renamed to SQL by dropping the vowels, because SEQUEL was a trade mark registered by the Hawker Siddeley aircraft company. Thus SQL was born.
No comments:
Post a Comment