Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\ICI MAKATI>mysql -h localhost -u root -p Enter password: **** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 5.5.8 MySQL Community Server (GPL) Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | realtraining | | schsystem | | test | | unique_keys | +--------------------+ 7 rows in set (0.00 sec) mysql> drop database if exists schsystem; Query OK, 0 rows affected (0.00 sec) mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | realtraining | | test | | unique_keys | +--------------------+ 6 rows in set (0.00 sec) mysql> create database schsystem; Query OK, 1 row affected (0.00 sec) mysql> use schsystem; Database changed mysql> create table course -> (id char(36) not null, -> course_code char(10), -> course_description varchar(30), -> outline text, -> std_price double); Query OK, 0 rows affected (0.06 sec) mysql> create table student -> (id char (30) not null, -> l_name varchar(20) not null, -> f_name varchar(20), -> m_name varchar(20)); Query OK, 0 rows affected (0.06 sec) mysql> create table sale -> (id char(36) not null, -> sale_date datetime not null, -> student_id char(36) not null, -> course_id char(36) not null, -> price_sold double); Query OK, 0 rows affected (0.05 sec) mysql> show tables; +---------------------+ | Tables_in_schsystem | +---------------------+ | course | | sale | | student | +---------------------+ 3 rows in set (0.00 sec) mysql> describe course; +--------------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------------+-------------+------+-----+---------+-------+ | id | char(36) | NO | | NULL | | | course_code | char(10) | YES | | NULL | | | course_description | varchar(30) | YES | | NULL | | | outline | text | YES | | NULL | | | std_price | double | YES | | NULL | | +--------------------+-------------+------+-----+---------+-------+ 5 rows in set (0.00 sec) mysql> describe student; +--------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------+-------------+------+-----+---------+-------+ | id | char(30) | NO | | NULL | | | l_name | varchar(20) | NO | | NULL | | | f_name | varchar(20) | YES | | NULL | | | m_name | varchar(20) | YES | | NULL | | +--------+-------------+------+-----+---------+-------+ 4 rows in set (0.00 sec) mysql> describe sale; +------------+----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------+----------+------+-----+---------+-------+ | id | char(36) | NO | | NULL | | | sale_date | datetime | NO | | NULL | | | student_id | char(36) | NO | | NULL | | | course_id | char(36) | NO | | NULL | | | price_sold | double | YES | | NULL | | +------------+----------+------+-----+---------+-------+ 5 rows in set (0.00 sec) mysql>