Categories
BLOG

lottery database

Best way to implement a database of lottery numbers?

I’m trying to build an app involving my local lottery system and would need to store the numbers. Each draw has the following:

  • Date
  • Draw Number
  • Winning Numbers (6 of them)
  • Additional Winning Number

I would like to be able to make the following information out of these numbers, such as:

  • Frequency of each number appearing in general
  • Frequency of each number appearing in the standard 6 winning numbers
  • Frequency of each number appearing as an additional winning number
  • Retrieve a number and the associated dates for which the number appeared
  • And of course, simply display the numbers given a date and/or draw number

My issue is regarding the winning numbers and the additional winning number. I can think of the following: – Storing the 6 winning numbers as a list or similar (DynamoDB), and the additional number separately – Storing each number separately: winning1, winning2, etc. additional_number

I’m open to suggestions and am not fixed on using a particular database yet, hope to hear your thoughts and expertise on this. I’m thinking that at the end of the day I will need additional tables to keep track of the frequency of each number etc. separately.

Best way to implement a database of lottery numbers? I’m trying to build an app involving my local lottery system and would need to store the numbers. Each draw has the following: Date

Lottery ( Database Diagram)

Use Creately’s easy online diagram editor to edit this diagram, collaborate with others and export results to multiple image formats.

You can edit this template and create your own diagram. Creately diagrams can be exported and added to Word, PPT (powerpoint), Excel, Visio or any other document. Use PDF export for high quality prints and SVG export for large sharp images or embed your diagrams anywhere with the Creately viewer.

Lottery Database Schema ]]>