I am currently learning SQL for University and my teacher asked me to create a table for the following scheme:
Class: Room, StartTime (automatically add 90mins), Day, ClassName, optionalComment
With the following conditions:
- one class can have multiple occurrences
- a Room can only be taken up by one class at a time
- a Room can be occupied by different classes at different times
I am just stuck with this one. I was thinking about constraints, but not really figuring anything out.
Can someone maybe push my mind in the right direction?
EDIT: This is what I got so far, as I said - I am very stuck.
create table class ( room varchar(10) not null day varchar(100) not null className varchar(255) not null optionalComment varchar(255) startTime time )