Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a real database #21

Open
AdmiralGT opened this issue Oct 24, 2016 · 2 comments
Open

Use a real database #21

AdmiralGT opened this issue Oct 24, 2016 · 2 comments

Comments

@AdmiralGT
Copy link
Owner

A massive text string is not a database. Let's move to something more appropriate.

@ghost
Copy link

ghost commented Oct 26, 2016

First stage is database design. Something as simple as this might do:

Player table (index, initials/name, rating, record, profile?)
Results table (index, winning player index, losing player index, date/time stamp)

Depends on what new features we want to support. E.g. this design means past record needs to be calculated each time (rather than being stored), though that's a fairly simple DB lookup, so probably doesn't matter.

Maybe record can be calculated each time? That doesn't scale though...

@ghost
Copy link

ghost commented Oct 26, 2016

The server should do all the heavy lifting and write to database, rather than all the stuff we have in the client (js) at the moment. Maybe some kind of Ajax callback interface between server and client.
http://www.w3schools.com/jquery/jquery_ajax_intro.asp could be useful.

In fact, w3schools is awesome for learning about all things web-y.
e.g. SQL stuff http://www.w3schools.com/sql/default.asp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant