w3d2 Flashcards
iso restrictions on identifiers
must start with a letter
no longer than 128 characters
cannot contain spaces
every data type is
either pre defined, constructed or user defined
the name of a predefined or preconstructed data type is
a reserved word specified by that part of ISO/IEC 9075 that specifies the data type
the name of a user defined data type
is provided in it’s definition
predefined data type
datatype specified by ISO/IEC 9075 AND is provided by the SQL implementation
- predefined even when the user is allowed to provide certain parameters
- is atomic(not composed of values of other data types)
Each table has
a name that is unique within the schema
a structure that is the same for each of its records
each attribute needs as a minimum
a unique name within the record
a data type ( which could be the name of a domain )
Integrity constraints
define valid states of sql data by constraining values in base tables
constaint can cause DBMS to
reject any atempt to insert, delete, or update against the restraint
domain
set of legal values, (a sophisticated data type
when not otherwise specified
the domain is the set of all legal values, that are based on the data type of the attribute
CHECK
further specifies the legal values of a domain
domain constraint
constraint specified for a domain
- applied to all columns that are based on that domain and to all values that are cast to that domain
CONDITION ONLY CHECKED UPON
an insert or update of the record within the constraint
- not checked when records referred to in the check of the domain are updated or deleted
The domain name can and should be used
in place of a data type by one or more data definitions