create table movie ( mvnumb number(4,0) constraint mvnumb_not_null not null constraint mvnumb_pk primary key check (mvnumb > 0), mvtitle varchar2(30) constraint mvtitle_not_null not null, yrmade number(4,0) constraint yrmade_not_null not null, mvtype varchar2(6) constraint mvtype_check check ( upper(mvtype) in ('COMEDY', 'SCI FI', 'SUSPEN', 'HORROR', 'DRAMA', 'RELIGI', 'WESTER')), crit number(1,0) constraint crit_check check ( crit >=0 and crit <= 4), mpaa varchar2(2) constraint mpaa_check check ( upper(mpaa) in ('G', 'PG', 'R', 'X', 'NR')), noms number(2,0) constraint noms_check check ( nvl(noms,0) >=0 ), awrd number(2,0) constraint awrd_check check ( nvl(awrd,0) >= 0), dirnumb number(3,0), constraint dirnumb_fk foreign key (dirnumb) references director ); prompt Created table movie.; insert into movie values (1, 'Annie Hall', 1977, 'comedy', 4, 'pg', 5, 4, 1); insert into movie values (2, 'Dr. Strangelove', 1964, 'comedy', 4, 'pg', 4, 0, 5); insert into movie values (3, 'Clockwork Orange', 1971, 'sci fi', 4, 'r', 3, 0, 5); insert into movie values (4, 'North by Northwest', 1959, 'suspen', 4, 'pg', 1, 0, 2); insert into movie values (5, 'Rope', 1948, 'suspen', 3, 'nr', 0, 0, 2); insert into movie values (6, 'Psycho', 1960, 'horror', 4, 'pg', 3, 0, 2); insert into movie values (7, 'Interiors', 1978, 'drama', 3, 'pg', 3, 0, 1); insert into movie values (8, 'The Birds', 1963, 'horror', 3, 'nr', 0, 0, 2); insert into movie values (9, 'Samson and Delilah', 1949, 'religi', 2, 'nr', 1, 0, 3); insert into movie values (10, 'Guess Who`s Coming to Dinner', 1967, 'comedy', 3, 'nr', 6, 2, 4); insert into movie values (11, 'Manhattan', 1979, 'comedy', 4, 'r', 2, 0, 1); insert into movie values (12, 'Vertigo', 1958, 'suspen', 4, 'nr', 0, 0, 2); insert into movie values (13, 'Judgment at Nuremburg', 1961, 'drama', 3, 'nr', 6, 2, 4); insert into movie values (14, '2001', 1968, 'sci fi', 4, 'g', 2, 0, 5); insert into movie values (15, 'The Man With the Golden Arm', 1955, 'drama', 3, 'nr', 1, 0, 6); insert into movie values (16, 'Anatomy of a Murder', 1959, 'suspen', 4, 'nr', 4, 0, 6); insert into movie values (17, 'Inherit the Wind', 1960, 'drama', 4, 'nr', 2, 0, 4); insert into movie values (18, 'Laura', 1944, 'suspen', 4, 'nr', 3, 1, 6); insert into movie values (19, 'The Ten Commandments', 1956, 'religi', 3, 'nr', 1, 0, 3); insert into movie values (20, 'The Moon is Blue', 1953, 'comedy', 2, 'nr', 1, 0, 6); insert into movie values (21, 'Stagecoach', 1939, 'wester', 4, 'nr', 1,1,7); insert into movie values (22, 'Rear Window', 1954, 'suspen', 4, 'nr', 3, 0, 2); insert into movie values (23, 'Mogambo', 1953, 'wester', 3, 'nr', 1, 0, 7); insert into movie values (24, 'Grapes of Wrath', 1940, 'drama', 4, 'nr', 2, 2, 7); |