Welcome Guest, Not a member yet? Register   Sign In
Best practice storing/handling many options
#1

[eluser]Anonymous[/eluser]
Hi there,

I'm developing an auctioning website. Each auction has a lot of options, that i want to be able to filter on the front-end.
I was wondering what is best practice in handling/storing these options (mostly booleans/checkboxes).
Is it best practice to store them all in the same row ?
Or would it be better to store them all in one "auction_options" table? How would this work with filtering ?

There are about 20 options per auction, and more to come probably. I want the site to be as hihgly scalabable as possible.

Anyone has done something similiar before ? I'm also very curious in the codeigniter front-end part (filtering with checkboxes)

any directions on this would be great, google is bailing out on me
#2

[eluser]mdvaldosta[/eluser]
I'd probably put the 'options' in another table, since you're likely to have times where you may not need them when doing something with the basic auction data. If you're always going to use them though, then it really doesn't matter. For the sake of keeping things organized, I'd probably keep a separate auction_options anyway.

As for the filtering, I'd assume you'd just run a new search to filter those auctions not matching the checkboxes out. Or, you could use javascript to hide irrelevant auctions; but that would require you to grab all auctions from the beginning which would take more resources. Or, I suppose you could use jquery as well if you're after that kind of instant sorting without the page refresh.
#3

[eluser]SitesByJoe[/eluser]
If you're not sure how to proceed, I'd start more simply and add complexity as you go. for example, I wouldn't be sweating ajax-checkbox updating until you get your data tables organized and queries running smoothly in an old school page-load-page format.

The more your abstract your data tables (so not to repeat anything) to easier to maintain it'll be and more scalable. The queries will be more complex to write so if you're not an SQL guru you might want to be sloppier to get started so you can start moving forward.

Worrying about 1000's or more users shouldn't be an initial concern since your current user base is probably closer to 10, right?




Theme © iAndrew 2016 - Forum software by © MyBB