Relational Databases ~ Intermediate SQL II

Integrity constraints ensure that changes made to the database by authorized users do not result in a loss of data consistency. Thus, integrity constraints guard against accidental damage to the database. Examples of integrity constraints are:

  • An instructor name cannot be null.
  • No two instructors can have the same instructor ID.
  • Every department name in the course relation must have a matching department name in the department relation.
  • The budget of a department must be greater than $0.00.

继续阅读“Relational Databases ~ Intermediate SQL II”

Relational Databases ~ Introduction to SQL I

There are a number of database query languages in use, either commercially or experimentally. In this series we study the most widely used query language, SQL. Although we refer to the SQL language as a “query language”, it can do much more than just query a database. It can define the structure of the data, modify data in the database, and specify security constraints.

It is not our intention to provide a complete users’ guide for SQL. Rather, we present SQL’s fundamental constructs and concepts. Individual implementations of SQL may differ in details, or may support only a subset of the full language. 继续阅读“Relational Databases ~ Introduction to SQL I”

Relational Databases ~ Introduction to the Relational Model

A data model is a collection of conceptual tools for describing data, data relationships, data semantics, and consistency constraints. In this part, we focus on the relational model.

The relational model uses a collection of tables to represent both data and the relationships among the data. Its conceptual simplicity has led to its widespread adoption; today a vast majority of database products are based on the relational model. The relational model describes data at the logical and view levels, abstracting away low-level details of data storage. 继续阅读“Relational Databases ~ Introduction to the Relational Model”

Database System Concepts ~ Introduction III

The architecture of a database system is greatly influenced by the underlying computer system on which the database system runs. Database systems can be centralized, or client-server, where one server machine executes work on behalf of multiple client machines. Database systems can also be designed to exploit parallel computer architectures. Distributed databases span multiple geographically separated machines. 继续阅读“Database System Concepts ~ Introduction III”