is it good design

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
rami
Forum Contributor
Posts: 217
Joined: Thu Sep 15, 2005 8:55 am

is it good design

Post by rami »

i am making classified system
i have main category as
vechiles,realstates,jobs,matrimonial,websites,education etc
i have table for each category which has about 17 to 18 columns
i want to separate service and seacrch extensively

it is to be intregrated in very famous site so it may grow up to millionsof records so
is my database design and concept good
or there are better way

can these all be done in one table but thing are diff for eg martomonial has fileds like hobbies ,reliogion where as merchandise has make,brand etc...
so cannot do all in one table

2 problem well as it is classfoed site the ad should be removed after some time
so for now i am thinking of putting one enum field which will be 1 or0 indicating either it is active ad or not

what will be better idea ...deleting it or keeping it
i fear those massive deletes every day will degrades performance

and what about putting that rows with 0 as enum filed as archive


any idea please help

another problem
i have for eg product short description filed which describes product
if i do tiny text,medium text it is not sufficent as i am planning to put some 10-20 lines so i am uisng texzt but i feel that is wasting lots of space what should i do
thanks for reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Post by kendall »

Well rami,

for me what i try to do is keep the similarities together and the differences separate and reference the data some how. I am sorry that i can't be of more help but try this.

tables:-
  • ad contact information
  • vehicles type information for ad
  • jobs type information for ad
so you kind of have
table ad contact information
  • ad id number
  • ad name
  • ad category type....(vehicles type information, jobs type information...etc)
then in vehicles type information you have
  • ad id number
  • vehicle type
  • price
etc etc etc

hope that give you some ideas...
another thing...

you may probably want to "de activate" rather than "delete/remove" you never know...they may want to run the ad again when they finally pay you!! :-) :D [/syntax][/list]
rami
Forum Contributor
Posts: 217
Joined: Thu Sep 15, 2005 8:55 am

Post by rami »

i have deavtivate feild
and later i am trying to do
select .....where status=1
0 means deactivated

this way as there will be lot of deactivated rows ,will it affect in performance

i have expireon field and status filed
can i cron to do
if expireon>currentdate
status=0


is this idea good
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Post by kendall »

rami,
i have expireon field and status filed
can i cron to do
if expireon>currentdate
status=0
is this idea good
Well i think it is...we wont know untill we try it out but its good :wink:
Post Reply