Skip to content

Instantly share code, notes, and snippets.

@ali-arslan
Last active August 29, 2015 14:17
Show Gist options
  • Save ali-arslan/50226298bef61e473d18 to your computer and use it in GitHub Desktop.
Save ali-arslan/50226298bef61e473d18 to your computer and use it in GitHub Desktop.
Database stuff
USERS
Name
UserID
Email
Number
Address
Credits (current amount of money loaded into system)
Status (Active, Locked)
etc. add whatever personal information you feel suitable
BETS
Sport
BetType
Bet amount
User1
Team1
Team2
Odds etc.
TEAMS
Sport
TeamName
Date
CurrentOdds etc.
Status (open/closed)
Outcome (won/lost)
Anything else you feel suitable and or necessary. This should in general be enough for first go: Site to be
setup with betting on whole match outcomes.
Next, write queries for likely usage scenarios for above tables. Here are some to begin with: new user signs up,
existing user logs in, admin logs in, new team is added to db, odds are updated for team, current odds are fetched,
user makes bet with given amount, get betting history for given user.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment