a chalange
hi
someone had send to me this letter and i did not know how to solve it could anyone help me
**********
i whant to select(cname,secno,lecname,time_name,room_name) where
available_course='655455'
can u give me all the select statement
the tables r:
hint:=course MUST BE IN Available_course;
***********************************************************
Create Table Course
(
Cno varchar2 ( 7 ) Not Null ,
Cname varchar2 ( 50 ) Not Null ,
Credit_Hours number ( 3 ) Not Null ,
Constraint Course_PK Primary Key (Cno)
);
Create Table Day
(
Dno varchar2 ( 1 ) Not Null ,
Dname varchar2 ( 15 ) Not Null ,
Constraint Day_Pk Primary Key (Dno)
);
Create Table Lecturer
(
Lecno varchar2 ( 10 ) Not Null ,
Lname varchar2 ( 30 ) Not Null ,
PHD varchar2 (30) ,
Constraint Lecturer_Pk Primary Key (Lecno)
);
create table Time
(
Time_no varchar2 ( 3 ) Not Null ,
Time_name varchar2 ( 15 ) Not Null ,
Constraint Time_Pk Primary Key (Time_no)
);
Create Table Room
(
Room_no varchar2(5) Not Null ,
Room_Name varchar2(30) Not Null ,
Capacity varchar2(3) Not Null ,
Constraint Room_PK Primary Key(Room_no)
);
create table Day_Time
(
Day varchar2 ( 1 ) Not Null ,
Time varchar2 ( 3 ) Not Null ,
Constraint Day_Time_PK Primary Key(Day,Time),
Constraint Day_PF Foreign Key(Day) references
Day(Dno),
Constraint Time_PF Foreign Key(Time) references
Time(Time_no)
);
Create Table Available_Course
(
Cno varchar2 ( 7 ) Not Null,
No_sec varchar2(2),
Constraint Availabel_Course_PK Primary Key(Cno),
Constraint Available_Course_Course_FK Foreign Key(Cno) references
Course(Cno)
);
Create Table RTM
(
Lecno varchar2 ( 10 ) Not Null ,
Room_no varchar2(5) Not Null ,
Time varchar2 ( 3 ) Not Null ,
Day varchar2 ( 1 ) Not Null ,
Constraint Course_Section_PK Primary Key (Lecno,room_no),
Constraint Section_Course_Lecturer_FK Foreign Key ( Lecno ) references
Lecturer(Lecno),
Constraint Room_fk foreign key(Room_no) references room(room_no),
Constraint Section_Day_FK Foreign Key (Time,Day) references
Day_Time(Time,Day)
);
create table Section
(
Secno varchar2 ( 2 ) Not Null ,
Cno varchar2 ( 7 ) Not Null ,
Room_no varchar2(5) Not Null ,
Lecno varchar2 ( 10 ) Not Null ,
Constraint LECT_COURSE_ROOM_PK Primary Key(secno,Cno),
Constraint LECT_COURSE_ROOM_FK Foreign Key(cno) references
Available_course(cno),
Constraint LECTCOURSE_ROOM_FK Foreign Key(Room_no,lecno) references
RTM(Room_no,lecno)
);