Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2004
    Posts
    3

    Unanswered: Displaying timetable data on oracle forms

    I am trying to develop a timetable system for a university. I was wondering if it is possible to display a timetable for all students on oracle forms. Obviously each student will have a different timetable depending on what classes they enroll. I know how to extract the data I want but I am just having problems displaying it in a timetable format. Anyone would any suggestions on how I can approach this problem? All help will be appreciated. Thanks in advance
    Last edited by g_0010662; 11-13-04 at 20:01.

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    You could use a view to denormalise the data into the required format, so that it looks something like this:
    Code:
    select start, end, day1_activity Mon, day2_activity Tue, day3_activity Wed, day4_activity Thu, day5_activity Fri
    from timetable
    where student = :s
    and week_ending_date = :w;
    
    Start End   Mon         Tue         Wed         Thu         Fri
    ----- ----- ----------- ----------- ----------- ----------- ------------
    09:00 10:00 Maths       Physics     Maths       Maths       Physics
    10:00 11:00             Physics     Maths       Physics
    ...

  3. #3
    Join Date
    Oct 2004
    Posts
    3
    These are just a couple of the main tables in my application.

    CREATE TABLE module_group
    (GROUP_CODE CHAR(10),
    CLASS_TYPE CHAR(5),
    CRN CHAR(10),
    LECTURER_ID CHAR(8),
    START_TIME VARCHAR2(10),
    END_TIME VARCHAR2(10),
    SCHEDULED_DAY CHAR(10),
    ROOM_NUMBER CHAR(20),
    curr_enrol NUMBER(4),
    max_enrol NUMBER(4),
    CONSTRAINT module_group_pk PRIMARY KEY(group_code, class_type, crn),
    CONSTRAINT module_group_crn_fk FOREIGN KEY(crn) REFERENCES module_delivery(crn),
    CONSTRAINT module_group_lec_id_fk FOREIGN KEY(lecturer_id) REFERENCES lecturer(lecturer_id),
    CONSTRAINT module_group_room_id_fk FOREIGN KEY(room_number) REFERENCES room(room_number));


    CREATE TABLE student_module_group
    (STUDENT_ID CHAR(8),
    CRN CHAR(10),
    GROUP_CODE CHAR(10),
    CLASS_TYPE CHAR(5),
    CONSTRAINT student_module_group_pk PRIMARY KEY(student_id, crn, group_code, class_type),
    CONSTRAINT student_module_group_sid_fk FOREIGN KEY(student_id) REFERENCES student(student_id),
    CONSTRAINT student_module_group_fk FOREIGN KEY(group_code, class_type, crn) REFERENCES module_group(group_code, class_type, crn));

    Thanks for your advice but basically I want to develop a form from the module group table. I want this application to be able to display a specific student's modules they are taking and the day and time. This is a university application. I was thinking of a grid such as:

    09:00 10:00 11:00 12:00 13:00 14:00 15:00
    Monday ADP ADM COL COL
    Tuesday
    Wednesday IP IP
    Thursday
    Friday ADP

    I just dont have any idea on how to approach this problem to display the required data. Each cell should not only contain the module the student is taking but also the room and possibly lecturer name. The interface I was recommended to use is Oracle forms. Any other suggestions?

  4. #4
    Join Date
    Feb 2009
    Posts
    2

    Red face new developer

    Thank u.. I'm stuck in creating the procedures that call upon procedures to identify which lab or classes are free so that i can allocate subjects at that period... Those procedures are done after matching the lecturers wit the courses.. After discussing wit my lecturer i came to an idea to solve it...

    __________________________________________________ ________________

    Humbleness is the key to gain knowledge
    Last edited by logan_chm; 02-10-09 at 16:30.

  5. #5
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    SHOW OR TELL US WHAT YOU TRIED. We will not write your final project for you, only help you if you are stuck.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  6. #6
    Join Date
    Mar 2008
    Posts
    89
    You could do it a bit ugly with 4 unions, like
    Code:
    Select 'Weekday', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00' from dual;
    
    Select 
          'Monday' as 'Weekday' 
          (select class_type from module_group where start_time='09:00') as '09:00',
          (select class_type from module_group where start_time='10:00') as '10:00',
          (select class_type from module_group where start_time='11:00') as '11:00',
    --   [...] etc.
    UNION
    Select 
     'Tuesday' as 'Weekday' 
          (select class_type from module_group where start_time='09:00') as '09:00',
          (select class_type from module_group where start_time='10:00') as '10:00',
          (select class_type from module_group where start_time='11:00') as '11:00',
    --   [...] etc.
    However, you would need to refine the subqueries to check for which weekday it is and whatnot, so this is just a high level idea...

    I would really really hate doing it this way though, it's just one possible way.
    Within Forms you should be able to build a nice interface for the output, shouldn't you?
    "My brain is just no good at being a relational Database - my relations suck real bad!"

  7. #7
    Join Date
    Feb 2009
    Posts
    2

    Smile Thank u

    Quote Originally Posted by beilstwh
    SHOW OR TELL US WHAT YOU TRIED. We will not write your final project for you, only help you if you are stuck.
    Thank u.. I understand what u mean. I'm stuck in creating the procedures that call upon procedures to identify which lab or classes are free so that i can allocate subjects at that period... After discussing wit my lecturer i came to an idea to solve it... Thank u...

    __________________________________________________ ________________

    Humbleness is the key to gain knowledge
    Last edited by logan_chm; 02-10-09 at 16:27.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •