jdm3
Actually, one thought to ponder...
Can the same ad be posted in different papers and/or different cities, etc???
For example, can the same ad appear in New Yor Times, Chicago Tribune, Boston Globe etc?
If so, then you have a many-to-many (M:M) relationship. We already know one paper can have many ads. But can one ad appear in many papers.
If this is true, then you need to create a join or intermediaary table.
If we use the City for the M:M relationship, then your affected tables would / could look like...
tblCity :
cityID,
cityname
tblAds :
adsID,
adsName,
adsPrice,
AdsCategory(FK),
adsPicture,
adsBreifdes,
adsFulldesc,
adsStatus,
adsUser(FK)
tblAdProfile - link Ad x City
adsID (FK),
adsCity (FK)
Works like this...
adsID adsCity
1 1 New York
1 2 Boston
1 3 Chicago
2 4 Texas
3 1 New York
3 5 Rhode Island
3 6 London (UK)
Next point...
You may want to drop the State and Country codes from the tblAds. State and Country codes describe the city. Yes, there is more than one city called London (eg: UK and Canada). But if the user enters the city + state + country, you may end up with nonsence such as Venice + Utah + Italy. When they select the city, the combo box should display Venice + Roma (my appologies to the Italians, I do not know what provence Vince is located in) + Italy.
Per your question on categories...
A category table can handle this, and will had future flexibility. Add a new field...
tblCategory :
categoryID,
categoryLevel - primary, secondary, tertiary / or main, sub ...
categoryLngDesc,
categoryShtDesc
You can add a new level when ever required.
This will not affect your data since your still have the categoryID.
You will have to hardcode a bit to account for the different levels.
This does break a rule of normalization but saves creating a table everytime you want to create a new level.
If required, you can also use this table to create a M:M relationship if you decide that ads can have multiple categories (although this would be mroe work).
Last point...
Do you want to track what media was used to post the ad? For example a newspaper, etc? If so, I do not see this info captured in this thread.
HEY, Leslie. Good to see your posts. I will get back to you regarding SF later -- I am currently tied up with some technical issues.
Richard