Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Assignment no.

a. Add a new column CGPA into the STUDENT’s table. The datatype should be
number(5,2).

b. Insert the data below into the appropriate tables.

DEPARTMENT DeptNo DeptName Location Lect_No


10 Computer Science Building 01
11 Information System Building 02
12 Electrical Engineering Building 21

LECTURER LectNo Name Research DeptNo


101 Dr. Abdullah Networking 10
102 Jones Trevor Software Engineering 10
103 Maria Ali Database 11
104 David Lim Wireless Technology 10
105 Dr Ahmad Kamil E-commerce 11
106 Dr Ibrahim Knowledge Management 11
107 Dr Dayang Masni Multimedia 10
108 Syarifah Aleya G.I.S 11
109 Dr Simon Expert System 10
110 Dr Md Noor Robotics 12

STUDENT StudentID Name Age Degree DeptNo CGPA


1001 Jamal Johari 21 Knowledge Management 11 3.24
1002 Maria Ahmad 22 e-Commerce 11 3.00
1003 Ali Ibrahim 21 Knowledge Management 11 2.89
1004 Siti Fatimah 20 Advanced Database 12 3.79
1005 Kathy Moon 23 e-Commerce 12 1.99
1006 David Hay 21 Graphic 10 1.85
1007 Abdullah Ali 20 Software Engineering 10 3.80
1008 Chan Hooi 24 Graphic 10 2.88
1009 Albert Tan 21 Graphic 10 3.75
1010 Aleya Ali 20 Software Engineering 10 3.12

PROJECT ProjNo ProjTitle Startdate Enddate Budget LectNo Sponsor


1 Network Security 01-Aug-10 01-Jan-11 20000 104 MOSTI
Database
2 15-Jun-10 15-Dec-10 3000 108 INTEL
Survivability
3 Virtual Reality 02-Oct-10 01-Feb-11 4800 105 IBM
4 Mobile Application 01-Sep-10 01-Dec-11 15000 101 e-SCIENCE

STUDENTPROJECT ProjectNo StudentID


1 1001
1 1010
1 1003
2 1001
2 1005
2 1006
3 1007
3 1008
4 1002

c. Using the UPDATE statement, assign the lecturer below as the head of
department (lect_no) for their respective departments.
 Dr. Abdullah – Computer Science department
 Dr Ahmad Kamil – Information System department
 Dr Md Noor – Electrical Engineering department

d. Change the department name of department 10 to ‘Information


Technology’.

e. A student named, Kathy Moon has been dismissed from the university.
Remove her records and also her associated records from the database.

f. MOSTI agrees to increase the sponsor to 30% for the ‘Network Security’
project. Change the budget amount in the table.

g. Change the project budget to 8000 for all projects with a budget less than
5000.

Note:use link below for sql queries


https://www.w3schools.com/sql/sql_create_db.asp

You might also like