The tentative schema for the database should be:
User Table
UserID, Authentication, MONEY, Reserve, # correct?
Give money every day. (First bid of the day)
Prediction-User Relation
UID, PredictionID, # that they own (can be +, -, or 0)[, numSell, bidSell, numBuy, bidBuy]
Prediction-User Selling Buying Table
UID, PredictionID, datetime, buyBool, #that you want, price
Prediction Table
PredictionID, Section, Subsection, Question, ClosingDate, DecidingDate, FinalResult
Compute CurrentOdds with a function (as well as max Buy and min Sell)
SELECT max(bidSell) AS minSell FROM pred-usertable WHERE PredictionID = predID
SELECT max(bidBuy) AS maxBuy FROM pred-usertable WHERE PredictionID = predID
The website should include
- A home page, which should have a list of all predictions
- A page for each prediction with its individual stats
- A page for bidding on the predictions
- A page for each user's individual stats
For testing purposes we should fill the database tables with test data until we're ready to open them to the public.
No comments:
Post a Comment