jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes A nice 'little' problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "A nice Watch "A nice New topic

A nice 'little' problem

matthew weeks

Joined: Feb 23, 2004
Posts: 15
I'm trying to do a produce a Computerised Room timetabling system for my IT
department at College using Java and JDBC. So far I've managed to add/delete/edit records for information on Rooms, Staff Members and Courses.
I'm now trying to add lessons for courses, here is where my problem lies.
The IT department want the possibility that some rooms within the department to be doubled booked, as a class generally contains about 30
students and some rooms have the capacity of 100 computers. So a room
could easily contain 2/3 classes at the same time. How this can be
acheived using Java? Making sure that staff members and times for lessons
arent also doubled booked aswell, e.g. a lessons time (time it starts and
finish) doesnt overlap with another lesson.
Hope this is clear (its probably not), Any help with this would be most
Loren Rosen
Ranch Hand

Joined: Feb 12, 2003
Posts: 156
This is at least in part a data modelling problem, not a Java problem... but java ranch doesn't have a general database forum...
You say you want to double-book a room, but later you say you have lectures and so forth that you don't want double-booked. Do you mean you've got some rooms which are lecture halls (no double-booking) and some which are labs (double-booking allowed)?
Anyway, the simplest thing that comes to mind is to track, for each room, how many computers it has, and to have each reservation track how many computer it needs.
I agree. Here's the link: http://aspose.com/file-tools
subject: A nice 'little' problem
It's not a secret anymore!