hfan_lab3 - Fall 2008 IE 332 Computing in Industrial...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Fall 2008 IE 332 Computing in Industrial Engineering Lab 3: Database using MySQL Instructions: 1. Fill out the following information: First Name: Hui Last Name: Fan Date, time: September 25, 2008 Lab group: #1 2. Download and refer to the Power Point slides used for the lab preparation lecture. 3. Open a web browser and refer to the following websites to have more technical details: http://www.w3schools.com/sql/default.asp http://dev.mysql.com/doc/refman/5.0/en/data-type-overview.html 4. Please insert your answers between questions. While answering your questions, use the 9- point BOLD "Courier" font as shown in the following example. If you fail to conform this requirement, you will have -1 point penalty. SELECT DISTINCT gender FROM student; 5. Log in to the MySQL server. 6. Write down a SQL script to create the following table in your database. Table name: student Column names Column types Not null Comments id int(11) Yes first_name varchar(255) Yes last_name varchar(255) Yes gender char(1) Yes 'M': Male, 'F': Female age int(4) No email varchar(255) No 7. Run the script you created in Step to create the 'student' TABLE in your database. 8. Copy and paste the result of "DESCRIBE student;". +------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------+--------------+------+-----+---------+-------+ | id | int(11) | NO | | | | | first_name | varchar(255) | NO | | | | | last_name | varchar(255) | NO | | | | | gender | char(1) | NO | | | | | age | int(4) | YES | | NULL | | | email | varchar(255) | YES | | NULL | | +------------+--------------+------+-----+---------+-------+ 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Fall 2008 9. Using the following SQL scripts, add records of students to the 'student' TABLE. Note that the person who made the following SQL scripts just learned how to use MySQL, so he might make some mistakes. Please correct them based on your MySQL knowledge and common sense. INSERT INTO student VALUES (100, NULL, 'Ji Soo Yi', 'M', NULL,
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/06/2010 for the course IE 332 taught by Professor Jisoo during the Spring '10 term at Punjab Engineering College.

Page1 / 5

hfan_lab3 - Fall 2008 IE 332 Computing in Industrial...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online