G
Guest
I'm making a database for a housing company where i have to keep a record of
each tenent and also of each room.
I have set up records for each and every room and have them in a table
called StudentRooms, this is related to a table in the Students table which
has a copy of the primary key from the students room. In this case the
primary key is a combination key of the Building, Block, Flat and RoomNo.
Each student has a student Reference (studentRef) which is used as their PK.
What was needed was a way to allocate student to an unoccupied room, which
ive done by using the Tenent property of each room, which has a copy of the
studentRef if occupied.
Each students also has a StartTenencyDate and EndTenencyDate to show when
the room is going to be empty (a search for a specified date will yield which
rooms are empty and which can be allocated).
The problem is that the company takes bookings in advcance of the next
academic year and need to be able to allocate rooms. Howver ive set it up so
that they can only allocate empty rooms (so not to double book) but this is
also stopping them from booking the room for next year as they arent being
shown all the rooms, only the empty ones even though on that future date the
room will be empty.
I feel i have all the peices but im just not able to see how to make it work
properly.
Ill be happy to add any extra information.
Wtih Regards
Amit
each tenent and also of each room.
I have set up records for each and every room and have them in a table
called StudentRooms, this is related to a table in the Students table which
has a copy of the primary key from the students room. In this case the
primary key is a combination key of the Building, Block, Flat and RoomNo.
Each student has a student Reference (studentRef) which is used as their PK.
What was needed was a way to allocate student to an unoccupied room, which
ive done by using the Tenent property of each room, which has a copy of the
studentRef if occupied.
Each students also has a StartTenencyDate and EndTenencyDate to show when
the room is going to be empty (a search for a specified date will yield which
rooms are empty and which can be allocated).
The problem is that the company takes bookings in advcance of the next
academic year and need to be able to allocate rooms. Howver ive set it up so
that they can only allocate empty rooms (so not to double book) but this is
also stopping them from booking the room for next year as they arent being
shown all the rooms, only the empty ones even though on that future date the
room will be empty.
I feel i have all the peices but im just not able to see how to make it work
properly.
Ill be happy to add any extra information.
Wtih Regards
Amit