Concept - SQL

SQL (Structured Query Language): developed by IBM in the mid-1970s; a standardized language to define, manipulate and query data in a relational database; several similar versions of the ANSI/ISO standard (s.10).

CREATE TABLE department (
  Did INTEGER PRIMARY KEY, Dname CHAR(30), Dacctno CHAR(6));
CREATE TABLE employee (
  Ename CHAR(30), Did INTEGER, SalaryCode INTEGER,
  Eid INTEGER PRIMARY KEY, Ephone CHAR(10),
  FOREIGN KEY (Did) REFERENCES department (Did));
CREATE VIEW newtable (Dname, Ename, Eid, Ephone)
  AS SELECT D.Dname, E.Ename, E.Eid, E.Ephone
  FROM Department D, Employee E WHERE E.Did = D.Did;

(Slide version lacks the commas after D.Dname and Department D; corrected here.) Security commands: Concept - GRANT and REVOKE. Attack on SQL: Concept - SQL Injection.

Related: Concept - Relational Database. Appears in 05 Database Security - Chunk 01 (s.1-38).