This project must be done individually. No copying is permitted. This is the first project from a series of three. You are going to build a database application in three stages:
You need to use phpMyAdmin to manage your database from a web browser. Open https://omega.uta.edu/myadmin/ in a web browser. You should be prompted for a username and password. Enter the username and password you use to log in to your MySQL database. If you require assistance with phpMyAdmin, please contact the OIT Computing Helpdesk. There is online documentation available from this web page. On the left-side menu, select the database under your user name. Then you can create new tables by specifying the table name and number of rows. Recall that each table must have exactly one primary key, which may consist of more than one attributes. To specify that an attribute is a foreign key, you go to the Structure menu of the table and select "Relation view". Then you edit the Internal Relations, which are basically the foreign keys.
Create your CheapBook database using phpMyAdmin based on the following schema:
Author ( ssn, name, address, phone ) info about a book author Book ( ISBN, title, year, price, publisher ) info about a book WrittenBy ( ssn, ISBN ) relates books with authors Warehouse ( warehouseCode, name, address, phone ) info about a warehouse Stocks ( ISBN, warehouseCode, number ) what books a warehouse stocks Customer ( customerName, address, email, phone ) info about a customer ShoppingBasket ( basketID, customerName ) relates customers with baskets Contains ( ISBN, basketID, number ) the content of a shopping basket ShippingOrder ( ISBN, warehouseCode, customerName, number ) books shipped from a warehouse to a customerIn this schema, foreign keys have the same name as the primary keys they reference. Then insert some data into the tables. Each table should contain at least four rows. Try to write your data in such way that you can get meaningful answers for various queries (such as "For each book, print the book ISBN, title, and price, along with the total number of copies of this book stocked in all warehouses"). You should declare all keys and foreign keys in your schema.
You must handin your relational schema as follows. From the phpMyAdmin, select your database and then select Export. Note that this exports the entire database, not a single table. From the Export form, check the Relations box at the "Add into comments" menu and the "Save as file" box at the bottom. Then push Go and save your file (the filename should be your username .sql). Then you use the following form to submit this file electronically. You may submit it as many times as you like, but only the most recently submitted file will be retained and evaluated.
Last modified: 09/24/10 by Leonidas Fegaras