-- two gender values
insert into GEN_Gender values (0, 'Male');
insert into GEN_Gender values (1, 'Female');
-- create an actor (automatically generated id)
insert into lAC_Actor (
AC_NAM_Actor_Name,
AC_NAM_ChangedAt,
GEN_Gender
)
values('Rönnbäck', '1972-08-20', 'Male');
-- update that actor (using the generated id)
update lAC_Actor
set
AC_NAM_Actor_Name = 'Samuelsson'
where
AC_ID = 1;
-- no table elimination
select * from lAC_Actor;
select * from pAC_Actor('1999-12-31');
-- table elimination (left joins, attributes eliminated)
select AC_NAM_Actor_Name from lAC_Actor;
select AC_NAM_Actor_Name from pAC_Actor('1999-12-31');
-- table elimination (foreign keys, also anchor eliminated)
select AC_NAM_Actor_Name from lAC_Actor where AC_NAM_Actor_Name is not null;
select AC_NAM_Actor_Name from pAC_Actor('1999-12-31') where AC_NAM_Actor_Name is not null;
-- remove rows
delete from lAC_Actor where AC_ID = 1;
-- now underlying tables are empty
select AC_ID from AC_Actor;
select AC_ID from AC_NAM_Actor_Name;