Starting from scratch

I’m trying to figure out how to do this witha database.
I want this page,
On The Ocean: Availbility
to be dynamic.
What i’d like to happen is the create a page that would create a year (2012, ect) then display the 12 months for that year, with the possibility of adding a rate for that month or “Rented” if it becomes rented.
So, this is what I think I need.
A year table set up like this
CREATE TABLE year (
id SMALLINT NOT NULL PRIMARY KEY,
)
another table to hold the months
CREATE TABLE month (
id SMALLINT NOT NULL PRIMARY KEY,
rate VARCHAR(11) NOT NULL,
year SMALLINT,
FOREIGN KEY (year) REFERENCES year(id)
)
is this ok soo far?

i would use just a single table, and there’s no need for an auto_increment

CREATE TABLE rates 
( yr SMALLINT NOT NULL
, mth TINYINT NOT NULL
, resource VARCHAR(37) NOT NULL
, PRIMARY KEY ( yr , mth , resource )
, rate INTEGER NOT NULL
);
INSERT INTO rates VALUES
 ( 2011, 04, 'El Camino' ,  5000 )
,( 2011, 05, 'El Camino' ,  5000 )
,( 2011, 06, 'El Camino' , 11000 )
,( 2011, 07, 'El Camino' , 11000 )
,( 2011, 04, 'Cabrillo' , 4000 )
,( 2011, 05, 'Cabrillo' , 4000 )
,( 2011, 06, 'Cabrillo' , 8000 )
,( 2011, 07, 'Cabrillo' , 8000 )
, ...

Do you think I should add another field to the table of type BOOLEANin order to keep track f if that resource is rented or not for that month, lie this?
CREATE TABLE rates
( yr SMALLINT NOT NULL
, mth TINYINT NOT NULL
, resource VARCHAR(37) NOT NULL
, PRIMARY KEY ( yr , mth , resource )
, rate INTEGER NOT NULL
, rented TINYINT NOT NULL
);

Sorry, Dont want to tell you how stupid I am, but I want to create a form so the rates for any resource for any could be; added or edited fro the page so I could do it from the browser. (I can do this right?)

the way i would do it, i would have a row in the table only for those instances where a resource is rented, and for months where a resopurce isn’t rented, there would be no row

this is equivalent to boolean, n’est-ce pas?

How can I have the “rented” row only show up when a resource is rented and have it dissapear when it is’nt?

using INSERT and DELETE statements