podoc:view_film_sql_view
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
podoc:view_film_sql_view [2007/04/13 09:08] – Luud | podoc:view_film_sql_view [2007/04/20 15:38] (current) – Luud | ||
---|---|---|---|
Line 11: | Line 11: | ||
=== Schema === | === Schema === | ||
- | | + | <code sql> |
- | select film.identifier, | + | create view view_film as |
- | from film_type, film, manufacturer, | + | select film.identifier, |
- | | + | from film_type, film, manufacturer, |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
+ | | ||
+ | </ | ||
=== Related tables === | === Related tables === | ||
Line 29: | Line 31: | ||
* [[film_type sql table|film_type]] | * [[film_type sql table|film_type]] | ||
* [[manufacturer sql table|manufacturer]] | * [[manufacturer sql table|manufacturer]] | ||
- | |||
- | === Related indexes === | ||
- | |||
- | === Related functions === | ||
- | |||
- | === Related sequences === | ||
=== History === | === History === | ||
Line 50: | Line 46: | ||
= Version 2.5 = | = Version 2.5 = | ||
- | | + | <code sql> |
- | select film.identifier, | + | create view view_film as |
- | from film_type, film, manufacturer, | + | select film.identifier, |
- | | + | from film_type, film, manufacturer, |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | order by manufacturer.name, | + | |
+ | order by manufacturer.name, | ||
+ | </ | ||
+ | |||
+ | = Version 2.27 = | ||
+ | |||
+ | <code sql> | ||
+ | drop view view_film_type; | ||
+ | drop view view_film; | ||
+ | |||
+ | insert into film_iso values (nextval(' | ||
+ | alter table film_iso add column value_2 integer; | ||
+ | update film_iso set value_2 = to_number(value, | ||
+ | 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, | ||
+ | from film_type, manufacturer, | ||
+ | where film_type.manufacturer = manufacturer.identifier | ||
+ | and film_type.iso = film_iso.identifier | ||
+ | and film_type.format = film_format.identifier | ||
+ | order by manufacturer.name, | ||
+ | |||
+ | create view view_film as | ||
+ | select film.identifier, | ||
+ | from film_type, film, manufacturer, | ||
+ | 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, | ||
+ | </ | ||
podoc/view_film_sql_view.txt · Last modified: 2007/04/20 15:38 by Luud