From 244f5cb930ddd208e0dc2a1741ac1c4b4f127da7 Mon Sep 17 00:00:00 2001 From: Stefan Suhren Date: Mon, 20 Apr 2015 15:23:31 +0200 Subject: Task 4 after examination --- Aufgabe04/catalog.sql | 32 ++++++++++++++++---------------- Aufgabe04/category.html | 20 ++++++++++---------- Aufgabe04/index.html | 9 ++++++--- Aufgabe04/product.html | 27 +++++++++++++++++++-------- Aufgabe04/underline.css | 4 ++++ Aufgabe04/user.html | 20 ++++++++++++-------- 6 files changed, 67 insertions(+), 45 deletions(-) create mode 100644 Aufgabe04/underline.css 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 -- diff --git a/Aufgabe04/category.html b/Aufgabe04/category.html index 5015bd0..462a678 100644 --- a/Aufgabe04/category.html +++ b/Aufgabe04/category.html @@ -3,23 +3,23 @@ Category + - Zurück - + Back

Category

-
- +
+ accesskey="d" maxlength="1000">
- -
diff --git a/Aufgabe04/index.html b/Aufgabe04/index.html index ecf747c..f123211 100644 --- a/Aufgabe04/index.html +++ b/Aufgabe04/index.html @@ -5,8 +5,11 @@ Manipulate Database - Products
- Categroy
- User
+ Products +
+ Categroy +
+ User +
\ No newline at end of file diff --git a/Aufgabe04/product.html b/Aufgabe04/product.html index 8a81303..7aa7e1c 100644 --- a/Aufgabe04/product.html +++ b/Aufgabe04/product.html @@ -3,19 +3,30 @@ Production + - Zurück + Back

Product

-
-
-
-
- +



+
- - + +
\ No newline at end of file diff --git a/Aufgabe04/underline.css b/Aufgabe04/underline.css new file mode 100644 index 0000000..bd4bfcb --- /dev/null +++ b/Aufgabe04/underline.css @@ -0,0 +1,4 @@ +@CHARSET "UTF-8"; +u { + text-decoration: underline; +} \ No newline at end of file diff --git a/Aufgabe04/user.html b/Aufgabe04/user.html index 34bd0cb..c647f51 100644 --- a/Aufgabe04/user.html +++ b/Aufgabe04/user.html @@ -3,21 +3,25 @@ User + - Zurück + Back

User


-
- -
-- cgit v1.2.3-70-g09d2