Exercises


1:

Write SQL statements to create a database with the following schema:

customer( customerID , customerName, customerAddress)

order( orderID , orderDate, graphics/04inl05.gif )

orderItem( graphics/04inl06.gif , graphics/04inl07.gif , itemQuantity)

item( itemID , itemName)

You may make any assumptions you like about data types.

Test your statements in MySQL and view the resulting tables using SHOW and DESCRIBE .

2:

We would now like to add a notes field, which you may assume is of type TEXT , to each order in the orders table. Use an ALTER TABLE statement to achieve this, and check your result with a DESCRIBE statement.

3:

Drop the order database.




MySQL Tutorial
MySQL Tutorial
ISBN: 0672325845
EAN: 2147483647
Year: 2003
Pages: 261

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net