Fig. 2 Fig. 3 Lab Exercise 1 – Prepare the database Step1: Get your MySQL account, if you do not have one, at . It takes up to one working day for CS technical office to activate your account. Step2: Log in to MySQL using phpMyAdmin. 1. Go to . 2. Log in using your MySQL account, and select the server, sophia. We will use the MySQL database hosted in sophia.cs.hku.hk.
Step3: Select your database. After login, select your database on the left column. Your database should be named as your CSID. Step4: Create tables and records. Click the SQL tab and execute the SQL statements for creating necessary tables and inserting data for this lab exercise. create table attendanceList ( id int not null primary key auto_increment, studentname varchar(256), major varchar(256), course varchar(256), coursedate DATE, attendOrNot varchar(7) not null default 'PRESENT' ); insert into attendanceList values(1,'Alice', 'BEng', 'COMP3322', '2017-10-05', 'PRESENT');
You've reached the end of your free preview.
Want to read all 8 pages?