diff options
Diffstat (limited to 'Aufgabe04/catalog.sql')
| -rw-r--r-- | Aufgabe04/catalog.sql | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Aufgabe04/catalog.sql b/Aufgabe04/catalog.sql index a149a4f..0a0941b 100644 --- a/Aufgabe04/catalog.sql +++ b/Aufgabe04/catalog.sql @@ -3,7 +3,7 @@ -- http://www.phpmyadmin.net -- -- Host: localhost --- Erstellungszeit: 13. Apr 2015 um 11:33 +-- Erstellungszeit: 20. Apr 2015 um 12:45 -- Server-Version: 10.0.17-MariaDB-log -- PHP-Version: 5.6.7 @@ -27,9 +27,9 @@ SET time_zone = "+00:00"; -- CREATE TABLE IF NOT EXISTS `category` ( - `id` int(11) NOT NULL, - `name` varchar(100) NOT NULL, - `description` varchar(1000) DEFAULT NULL + `id` int(11) NOT NULL COMMENT 'The primary key of the category.', + `name` varchar(100) NOT NULL COMMENT 'The name of the category.', + `description` varchar(1000) DEFAULT NULL COMMENT 'The description of the category.' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -39,12 +39,12 @@ CREATE TABLE IF NOT EXISTS `category` ( -- CREATE TABLE IF NOT EXISTS `product` ( - `id` int(11) NOT NULL, - `name` varchar(100) NOT NULL, - `price` int(11) NOT NULL, - `width` int(11) NOT NULL, - `height` int(11) NOT NULL, - `description` varchar(1000) DEFAULT NULL + `id` int(11) NOT NULL COMMENT 'The primary key for the table.', + `name` varchar(100) NOT NULL COMMENT 'The name of the product.', + `price` decimal(10,2) NOT NULL COMMENT 'The price of the product in euro (VAT included).', + `width` int(11) NOT NULL COMMENT 'The width of the product in millimeter.', + `height` int(11) NOT NULL COMMENT 'The height of the product in millimeter.', + `description` varchar(1000) DEFAULT NULL COMMENT 'The description of the product.' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -54,8 +54,8 @@ CREATE TABLE IF NOT EXISTS `product` ( -- CREATE TABLE IF NOT EXISTS `product_category` ( - `product_id` int(11) NOT NULL, - `category_id` int(11) NOT NULL + `product_id` int(11) NOT NULL COMMENT 'The product_id from the product table.', + `category_id` int(11) NOT NULL COMMENT 'The category_id from the category table.' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -65,8 +65,8 @@ CREATE TABLE IF NOT EXISTS `product_category` ( -- CREATE TABLE IF NOT EXISTS `user` ( - `username` varchar(100) NOT NULL, - `password` char(40) NOT NULL + `username` varchar(100) NOT NULL COMMENT 'The username of the user.', + `password` char(40) NOT NULL COMMENT 'The password of the user. (sha-1)' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- @@ -106,12 +106,12 @@ ALTER TABLE `user` -- AUTO_INCREMENT für Tabelle `category` -- ALTER TABLE `category` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'The primary key of the category.'; -- -- AUTO_INCREMENT für Tabelle `product` -- ALTER TABLE `product` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'The primary key for the table.'; -- -- Constraints der exportierten Tabellen -- |
