FreeBeg
How should you design the database schema for a prediction market? - Printable Version

+- FreeBeg (https://www.freebeg.com/forum)
+-- Forum: Everything else (https://www.freebeg.com/forum/forumdisplay.php?fid=11)
+--- Forum: Chit chat (https://www.freebeg.com/forum/forumdisplay.php?fid=10)
+--- Thread: How should you design the database schema for a prediction market? (/showthread.php?tid=117376)



How should you design the database schema for a prediction market? - augustinz1 - 04-13-2026

Designing the database for Prediction Market Platform Development involves creating a clear, simple structure that can handle users, trading, and market results.

To build it, you can start with these core tables:
  • Create a users table to store user details
  • Add a markets table for prediction questions
  • Use an outcomes table for possible results (Yes/No or multiple options)
  • Include an orders table to track buy/sell requests
  • Add a trades table for completed transactions
  • Maintain a position table to track user holdings
  • Use a wallet/balance table for managing user funds
  • Add a resolution table to store final results

This structure keeps the system simple, organised, and easy to extend.