I am new to web development and I apologize if this is a basic question. I am looking for advice on choosing the most appropriate strategy for an auction site done in RoR.
Users can create auctions, which are active for a certain period of time. Each auction should have corresponding db tables, one for general details (i.e. user that created it, time to expiry) and another table that holds every bid made.
The bids table is more for record keeping.
I'm ignorant with databases and am assuming that having multiple bid tables, with every bid for multiple auctions may overload the system, so once an auction expires, I want to export the records of the bids table and delete it.
If this is the best approach, here are my points of doubt
- Upon auction creation is it possible to generate a bids table strictly for the particular auction dynamically and if so how?
- Assuming the bids table is created dynamically. When a user places a bid, can I use javascript/ajax/JSON to make a post request to save the details to the bids table?
- How would the code for post request look? I'm assuming since the table is made dynamically, there is no corresponding model, controller/actions/view I can refer to and that too, invoke through the auction model.
- Is it possible to export db table records and delete them based on time expiration, if so how?
All help is much appreciated.