Hi Kobus,
This can be done in many ways, one simple method below
Input :
insert into patient values (1,'S','Jagan');
insert into patient values(2,'S','Madhan');
insert into patient values(3,'S','Vijay');
insert into patient values(4,'R','Ramu');
Insert into Appointment values(1, '2010-10-01',...