Relational Databases and SQL


Relational Databases
The relational model has a structural part (schemata with dependencies) and an operational part (relational algebra). The logical and physical levels are independent of each other. The only basic construct on the logical level is the relation; relations can be illustrated for the users in the form of tables.

SQL (Structured Query Language)
SQL is used to enter and query data in databases and administer databases.
  1. SQL was the first SQL developed by IBM during the 1970s.
  2. SQL-86 was the first SQL standard adopted by ANSI and ISO.
  3. SQL-89 was a minor revision of SQL-86.
  4. X/OPEN was an extension of SQL-89.
  5. SQL:1992 (SQL2) provided an SQL standard to anticipate future needs.
  6. SQL:1999 (SQL3) included object-oriented features.
  7. SQL:2003 included XML-related features.
  8. SQL:2006 included more XML features such as XQuery.
  9. SQL:2008 added INSTEAD OF triggers and the TRUNCATE statement.
  10. SQL:2011 added temporal features including valid time and transaction time.
  11. SQL:2016 introduced 44 new optional features including JSON and polymorphic table functions.
  12. SQL:2019 added multidimensional arrays (MDarray type and operators).
student
student_id last_name first_name class phone
1 Jones Allan 2 555-1234
2 Smith John 3 555-4321
3 Brown Harry 2 555-1122
5 White Edward 3 555-3344

course
course_no course_name room time
101 French I 2-104 MW2
102 French II 2-113 MW3
105 Algebra 3-105 MW2
108 Calculus 2-113 MW4
enrollment
student_id course_no major
1 101 No
1 108 Yes
2 105 No
3 101 Yes
3 108 No
5 102 No
5 105 No