06-11-2012, 11:25 AM
DATABASE MANAGEMENT SYSTEMS
DATABASE MANAGEMENT.ppt (Size: 986 KB / Downloads: 35)
History
IBM Sequel language developed as part of System R project at the IBM San Jose Research Laboratory
Renamed Structured Query Language (SQL)
ANSI and ISO standard SQL:
SQL-86
SQL-89
SQL-92
SQL:1999 (language name became Y2K compliant!)
SQL:2003
Commercial systems offer most, if not all, SQL-92 features, plus varying feature sets from later standards and special proprietary features.
Not all examples here may work on your particular system.
Data Definition Language
The schema for each relation, including attribute types.
Integrity constraints
Authorization information for each relation.
Non-standard SQL extensions also allow specification of
The set of indices to be maintained for each relations.
The physical storage structure of each relation on disk.
Domain Types in SQL
char(n). Fixed length character string, with user-specified length n.
varchar(n). Variable length character strings, with user-specified maximum length n.
int. Integer (a finite subset of the integers that is machine-dependent).
smallint. Small integer (a machine-dependent subset of the integer domain type).
numeric(p,d). Fixed point number, with user-specified precision of p digits, with n digits to the right of decimal point.
real, double precision. Floating point and double-precision floating point numbers, with machine-dependent precision.
float(n). Floating point number, with user-specified precision of at least n digits.
More are covered in Chapter 4.
Tuple Variables
Tuple variables are defined in the from clause via the use of the as clause.
Find the customer names and their loan numbers and amount for all customers having a loan at some branch.
Conceptual Evaluation Strategy
Semantics of an SQL query defined in terms of the following conceptual evaluation strategy:
Compute the cross-product of relation-list.
Discard resulting tuples if they fail qualifications.
Delete attributes that are not in target-list.
If DISTINCT is specified, eliminate duplicate rows.
This strategy is probably the least efficient way to compute a query! An optimizer will find more efficient strategies to compute the same answers.
DATABASE MANAGEMENT.ppt (Size: 986 KB / Downloads: 35)
History
IBM Sequel language developed as part of System R project at the IBM San Jose Research Laboratory
Renamed Structured Query Language (SQL)
ANSI and ISO standard SQL:
SQL-86
SQL-89
SQL-92
SQL:1999 (language name became Y2K compliant!)
SQL:2003
Commercial systems offer most, if not all, SQL-92 features, plus varying feature sets from later standards and special proprietary features.
Not all examples here may work on your particular system.
Data Definition Language
The schema for each relation, including attribute types.
Integrity constraints
Authorization information for each relation.
Non-standard SQL extensions also allow specification of
The set of indices to be maintained for each relations.
The physical storage structure of each relation on disk.
Domain Types in SQL
char(n). Fixed length character string, with user-specified length n.
varchar(n). Variable length character strings, with user-specified maximum length n.
int. Integer (a finite subset of the integers that is machine-dependent).
smallint. Small integer (a machine-dependent subset of the integer domain type).
numeric(p,d). Fixed point number, with user-specified precision of p digits, with n digits to the right of decimal point.
real, double precision. Floating point and double-precision floating point numbers, with machine-dependent precision.
float(n). Floating point number, with user-specified precision of at least n digits.
More are covered in Chapter 4.
Tuple Variables
Tuple variables are defined in the from clause via the use of the as clause.
Find the customer names and their loan numbers and amount for all customers having a loan at some branch.
Conceptual Evaluation Strategy
Semantics of an SQL query defined in terms of the following conceptual evaluation strategy:
Compute the cross-product of relation-list.
Discard resulting tuples if they fail qualifications.
Delete attributes that are not in target-list.
If DISTINCT is specified, eliminate duplicate rows.
This strategy is probably the least efficient way to compute a query! An optimizer will find more efficient strategies to compute the same answers.