Please enable JavaScript.
Coggle requires JavaScript to display documents.
SQL 2 - Coggle Diagram
SQL 2
REACTION POLICIES
reactions
set default
- assign default value to referring attributes
no action
/restrict - forbid change on external table
set null
- nullify referring attributes
cascade
- propagate change
reactions may depend on event
how introduce violations
delete rows in referenced table
update reference attributes (columns)
syntax
< cascade | set null | set default | no action >
on < delete | update >
reactions operate on table w/ foreign key, after changes to external (referenced) table
SCHEMA UPDATES
drop
drop < schema | domain | table |view | assertion >
ComponentName
[ restrict | cascade ]
alter
alter table
alter domain
CONSTRAINTS
2 types
Inter
-relational
types
references
and
foreign key
permit definition (creation) of referential integrity constraints
syntax
numerous attributes (columns)
foreign key
(
Attribute
{,
Attribute
} )
references
1 attribute (columns)
references
after domain
can associate reaction policies to violations of referential integrity
check
numerous relations (tables)
Intra
-relational
types
primary key
check
unique
not null
1 relation (table)
conditions must be verified by every DB instance