2. SQL Databases

2.1. SQL

2.1.1. Definition

Structured Query Language (SQL) is a standardized language for defining and manipulating data in a relational database.

2.1.2. The relational model of a database

  • Set of tables

  • Relationships are represented by values in tables.

  • Data is retrieved by specifying a result table that can be derived from one or more tables.

2.2. Stored Procedures

2.2.1. Definition

A stored procedure is a named collection of SQL statements and procedure logic that is compiled, verified, and stored in a server database.

2.2.2. Applications

  • Enforce data integrity

  • Perform system maintenance

  • Implement the server side of an application's logic.

2.3. Main points

2.3.1. Good points

  • SQL dominates the client/server market today.

  • It is easy to create applications in single-vendor/single-server environments.

  • There is a wealth GUI tools to create SQL applications.

  • SQL is familiar to millions of programmers and users.

2.3.2. Bad Points

  • SQL standards lag vendor implementations.

  • Incompatible vendors implementations.

  • Difficult in mount heterogeneous database environments.

Audio in Portuguese