User Tools

Site Tools


podoc:view_film_sql_view

Database View Description of "view_film"

Name

view_film

Description

Purpose

Schema

CREATE VIEW view_film AS
  SELECT film.identifier, manufacturer.name, model, film_iso.VALUE AS iso, film_format.VALUE AS format, film.users, manufacturer.url, (access_type.VALUE) AS access_rights
    FROM film_type, film, manufacturer, film_iso, film_format, access_type
   WHERE film_type.manufacturer = manufacturer.identifier
     AND film_type.identifier = film.TYPE
     AND film_type.iso = film_iso.identifier
     AND film_type.format = film_format.identifier
     AND film.access_rights = access_type.identifier
   ORDER BY manufacturer.name, model, film_iso.VALUE;

History

Used first

Version 2.5

Used last

Still in use

Change history

= Version 2.5 =

CREATE VIEW view_film AS
  SELECT film.identifier, manufacturer.name, model, film_iso.VALUE AS iso, film_format.VALUE AS format, film.users, manufacturer.url, (access_type.VALUE) AS access_rights
    FROM film_type, film, manufacturer, film_iso, film_format, access_type
   WHERE film_type.manufacturer = manufacturer.identifier
     AND film_type.identifier = film.TYPE
     AND film_type.iso = film_iso.identifier
     AND film_type.format = film_format.identifier
     AND film.access_rights = access_type.identifier
   ORDER BY manufacturer.name, model, film_iso.VALUE;

= Version 2.27 =

DROP VIEW view_film_type;
DROP VIEW view_film;
 
INSERT INTO film_iso VALUES (NEXTVAL('film_iso_id_sequence'), '64');
ALTER TABLE film_iso ADD COLUMN value_2 INTEGER;
UPDATE film_iso SET value_2 = to_number(VALUE, '9999');
ALTER TABLE film_iso DROP COLUMN VALUE;
ALTER TABLE film_iso RENAME COLUMN value_2 TO VALUE;
 
CREATE VIEW view_film_type AS
  SELECT film_type.identifier, manufacturer.name, model, film_iso.VALUE AS iso, film_format.VALUE AS format, manufacturer.url
    FROM film_type, manufacturer, film_iso, film_format
   WHERE film_type.manufacturer = manufacturer.identifier
     AND film_type.iso = film_iso.identifier
     AND film_type.format = film_format.identifier
   ORDER BY manufacturer.name, model, film_iso.VALUE;
 
CREATE VIEW view_film AS
  SELECT film.identifier, manufacturer.name, model, film_iso.VALUE AS iso, film_format.VALUE AS format, film.users, manufacturer.url, (access_type.VALUE) AS access_rights
    FROM film_type, film, manufacturer, film_iso, film_format, access_type
   WHERE film_type.manufacturer = manufacturer.identifier
     AND film_type.identifier = film.TYPE
     AND film_type.iso = film_iso.identifier
     AND film_type.format = film_format.identifier
     AND film.access_rights = access_type.identifier
   ORDER BY manufacturer.name, model, film_iso.VALUE;
podoc/view_film_sql_view.txt · Last modified: 2007/04/20 11:38 by Luud