Topic: Setting Up Table/s Question

I'm creating my first rails site and since I'm pretty new to dynamic sites need some advice on setting up the table.

Basically the client has products and I am going to put them into a product model and products table.

However these products can be both sold or hired so there will be a hiring page and a products for sale page, and a specials page on the site.

Information for the products involves the following details

Product name
Product description
Product image

if the product is for sale then the following information is required also
Recommended retail price
If product is a pair then pair sale price
if product is a single item then single item price

If the product is on special/discounted
recommended retail price
discounted price

if product is for hire then the following information is required also
hire price

What I'm not sure about is should I have separate tables being

products table
hires table
specials table

and have a relationship between the tables?  If so any suggestions on where to start to do this.  I know how to create a model, table, controller but I haven't done any work with multiple tables.

Re: Setting Up Table/s Question

There are several ways to solve this problem, I have written about a couple.

In your specific situation, I recommend sticking with one table. The custom attributes seem similar enough. If a product only has one state at a time and you need it to behave differently when in this state, I recommend using Single Table Inheritance.

This approach is pretty flexible as it allows you to fairly easily move into a more complex schema (like one mentioned in my other post) if you find it necessary.

Railscasts - Free Ruby on Rails Screencasts