ER-Diagram Symbols

Above you see the atomic building blocks of the ER-Diagram: Entity Attribute Relation Carninalities (Crow’s feet notation) one, zero-or-one, zero-or-many, one-or-many, many. From Requrements to Deployment ER-Diagram This ER-Diagram is inspired by some of the tables in his sample database   Database Implementation Here are Ben Forta’s tables in PhpMyAdmin “design viewW. During implementation you… Continue reading ER-Diagram Symbols

Adminer – a lightweight alternative to PhpMyAdmin

PhpMyAdmin is powerfull but the GUI is messy. Adminer is a lightweight alternative. You have to download the files and place them in your folder. # sudo apt-get isntall adminer # sudo ln -s /usr/share/adminer/ adminer The first line will install the files. They are saved in /usr/share/adminer. Therefore we need a symbolic link to… Continue reading Adminer – a lightweight alternative to PhpMyAdmin

SQL count(): The Most Popular Cake

This post contiues the SQL tutorial on the Shire Bakery. Here we’ll So how do yo find the most popular cake in the Shire Bakery? Here’s an idea. — Show the best cookie — See: Ben Forta Chap. 16 SELECT COUNT( cakes.cake ) AS ‘popular’, cakes.cake, costumers.who FROM cakes, costumers, likes — sort out the… Continue reading SQL count(): The Most Popular Cake

SQL: Many-to-Many and One-to-Many

Here’s a short tutorial on how to solve some basic SQL cardinalities. First have a look at the ER-diagram for the database and the resulting tables in PhpMyAdmin. Many-to-Many Many to many cardinalities may be solved like this: SELECT cake, who FROM cakes, costumers, likes WHERE costumers.costumers_id = likes.costumers_id AND cakes.cakes_id = likes.cakes_id Note that… Continue reading SQL: Many-to-Many and One-to-Many

ER Diagram Solutions

Cardinalities How do you solve cardinalities such as: One to many. Many to many. Multivalue attributes. Here are some suggestions. A student drawing en ER-Diagram Two students explaining ER-Ds

Litteraturlisten

Masterprojektets litteraturliste skal naturligvis skabes via en MySQL database. Derfor var det relativt enkelt at udvikle en klasse i WordPress, der automatisk formatterer litteraturlisten. S├ądan ser klassen ud: class littList { public function BooksAnnotated() { global $wpdb; // wp db class $result = $wpdb->get_results("SELECT * FROM `Litteraturliste` ORDER BY `Author`") or trigger_error(mysql_error()); foreach($result as $row){… Continue reading Litteraturlisten