Database Management (Tutorial 1)
Database Management (Tutorial 1)
Tutorial 1
Discussion:
Please answer all these questions and pass up to your respective tutor into the following
tutorial class.
Database Practical:
Start up the Command Centre and make sure that it is set up to use semicolon as the
statement termination character (just like Tutorial 2) and create a new script that does the
following:
Enter yourself and 10 other people into the database. If you can't find out information
about 10 other real people it's OK to make up imaginary people. Give yourself the P_IC 0
and the other people P_IC 1 to 10. Remember that P_IC should be NOT NULL. The
default year format is YYYY-MM-DD.
3. Make sure that there are some people in your database who have the same state as
you and have the same religion as you and are younger than you. (This is so that
question 7 will have some visible results.)
Example of data:
p_ic p_name p_hometown p_state p_religion p_birthday
0 Jessie Shah Alam Selangor Christian 1980-06-
02
1 Bala Krishnan Ipoh Perak Hindu 1982-01-
01
2 Munir Mohd Amin Taiping Perak Muslim
1981-09-07
3 Chua Ah Kow Sungai Petani Kedah Buddhist
1980-01-02
4 P. Pandian Dengkil Selangor Hindu
1979-12-25
5 Dadala Ratnam Petaling Jaya Selangor Christian 1982-01-
05
6 Faruq Tariq Simpang Tiga Kedah Muslim
1981-09-30
7 Marina Matthew Kelang Selangor Christian 1982-07-
22
8 Phua Chu Kang Katong Singapore Christian 1966-08-
20
9 Gurmit Singh Sepang Selangor Sikh 1980-08-
20
10 Ng Faye Faye Cheras Selangor Buddhist 1982-02-
03
Useful query:
1. Type in the command to show the birthdays, names, and hometowns of all the
people in your database who are were born before 1 January 1981.