Author: paul
Date: 2007-03-07 06:14:31 +0100 (Wed, 07 Mar 2007)
New Revision: 5227
Log:
r17362@frost: paul | 2007-03-06 22:50:57 -0600
Update sakila instructions to account for recent data packaging changes.
Reformat.
Modified:
trunk/sample-data/sakila/sakila.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:21154
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:16997
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:14593
+ 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:21154
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:17362
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:14593
Modified: trunk/sample-data/sakila/sakila.xml
===================================================================
--- trunk/sample-data/sakila/sakila.xml 2007-03-06 21:39:17 UTC (rev 5226)
+++ trunk/sample-data/sakila/sakila.xml 2007-03-07 05:14:31 UTC (rev 5227)
Changed blocks: 70, Lines Added: 307, Lines Deleted: 244; 48553 bytes
@@ -10,7 +10,7 @@
<section id="sakila-introduction">
<title>Introduction</title>
-
+
<xi:include href="legalnotice.en.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<para>
@@ -19,18 +19,19 @@
</para>
<para>
- The &sampdb; sample database was developed by Mike
- Hillyer, a former member of the MySQL AB documentation team, and is intended to
- provide a standard schema that can be used for examples in books,
- tutorials, articles, samples, etc. The &sampdb; sample database
- also serves to highlight the latest features of MySQL including
- Views, Stored Procedures, Triggers, etc.
+ The &sampdb; sample database was developed by Mike Hillyer, a
+ former member of the MySQL AB documentation team, and is intended
+ to provide a standard schema that can be used for examples in
+ books, tutorials, articles, samples, etc. The &sampdb; sample
+ database also serves to highlight the latest features of MySQL
+ including Views, Stored Procedures, Triggers, etc.
</para>
<para>
The &sampdb; sample database is the result of support and feedback
from the MySQL user community and feedback and user input is
- always appreciated. Please direct all feedback to <email>docs@stripped</email>.
+ always appreciated. Please direct all feedback to
+ <email>docs@stripped</email>.
</para>
<para>
@@ -58,10 +59,11 @@
</para>
<para>
- The <literal>world</literal> sample database provides a set of tables containing
- information on the countries and cities of the world and is useful
- for basic queries, but lacks structures for testing
- MySQL-specific functionality and new features found in MySQL 5.
+ The <literal>world</literal> sample database provides a set of
+ tables containing information on the countries and cities of the
+ world and is useful for basic queries, but lacks structures for
+ testing MySQL-specific functionality and new features found in
+ MySQL 5.
</para>
<para>
@@ -89,10 +91,10 @@
<para>
After the basic schema was completed, various views, stored
- routines, and triggers were added to the schema; then the
- sample data was populated. After a series of review versions, the
- first official version of the &sampdb; sample database was
- released in March 2006.
+ routines, and triggers were added to the schema; then the sample
+ data was populated. After a series of review versions, the first
+ official version of the &sampdb; sample database was released in
+ March 2006.
</para>
</section>
@@ -102,8 +104,11 @@
<title>Installation</title>
<para>
- The &sampdb; sample database is divided into two installation
- files: <filename>sakila-schema.sql</filename> and
+ The &sampdb; sample database is available from
+ <ulink url="http://dev.mysql.com/doc/"/>. A downloadable archive
+ is available in compressed <command>tar</command> file or Zip
+ format. The archive contains two files:
+ <filename>sakila-schema.sql</filename> and
<filename>sakila-data.sql</filename>.
</para>
@@ -132,7 +137,10 @@
<para>
Extract the installation archive to a temporary location on
the MySQL server machine such as <filename>C:\temp\</filename>
- or <filename>/tmp/</filename>.
+ or <filename>/tmp/</filename>. When you unpack the archive, it
+ creates a directory named <filename>sakila-db</filename> that
+ contains the <filename>sakila-schema.sql</filename> and
+ <filename>sakila-data.sql</filename> files.
</para>
</listitem>
@@ -160,17 +168,19 @@
</para>
<programlisting>
-mysql> <userinput>SOURCE <replaceable>C:/temp/</replaceable>sakila-schema.sql;</userinput>
+mysql> <userinput>SOURCE <replaceable>C:/temp/sakila-db/</replaceable>sakila-schema.sql;</userinput>
</programlisting>
<para>
- Replace <replaceable>C:/temp/</replaceable> with the path to
- the <filename>sakila-schema.sql</filename> on the server.
+ Replace <replaceable>C:/temp/sakila-db/</replaceable> with the
+ path to the <filename>sakila-schema.sql</filename> on the
+ server.
</para>
+
<note>
<para>
- Note that on Windows you should use slashes, rather than
- backslashes, when executing the <literal>SOURCE</literal> command.
+ On Windows you should use slashes, rather than backslashes,
+ when executing the <literal>SOURCE</literal> command.
</para>
</note>
</listitem>
@@ -182,18 +192,19 @@
</para>
<programlisting>
-mysql> <userinput>SOURCE <replaceable>C:/temp/</replaceable>sakila-data.sql;</userinput>
+mysql> <userinput>SOURCE <replaceable>C:/temp/sakila-db</replaceable>sakila-data.sql;</userinput>
</programlisting>
<para>
- Replace <replaceable>C:/temp/</replaceable> with the path to
- the <filename>sakila-data.sql</filename> on the server.
+ Replace <replaceable>C:/temp/sakila-db/</replaceable> with the
+ path to the <filename>sakila-data.sql</filename> on the
+ server.
</para>
</listitem>
<listitem>
<para>
- Confirm the sample database is installed correctly:
+ Confirm that the sample database is installed correctly:
</para>
<programlisting>
@@ -322,20 +333,22 @@
<listitem>
<para>
- <literal>actor_id</literal> – Surrogate primary key used
- to uniquely identify each actor in the table.
+ <literal>actor_id</literal> – Surrogate primary key
+ used to uniquely identify each actor in the table.
</para>
</listitem>
<listitem>
<para>
- <literal>first_name</literal> – The actor's first name.
+ <literal>first_name</literal> – The actor's first
+ name.
</para>
</listitem>
<listitem>
<para>
- <literal>last_name</literal> – The actor's last name.
+ <literal>last_name</literal> – The actor's last
+ name.
</para>
</listitem>
@@ -368,34 +381,36 @@
<listitem>
<para>
- <literal>address_id</literal> – Surrogate primary key used
- to uniquely identify each address in the table.
+ <literal>address_id</literal> – Surrogate primary
+ key used to uniquely identify each address in the table.
</para>
</listitem>
<listitem>
<para>
- <literal>address</literal> – First line of an address.
+ <literal>address</literal> – First line of an
+ address.
</para>
</listitem>
<listitem>
<para>
- <literal>address2</literal> – Optional second line of an
- address.
+ <literal>address2</literal> – Optional second line
+ of an address.
</para>
</listitem>
<listitem>
<para>
- <literal>district</literal> – The region of an address,
- this may be a state, province, prefecture, etc.
+ <literal>district</literal> – The region of an
+ address, this may be a state, province, prefecture, etc.
</para>
</listitem>
<listitem>
<para>
- <literal>city_id</literal> – A foreign key pointing to the
+ <literal>city_id</literal> – A foreign key pointing
+ to the
<link
linkend="sakila-structure-tables-city">city</link>
table.
@@ -404,15 +419,15 @@
<listitem>
<para>
- <literal>postal_code</literal> – The postal code or zip
- code of the address (where applicable).
+ <literal>postal_code</literal> – The postal code or
+ zip code of the address (where applicable).
</para>
</listitem>
<listitem>
<para>
- <literal>phone</literal> – The telephone number for the
- address.
+ <literal>phone</literal> – The telephone number for
+ the address.
</para>
</listitem>
@@ -485,8 +500,8 @@
<listitem>
<para>
- <literal>city_id</literal> – Surrogate primary key used to
- uniquely identify each city in the table.
+ <literal>city_id</literal> – Surrogate primary key
+ used to uniquely identify each city in the table.
</para>
</listitem>
@@ -498,8 +513,8 @@
<listitem>
<para>
- <literal>country_id</literal> – Foreign key identifying
- the country that the city belongs to.
+ <literal>country_id</literal> – Foreign key
+ identifying the country that the city belongs to.
</para>
</listitem>
@@ -517,7 +532,8 @@
</para>
<para>
- The <literal>country</literal> table is referred to by a foreign key in the
+ The <literal>country</literal> table is referred to by a
+ foreign key in the
<link
linkend="sakila-structure-tables-city">city</link>
table.
@@ -529,14 +545,15 @@
<listitem>
<para>
- <literal>country_id</literal> – Surrogate primary key used
- to uniquely identify each country in the table.
+ <literal>country_id</literal> – Surrogate primary
+ key used to uniquely identify each country in the table.
</para>
</listitem>
<listitem>
<para>
- <literal>country</literal> – The name of the country.
+ <literal>country</literal> – The name of the
+ country.
</para>
</listitem>
@@ -572,42 +589,45 @@
<listitem>
<para>
- <literal>customer_id</literal> – Surrogate primary key
- used to uniquely identify each customer in the table.
+ <literal>customer_id</literal> – Surrogate primary
+ key used to uniquely identify each customer in the table.
</para>
</listitem>
<listitem>
<para>
- <literal>store_id</literal> – Foreign key identifying the
- customer's <quote>home store</quote>. Customers are not limited to
- renting only from this store, but this is the store they
- generally shop at.
+ <literal>store_id</literal> – Foreign key
+ identifying the customer's <quote>home store</quote>.
+ Customers are not limited to renting only from this store,
+ but this is the store they generally shop at.
</para>
</listitem>
<listitem>
<para>
- <literal>first_name</literal> – The customer's first name.
+ <literal>first_name</literal> – The customer's first
+ name.
</para>
</listitem>
<listitem>
<para>
- <literal>last_name</literal> – The customer's last name.
+ <literal>last_name</literal> – The customer's last
+ name.
</para>
</listitem>
<listitem>
<para>
- <literal>email</literal> – The customer's email address.
+ <literal>email</literal> – The customer's email
+ address.
</para>
</listitem>
<listitem>
<para>
- <literal>address_id</literal> – Foreign key identifying
- the customer's address in the
+ <literal>address_id</literal> – Foreign key
+ identifying the customer's address in the
<link
linkend="sakila-structure-tables-address">address</link>
table.
@@ -616,8 +636,8 @@
<listitem>
<para>
- <literal>active</literal> – Indicates whether the customer
- is an active customer. Setting this to
+ <literal>active</literal> – Indicates whether the
+ customer is an active customer. Setting this to
<literal>FALSE</literal> serves as an alternative to
deleting a customer outright. Most queries should have a
<literal>WHERE active = TRUE</literal> clause.
@@ -626,9 +646,10 @@
<listitem>
<para>
- <literal>create_date</literal> – The date the customer was
- added to the system. This date is automatically set using
- a trigger during an <literal>INSERT</literal>.
+ <literal>create_date</literal> – The date the
+ customer was added to the system. This date is
+ automatically set using a trigger during an
+ <literal>INSERT</literal>.
</para>
</listitem>
@@ -668,8 +689,8 @@
<listitem>
<para>
- <literal>film_id</literal> – Surrogate primary key used to
- uniquely identify each film in the table.
+ <literal>film_id</literal> – Surrogate primary key
+ used to uniquely identify each film in the table.
</para>
</listitem>
@@ -681,22 +702,22 @@
<listitem>
<para>
- <literal>description</literal> – A short description or
- plot summary of the film.
+ <literal>description</literal> – A short description
+ or plot summary of the film.
</para>
</listitem>
<listitem>
<para>
- <literal>release_year</literal> – The year in which the
- movie was released.
+ <literal>release_year</literal> – The year in which
+ the movie was released.
</para>
</listitem>
<listitem>
<para>
- <literal>language_id</literal> – Foreign key pointing at
- the
+ <literal>language_id</literal> – Foreign key
+ pointing at the
<link
linkend="sakila-structure-tables-language">language</link>
table, identified the language of the film.
@@ -705,8 +726,8 @@
<listitem>
<para>
- <literal>original_language_id</literal> – Foreign key
- pointing at the
+ <literal>original_language_id</literal> – Foreign
+ key pointing at the
<link
linkend="sakila-structure-tables-language">language</link>
table, identified the original language of the film. Used
@@ -716,38 +737,38 @@
<listitem>
<para>
- <literal>rental_duration</literal> – The period in days
- that the film is rented for.
+ <literal>rental_duration</literal> – The period in
+ days that the film is rented for.
</para>
</listitem>
<listitem>
<para>
- <literal>rental_rate</literal> – The cost to rent the film
- for the period specified in the
+ <literal>rental_rate</literal> – The cost to rent
+ the film for the period specified in the
<literal>rental_duration</literal> column.
</para>
</listitem>
<listitem>
<para>
- <literal>length</literal> – The duration of the film, in
- minutes.
+ <literal>length</literal> – The duration of the
+ film, in minutes.
</para>
</listitem>
<listitem>
<para>
- <literal>replacement_cost</literal> – The amount charged
- to the customer if the film is not returned or is returned
- in a damaged state.
+ <literal>replacement_cost</literal> – The amount
+ charged to the customer if the film is not returned or is
+ returned in a damaged state.
</para>
</listitem>
<listitem>
<para>
- <literal>rating</literal> – The rating assigned to the
- film. Can be one of: <literal>G</literal>,
+ <literal>rating</literal> – The rating assigned to
+ the film. Can be one of: <literal>G</literal>,
<literal>PG</literal>, <literal>PG-13</literal>,
<literal>R</literal> or <literal>NC-17</literal>.
</para>
@@ -755,9 +776,9 @@
<listitem>
<para>
- <literal>special_features</literal> – Lists which common
- special features are included on the DVD. Can be zero or
- more of: <literal>Trailers</literal>,
+ <literal>special_features</literal> – Lists which
+ common special features are included on the DVD. Can be
+ zero or more of: <literal>Trailers</literal>,
<literal>Commentaries</literal>, <literal>Deleted
Scenes</literal>, <literal>Behind the Scenes</literal>.
</para>
@@ -774,8 +795,9 @@
<para>
The <literal>film_actor</literal> table is used to support a
many-to-many relationship between films and actors. For each
- actor in a given film, there will be one row in the <literal>film_actor</literal>
- table listing the actor and film.
+ actor in a given film, there will be one row in the
+ <literal>film_actor</literal> table listing the actor and
+ film.
</para>
<para>
@@ -796,15 +818,15 @@
<listitem>
<para>
- <literal>actor_id</literal> – Foreign key identifying the
- actor.
+ <literal>actor_id</literal> – Foreign key
+ identifying the actor.
</para>
</listitem>
<listitem>
<para>
- <literal>film_id</literal> – Foreign key identifying the
- film.
+ <literal>film_id</literal> – Foreign key identifying
+ the film.
</para>
</listitem>
@@ -820,7 +842,8 @@
The <literal>film_category</literal> table is used to support
a many-to-many relationship between films and categories. For
each category applied to a film, there will be one row in the
- <literal>film_category</literal> table listing the category and film.
+ <literal>film_category</literal> table listing the category
+ and film.
</para>
<para>
@@ -841,15 +864,15 @@
<listitem>
<para>
- <literal>film_id</literal> – Foreign key identifying the
- film.
+ <literal>film_id</literal> – Foreign key identifying
+ the film.
</para>
</listitem>
<listitem>
<para>
- <literal>category_id</literal> – Foreign key identifying
- the category.
+ <literal>category_id</literal> – Foreign key
+ identifying the category.
</para>
</listitem>
@@ -889,8 +912,8 @@
<listitem>
<para>
- <literal>film_id</literal> – Surrogate primary key used to
- uniquely identify each film in the table.
+ <literal>film_id</literal> – Surrogate primary key
+ used to uniquely identify each film in the table.
</para>
</listitem>
@@ -902,17 +925,17 @@
<listitem>
<para>
- <literal>description</literal> – A short description or
- plot summary of the film.
+ <literal>description</literal> – A short description
+ or plot summary of the film.
</para>
</listitem>
</itemizedlist>
<para>
- The contents of the <literal>film_text</literal> table should never be modified
- directly, all changes should be made to the film table
- instead.
+ The contents of the <literal>film_text</literal> table should
+ never be modified directly, all changes should be made to the
+ film table instead.
</para>
</section>
@@ -945,22 +968,22 @@
<listitem>
<para>
- <literal>inventory_id</literal> – Surrogate primary key
- used to uniquely identify each item in inventory.
+ <literal>inventory_id</literal> – Surrogate primary
+ key used to uniquely identify each item in inventory.
</para>
</listitem>
<listitem>
<para>
- <literal>film_id</literal> – Foreign key pointing to the
- film this item represents.
+ <literal>film_id</literal> – Foreign key pointing to
+ the film this item represents.
</para>
</listitem>
<listitem>
<para>
- <literal>store_id</literal> – Foreign key pointing to the
- store stocking this item.
+ <literal>store_id</literal> – Foreign key pointing
+ to the store stocking this item.
</para>
</listitem>
@@ -991,8 +1014,8 @@
<listitem>
<para>
- <literal>language_id</literal> – Surrogate primary key
- used to uniquely identify each language.
+ <literal>language_id</literal> – Surrogate primary
+ key used to uniquely identify each language.
</para>
</listitem>
@@ -1032,8 +1055,8 @@
<listitem>
<para>
- <literal>payment_id</literal> – Surrogate primary key used
- to uniquely identify each payment.
+ <literal>payment_id</literal> – Surrogate primary
+ key used to uniquely identify each payment.
</para>
</listitem>
@@ -1055,8 +1078,8 @@
<listitem>
<para>
- <literal>rental_id</literal> – The rental that the payment
- is being applied to. This is optional because some
+ <literal>rental_id</literal> – The rental that the
+ payment is being applied to. This is optional because some
payments are for outstanding fees and may not be directly
related to a rental.
</para>
@@ -1064,14 +1087,15 @@
<listitem>
<para>
- <literal>amount</literal> – The amount of the payment.
+ <literal>amount</literal> – The amount of the
+ payment.
</para>
</listitem>
<listitem>
<para>
- <literal>payment_date</literal> – The date the payment was
- processed.
+ <literal>payment_date</literal> – The date the
+ payment was processed.
</para>
</listitem>
@@ -1086,7 +1110,8 @@
<para>
The <literal>rental</literal> table contains one row for each
rental of each inventory item with information about who
- rented what item, when it was rented, and when it was returned.
+ rented what item, when it was rented, and when it was
+ returned.
</para>
<para>
@@ -1107,15 +1132,15 @@
<listitem>
<para>
- <literal>rental_id</literal> – Surrogate primary key that
- uniquely identifies the rental.
+ <literal>rental_id</literal> – Surrogate primary key
+ that uniquely identifies the rental.
</para>
</listitem>
<listitem>
<para>
- <literal>rental_date</literal> – The date and time that the
- item was rented.
+ <literal>rental_date</literal> – The date and time
+ that the item was rented.
</para>
</listitem>
@@ -1127,15 +1152,15 @@
<listitem>
<para>
- <literal>customer_id</literal> – The customer renting the
- item.
+ <literal>customer_id</literal> – The customer
+ renting the item.
</para>
</listitem>
<listitem>
<para>
- <literal>return_date</literal> – The date and time the item
- was returned.
+ <literal>return_date</literal> – The date and time
+ the item was returned.
</para>
</listitem>
@@ -1180,22 +1205,22 @@
<listitem>
<para>
- <literal>staff_id</literal> – Surrogate primary key that
- uniquely identifies the staff member.
+ <literal>staff_id</literal> – Surrogate primary key
+ that uniquely identifies the staff member.
</para>
</listitem>
<listitem>
<para>
- <literal>first_name</literal> – The first name of the
- staff member.
+ <literal>first_name</literal> – The first name of
+ the staff member.
</para>
</listitem>
<listitem>
<para>
- <literal>last_name</literal> – The last name of the staff
- member.
+ <literal>last_name</literal> – The last name of the
+ staff member.
</para>
</listitem>
@@ -1208,7 +1233,9 @@
<listitem>
<para>
- <literal>picture</literal> – A <literal>BLOB</literal> containing a photograph of the employee.
+ <literal>picture</literal> – A
+ <literal>BLOB</literal> containing a photograph of the
+ employee.
</para>
</listitem>
@@ -1221,32 +1248,32 @@
<listitem>
<para>
- <literal>store_id</literal> – The staff member's <quote>home
- store</quote>. The employee can work at other stores but is
- generally assigned to the store listed.
+ <literal>store_id</literal> – The staff member's
+ <quote>home store</quote>. The employee can work at other
+ stores but is generally assigned to the store listed.
</para>
</listitem>
<listitem>
<para>
- <literal>active</literal> – Whether this is an active
- employee. If employees leave their rows are not deleted
- from this table, instead this column is set to
+ <literal>active</literal> – Whether this is an
+ active employee. If employees leave their rows are not
+ deleted from this table, instead this column is set to
<literal>FALSE</literal>.
</para>
</listitem>
<listitem>
<para>
- <literal>username</literal> – The username used by the
- staff member to access the rental system.
+ <literal>username</literal> – The username used by
+ the staff member to access the rental system.
</para>
</listitem>
<listitem>
<para>
- <literal>password</literal> – The password used by the
- staff member to access the rental system. The password
+ <literal>password</literal> – The password used by
+ the staff member to access the rental system. The password
should be stored as a hash using the
<function>SHA1()</function> function.
</para>
@@ -1287,8 +1314,8 @@
<listitem>
<para>
- <literal>store_id</literal> – Surrogate primary key that
- uniquely identifies the store.
+ <literal>store_id</literal> – Surrogate primary key
+ that uniquely identifies the store.
</para>
</listitem>
@@ -1301,8 +1328,8 @@
<listitem>
<para>
- <literal>address_id</literal> – Foreign key identifying
- the address of this store.
+ <literal>address_id</literal> – Foreign key
+ identifying the address of this store.
</para>
</listitem>
@@ -1332,8 +1359,10 @@
</para>
<para>
- The <literal>staff_list</literal> view incorporates data from the <literal>film</literal>, <literal>actor</literal>,
- <literal>category</literal>, <literal>film_actor</literal>, and <literal>film_category</literal> tables.
+ The <literal>staff_list</literal> view incorporates data from
+ the <literal>film</literal>, <literal>actor</literal>,
+ <literal>category</literal>, <literal>film_actor</literal>,
+ and <literal>film_category</literal> tables.
</para>
</section>
@@ -1349,8 +1378,10 @@
</para>
<para>
- The <literal>customer_list</literal> view incorporates data from the <literal>customer</literal>,
- <literal>address</literal>, <literal>city</literal>, and <literal>country</literal> tables.
+ The <literal>customer_list</literal> view incorporates data
+ from the <literal>customer</literal>,
+ <literal>address</literal>, <literal>city</literal>, and
+ <literal>country</literal> tables.
</para>
</section>
@@ -1366,8 +1397,10 @@
</para>
<para>
- The <literal>film_list</literal> view incorporates data from the <literal>film</literal>, <literal>category</literal>,
- <literal>film_category</literal>, <literal>actor</literal>, and <literal>film_actor</literal> tables.
+ The <literal>film_list</literal> view incorporates data from
+ the <literal>film</literal>, <literal>category</literal>,
+ <literal>film_category</literal>, <literal>actor</literal>,
+ and <literal>film_actor</literal> tables.
</para>
</section>
@@ -1383,21 +1416,26 @@
</para>
<para>
- The <literal>nicer_but_slower_film_list</literal> view differs from the <literal>film_list</literal>
- view in the list of actors. The lettercase of the actor names
- is adjusted so that the first letter of each name is
- capitalized, rather than have the name in all-caps.
+ The <literal>nicer_but_slower_film_list</literal> view differs
+ from the <literal>film_list</literal> view in the list of
+ actors. The lettercase of the actor names is adjusted so that
+ the first letter of each name is capitalized, rather than have
+ the name in all-caps.
</para>
<para>
- As indicated in its name, the <literal>nicer_but_slower_film_list</literal>
- performs additional processing and therefore takes longer to
- return data than the <literal>film_list</literal> view.
+ As indicated in its name, the
+ <literal>nicer_but_slower_film_list</literal> performs
+ additional processing and therefore takes longer to return
+ data than the <literal>film_list</literal> view.
</para>
<para>
- The <literal>nicer_but_slower_film_list</literal> view incorporates data from the
- <literal>film</literal>, <literal>category</literal>, <literal>film_category</literal>, <literal>actor</literal>, and <literal>film_actor</literal> tables.
+ The <literal>nicer_but_slower_film_list</literal> view
+ incorporates data from the <literal>film</literal>,
+ <literal>category</literal>, <literal>film_category</literal>,
+ <literal>actor</literal>, and <literal>film_actor</literal>
+ tables.
</para>
</section>
@@ -1418,8 +1456,11 @@
</para>
<para>
- The <literal>sales_by_film_category</literal> view incorporates data from the
- <literal>category</literal>, <literal>payment</literal>, <literal>rental</literal>, <literal>inventory</literal>, <literal>film</literal>, <literal>film_category</literal>, and
+ The <literal>sales_by_film_category</literal> view
+ incorporates data from the <literal>category</literal>,
+ <literal>payment</literal>, <literal>rental</literal>,
+ <literal>inventory</literal>, <literal>film</literal>,
+ <literal>film_category</literal>, and
<literal>category</literal> tables.
</para>
@@ -1440,8 +1481,11 @@
</para>
<para>
- The <literal>sales_by_store</literal> view incorporates data from the <literal>city</literal>,
- <literal>country</literal>, <literal>payment</literal>, <literal>rental</literal>, <literal>inventory</literal>, <literal>store</literal>, <literal>address</literal>, and <literal>staff</literal>
+ The <literal>sales_by_store</literal> view incorporates data
+ from the <literal>city</literal>, <literal>country</literal>,
+ <literal>payment</literal>, <literal>rental</literal>,
+ <literal>inventory</literal>, <literal>store</literal>,
+ <literal>address</literal>, and <literal>staff</literal>
tables.
</para>
@@ -1457,8 +1501,9 @@
</para>
<para>
- The <literal>staff_list</literal> view incorporates data from the <literal>staff</literal> and
- <literal>address</literal> tables.
+ The <literal>staff_list</literal> view incorporates data from
+ the <literal>staff</literal> and <literal>address</literal>
+ tables.
</para>
</section>
@@ -1475,7 +1520,8 @@
</para>
<para>
- All parameters listed are <literal>IN</literal> parameters unless listed otherwise.
+ All parameters listed are <literal>IN</literal> parameters
+ unless listed otherwise.
</para>
<section id="sakila-structure-procedures-film_in_stock">
@@ -1496,24 +1542,25 @@
<listitem>
<para>
- <literal>p_film_id</literal> – The ID of the film to be
- checked, from the <literal>film_id</literal> column of the
- <literal>film</literal> table.
+ <literal>p_film_id</literal> – The ID of the film to
+ be checked, from the <literal>film_id</literal> column of
+ the <literal>film</literal> table.
</para>
</listitem>
<listitem>
<para>
- <literal>p_store_id</literal> – The ID of the store to
- check for, from the <literal>store_id</literal> column of
- the <literal>store</literal> table.
+ <literal>p_store_id</literal> – The ID of the store
+ to check for, from the <literal>store_id</literal> column
+ of the <literal>store</literal> table.
</para>
</listitem>
<listitem>
<para>
- <literal>p_film_count</literal> – An <literal>OUT</literal> parameter that
- returns a count of the copies of the film in stock.
+ <literal>p_film_count</literal> – An
+ <literal>OUT</literal> parameter that returns a count of
+ the copies of the film in stock.
</para>
</listitem>
@@ -1573,24 +1620,25 @@
<listitem>
<para>
- <literal>p_film_id</literal> – The ID of the film to be
- checked, from the <literal>film_id</literal> column of the
- <literal>film</literal> table.
+ <literal>p_film_id</literal> – The ID of the film to
+ be checked, from the <literal>film_id</literal> column of
+ the <literal>film</literal> table.
</para>
</listitem>
<listitem>
<para>
- <literal>p_store_id</literal> – The ID of the store to
- check for, from the <literal>store_id</literal> column of
- the <literal>store</literal> table.
+ <literal>p_store_id</literal> – The ID of the store
+ to check for, from the <literal>store_id</literal> column
+ of the <literal>store</literal> table.
</para>
</listitem>
<listitem>
<para>
- <literal>p_film_count</literal> – An <literal>OUT</literal> parameter that
- returns a count of the copies of the film not in stock.
+ <literal>p_film_count</literal> – An
+ <literal>OUT</literal> parameter that returns a count of
+ the copies of the film not in stock.
</para>
</listitem>
@@ -1645,9 +1693,9 @@
<listitem>
<para>
- <literal>min_monthly_purchases</literal> – The minimum
- number of purchases or rentals a customer needed to make in
- the last month to qualify.
+ <literal>min_monthly_purchases</literal> – The
+ minimum number of purchases or rentals a customer needed
+ to make in the last month to qualify.
</para>
</listitem>
@@ -1661,9 +1709,9 @@
<listitem>
<para>
- <literal>count_rewardees</literal> – An <literal>OUT</literal> parameter that
- returns a count of the customers who met the
- qualifications specified.
+ <literal>count_rewardees</literal> – An
+ <literal>OUT</literal> parameter that returns a count of
+ the customers who met the qualifications specified.
</para>
</listitem>
@@ -1731,17 +1779,18 @@
<listitem>
<para>
- <literal>p_customer_id</literal> – The ID of the customer
- to check, from the <literal>customer_id</literal> column
- of the <literal>customer</literal> table.
+ <literal>p_customer_id</literal> – The ID of the
+ customer to check, from the <literal>customer_id</literal>
+ column of the <literal>customer</literal> table.
</para>
</listitem>
<listitem>
<para>
- <literal>p_effective_date</literal> – The cutoff date for
- items that will be applied to the balance. Any
- rentals, payments, and so forth after this date are not counted.
+ <literal>p_effective_date</literal> – The cutoff
+ date for items that will be applied to the balance. Any
+ rentals, payments, and so forth after this date are not
+ counted.
</para>
</listitem>
@@ -1774,8 +1823,8 @@
<para>
The <literal>inventory_held_by_customer</literal> function
- returns the <literal>customer_id</literal> of the customer who has rented out the
- specified inventory item.
+ returns the <literal>customer_id</literal> of the customer who
+ has rented out the specified inventory item.
</para>
<bridgehead>Parameters</bridgehead>
@@ -1794,8 +1843,9 @@
<bridgehead>Return Values</bridgehead>
<para>
- This functions returns the <literal>customer_id</literal> of the customer who is
- currently renting the item, or <literal>NULL</literal> if the item is in stock.
+ This functions returns the <literal>customer_id</literal> of
+ the customer who is currently renting the item, or
+ <literal>NULL</literal> if the item is in stock.
</para>
<bridgehead>Sample Usage</bridgehead>
@@ -1846,8 +1896,9 @@
<bridgehead>Return Values</bridgehead>
<para>
- This function returns <literal>TRUE</literal> or <literal>FALSE</literal>, depending on whether the
- item specified is in stock.
+ This function returns <literal>TRUE</literal> or
+ <literal>FALSE</literal>, depending on whether the item
+ specified is in stock.
</para>
<bridgehead>Sample Usage</bridgehead>
@@ -1888,8 +1939,9 @@
<para>
The <literal>customer_create_date</literal> trigger sets the
- <literal>create_date</literal> column of the <literal>customer</literal> table to the current time
- and date as rows are inserted.
+ <literal>create_date</literal> column of the
+ <literal>customer</literal> table to the current time and date
+ as rows are inserted.
</para>
</section>
@@ -1900,8 +1952,9 @@
<para>
The <literal>payment_date</literal> trigger sets the
- <literal>payment_date</literal> column of the <literal>payment</literal> table to the current time
- and date as rows are inserted.
+ <literal>payment_date</literal> column of the
+ <literal>payment</literal> table to the current time and date
+ as rows are inserted.
</para>
</section>
@@ -1912,8 +1965,9 @@
<para>
The <literal>rental_date</literal> trigger sets the
- <literal>rental_date</literal> column of the <literal>rental</literal> table to the current time and
- date as rows are inserted.
+ <literal>rental_date</literal> column of the
+ <literal>rental</literal> table to the current time and date
+ as rows are inserted.
</para>
</section>
@@ -1923,8 +1977,10 @@
<title>The ins_film Trigger</title>
<para>
- The <literal>ins_film</literal> trigger duplicates all <literal>INSERT</literal>
- operations on the <literal>film</literal> table to the <literal>film_text</literal> table.
+ The <literal>ins_film</literal> trigger duplicates all
+ <literal>INSERT</literal> operations on the
+ <literal>film</literal> table to the
+ <literal>film_text</literal> table.
</para>
</section>
@@ -1934,8 +1990,10 @@
<title>The upd_film Trigger</title>
<para>
- The <literal>upd_film</literal> trigger duplicates all <literal>UPDATE</literal>
- operations on the <literal>film</literal> table to the <literal>film_text</literal> table.
+ The <literal>upd_film</literal> trigger duplicates all
+ <literal>UPDATE</literal> operations on the
+ <literal>film</literal> table to the
+ <literal>film_text</literal> table.
</para>
</section>
@@ -1945,8 +2003,10 @@
<title>The del_film Trigger</title>
<para>
- The <literal>del_film</literal> trigger duplicates all <literal>DELETE</literal>
- operations on the <literal>film</literal> table to the <literal>film_text</literal> table.
+ The <literal>del_film</literal> trigger duplicates all
+ <literal>DELETE</literal> operations on the
+ <literal>film</literal> table to the
+ <literal>film_text</literal> table.
</para>
</section>
@@ -2005,9 +2065,10 @@
<bridgehead>Return a DVD</bridgehead>
<para>
- To return a DVD, we update the <literal>rental</literal> table and set the return
- date. To do this, we first need to identify the <literal>rental_id</literal> to
- update based on the <literal>inventory_id</literal> of the item being returned.
+ To return a DVD, we update the <literal>rental</literal> table and
+ set the return date. To do this, we first need to identify the
+ <literal>rental_id</literal> to update based on the
+ <literal>inventory_id</literal> of the item being returned.
Depending on the situation we may then need to check the customer
balance and perhaps process a payment for overdue fees by
inserting a row into the <literal>payment</literal> table.
@@ -2049,10 +2110,11 @@
</para>
<para>
- To create such a list, we search the <literal>rental</literal> table for films with a
- return date that is <literal>NULL</literal> and where the rental date is further in
- the past than the rental duration specified in the <literal>film</literal> table. If
- so, the film is overdue and we should return the name of the film
+ To create such a list, we search the <literal>rental</literal>
+ table for films with a return date that is <literal>NULL</literal>
+ and where the rental date is further in the past than the rental
+ duration specified in the <literal>film</literal> table. If so,
+ the film is overdue and we should return the name of the film
along with the customer name and phone number.
</para>
@@ -2095,19 +2157,19 @@
<listitem>
<para>
- <literal>Roland Bouman</literal>,
- certification developer at MySQL AB
- <ulink url="http://rpbouman.blogspot.com/">Author</ulink> –
- Provided valuable feedback throughout the development process,
- contributed sample views and stored procedures.
+ <literal>Roland Bouman</literal>, certification developer at
+ MySQL AB
+ <ulink url="http://rpbouman.blogspot.com/">Author</ulink>
+ – Provided valuable feedback throughout the development
+ process, contributed sample views and stored procedures.
</para>
</listitem>
<listitem>
<para>
<literal>Ronald Bradford</literal>,
- <ulink url="http://blog.arabx.com.au/">Developer</ulink> at MySQL AB
- – Developed
+ <ulink url="http://blog.arabx.com.au/">Developer</ulink> at
+ MySQL AB – Developed
<ulink url="http://sakila.arabx.com.au/index.htm">first sample
application</ulink> for use with the &sampdb; sample database.
</para>
@@ -2127,10 +2189,11 @@
<listitem>
<para>
<literal>Giuseppe Maxia</literal>, former CTO of
- <ulink url="http://www.stardata.it//index_en.html">Stardata</ulink>, now QA developer at MySQL AB
- – Provided valuable feedback throughout the development
- process, populated some of the sample data, provided some of
- the sample views and triggers.
+ <ulink url="http://www.stardata.it//index_en.html">Stardata</ulink>,
+ now QA developer at MySQL AB – Provided valuable
+ feedback throughout the development process, populated some of
+ the sample data, provided some of the sample views and
+ triggers.
</para>
</listitem>
@@ -2138,7 +2201,7 @@
<para>
<literal>Jay Pipes</literal>,
<ulink url="http://www.jpipes.com/">MySQL community
- advocate</ulink> – Provided some of the sample stored
+ advocate</ulink> – Provided some of the sample stored
procedures.
</para>
</listitem>
@@ -2148,8 +2211,8 @@
<literal>Zak Greant</literal>,
<ulink
url="http://zak.greant.com">Community
- advocate and author</ulink> – Provided advice and feedback on
- licensing.
+ advocate and author</ulink> – Provided advice and
+ feedback on licensing.
</para>
</listitem>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r5227 - in trunk: . sample-data/sakila | paul | 7 Mar |