Hi,
I'm developing a webbookingssystem in vb.net and SQL Server 2005 as DBMS for a school project. What I have trouble with is how to get the calendar to function. I've described what parts we have in the tables that are involved in the problem situation below.

Database Structure:
Booking
-BookingID (int, primary key for the table, increases by one for every reservation made)
-CustomerID (int, foreign key from table Customer)
-Booking Date (datetime)

Shopping
-CustomerID (int, primary key for the table, increases by one for each customer that is)
-TlfNr (nchar, 15)
- Address (nvarchar, 50)
- Zip Code (nchar, 6, a foreign key from table address)

Personal
-CustomerID (int, generalization of the table Customer)
- FName (nvarchar, 50)
- LName (nvarchar, 50)

Corporate Accounts
-CustomerID (int, generalization of the table Customer)
-FtgNamn

Mailing address
- Zip Code (nchar, 6, primary key for table)
-Location (nvarchar, 25)
-VName (nvarchar, 30, a foreign key from table Workshop)

Workshop
-VNamn (nvarchar, 30, primary key for table)
-Address (nvarchar, 50)
-Zip (nchar, 6)

When a new reservation is created a new customer is created if the customer does not already exist, when you enter the zip code it automatically loads the city and workshop details for the workshop which is responsible for the postal code. Then the system checks against the database when there are available dates for the workshop. Each workshop has a number of times per day, 9:00, 11:30, 13:00, 15:30, 17:00. Immediately after the workshop, is loaded, I want the sql code to check all available dates for the current month. It will also show the three nearest available dates for the workshop.

I don't know where to start with SQL code since I'm fairly new at this. Our teacher doesn't seem to know how to do this, he constantly changes the subject when you mention this. Based on my knowledge in programming and databases, this should be possible, I just do not know where to start.

Thanks,
Hanna