I still not having the code, I want to know how many feilds I need for developing an attendance form I tried to develop it and I create tables i can show you an example of that
Drop table Student CASCADE CONSTRAINTS;
Drop table Class CASCADE CONSTRAINTS;
Drop table Teacher CASCADE CONSTRAINTS;
Drop table Teacher_Class CASCADE CONSTRAINTS;
Drop table Main CASCADE CONSTRAINTS;
Drop table Attendance CASCADE CONSTRAINTS;
Drop table Period CASCADE CONSTRAINTS;
Create table Student
(st_cpr_no number(9) primary key,
st_f_name varchar(25), st_s_name varchar2(25),
st_m_name varchar2(25), st_l_name varchar2(25),
st_address varchar2(30),
st_phone_no number(8),
st_nationality varchar2(30),
st_dob date,
st_j_date date);
COMMIT;
Create table Teacher
(t_cpr_no number(9) primary key,
t_name varchar2(25),
t_address varchar2(30),
t_phone_no number(8),
t_nationality varchar2(30));
COMMIT;
Create table Class
(class_id number(1) primary key,
class_name varchar2(25));
COMMIT;
Create table Teacher_Class
(t_cpr_no number(9), class_id number(1),
FOREIGN KEY (t_cpr_no) REFERENCES teacher(t_cpr_no) on delete cascade,
FOREIGN KEY (class_id) REFERENCES class(class_id),
PRIMARY KEY (t_cpr_no, class_id));
COMMIT;
Create table Period
(period_id number(4) primary key,
class_id number(1) constraint fk_classid references class(class_id),
t_cpr_no number(9) constraint fk_tcpr references teacher(t_cpr_no));
COMMIT;
Create table Main
(st_cpr_no number(9) references student(st_cpr_no),
class_id number(1) references class(class_id),
date_d date,
constraint pr2_key primary key(st_cpr_no, class_id));
COMMIT;
Create table Attendance
(st_cpr_no number(9)
CONSTRAINT st_cpr_no_nn not null,
absent_late varchar2(7),
CONSTRAINT absent_late_chk
check ( absent_late in ('Absent','Late','Present')),
constraint st_cpr_pk primary key (st_cpr_no));
COMMIT;
Insert into student values
(921007314,'Hanan','Hussain','Ahmed','Sarhan',
'Hamad Town 1425A', 17443496,'Bahraini',
'27-Oct-92','16-Sep-98');
COMMIT;
Insert into student values
(930607314, 'Layla','Ahmed','Mansoor','Salim',
'Isa Town 125', 17689866, 'Bahraini',
'27-Jun-1993','10-Sep-1999');
COMMIT;
Insert into class values(1,'First Primary');
Insert into class values(2,'Second Primary');
Insert into class values(3,'Third Primary');
Insert into class values(4,'Forth Primary');
Insert into class values(5,'Fifth Primary');
Insert into class values(6,'Sixth Primary');
Insert into class values(7,'First Intermediate');
Insert into class values(8, 'Second Intermediate');
Insert into class values(9,'Third Intermedaite');
COMMIT;
Insert into teacher values
(752036584, 'Sameeha Ahmed');
Insert into teacher values
(780703050, 'Amal Al Muraisi');
Insert into teacher values
(610045264, 'Juhaina Eid');
COMMIT;
I want to create a form in (oracle9i form developer), my question, is all that tables I need? and which one I can use to make attendance form that includes class id that when I choose it the student number and name should appear to me and from there I can choose from a combo to decide if this student present, absent or lat) can you show me how to do it?
thanks alot