0

1)CREATETABLEProject(
ProjectNovarchar2(5)notnull,ProjectNamevarchar2(20),
StartDatedate,
FinishDatedate,PRIMARYKEY(ProjectNo));
2)CREATETABLEAssignment(
StaffNonumber(3)notnull,
ProgramNovarchar2(4)notnull,PRIMARYKEY(StaffNo,ProgramNo),
FOREIGNKEY(StaffNo)REFERENCESStaff(StaffNo),
FOREIGNKEY(ProgramNo)REFERENCESProgram(ProgramNo));
3)CREATETABLEStaff(
StaffNonumber(3)notnull,
StaffNamevarchar2(10),
SalGradenumber(2)CHECK(SalGradebetween1and12),
YearsExpnumber(2),
ProjectNovarchar2(5),PRIMARYKEY(StaffNo),
FOREIGNKEY(ProjectNo)REFERENCESProject(ProjectNo));
4)CREATETABLEProgram(
ProgramNovarchar2(4)notnull,
Titlevarchar2(20),
Languagevarchar2(20),PRIMARYKEY(ProgramNo),
CHECK(Languagein('VB','JAVA','ORACLE','C','XML')));

for the code above, what type of integrity constraints will be on them? (how many do u think?)


also;
i've created this code (below) but there seems to be some errors... help!

(i).INSERTINTOProjectvalues('P0305','WEBSITE','12-FEB-2005','30-MAY-2005');
(ii).INSERTINTOProjectvalues('P0305','BILLING','18-MAR-2005','19-MAR-2005');
(iii).INSERTINTOProjectvalues('P0322','SALE','10-JAN-2005','28-OCT-2005');
(iv).INSERTINTOStaffvalues(127,'JONES',2,4,'P0321');
(v).INSERTINTOStaffvalues(223,'GREEN',3,5,'P0322');
(vi).INSERTINTOStaffvalues(223,'SMITH',8,10,'P0305');
(vii).INSERTINTOStaffvalues(361,'ALLEN',5,7,'P0305');
(viii).INSERTINTOProgramvalues('A006','DATABASE','ORACLE');
(ix).INSERTINTOProgramvalues('A015','HOMEPAGE','HTML');
(x).INSERTINTOProgramvalues('A018','INTERFACE','VB');
(xi).INSERTINTOAssignmentvalues(223,'A016');
(xii).INSERTINTOAssignmentvalues(223,'A006');
(xiii).INSERTINTOAssignmentvalues(361,'A018');
(xiv).INSERTINTOAssignmentvalues(362,'A006');

can anyone help me find the errors...
thanks!

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Ezzaral
0

It won't help, since he somehow managed to drop out the spaces between words when he decided to copy/paste dump his homework on the forums.

Personally, I would just ignore it, unless he decides to clean up the code and show a bit of effort or thought on the matter.

Edited by Ezzaral: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.