We are going to implement the database schema that we defined in the previous section. I have chosen MySQL as the RDBMS to use in this chapter. I am assuming you have some experience working with MySQL and have both the server and client installed and running on your machine.
1. Open your text editor and put the following SQL code in a new text file:
CREATE DATABASE `acmeproducts`; USE acmeproducts; CREATE TABLE `customers` ( `id` int(11) NOT NULL auto_increment, `first_name` varchar(256) NOT NULL, `last_name` varchar(256) NOT NULL, `email_address` varchar(256) NOT NULL, `date_of_birth` datetime default NULL, `created_at` timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `email_address` (`email_address`) ) ENGINE=InnoDB; CREATE TABLE `products` ( `id` int(11) NOT NULL auto_increment, `name` varchar(256) NOT NULL, `unit_price` double NOT NULL, `created_at` timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY...