Database for a website.

Sort:
mollyboo

I've just created a website for my chess club, and as one of its features I wanted to create a database of all the games that we've played against our league opponents. The idea is that our players will easily be able to prepare for their matches by simply clicking on the relevant (probable) opponent to see their choice of opening/style of play.

We all keep our scorecards, so the input of data (though painstaking) won't be a huge problem. I just need a step-by-step guide of how best I could achieve this, and what software I should use.

Thank You !  

PrivatePyle99

If you're just starting out with databases, there are two options I would recommend.  First would be Microsoft Access.  There's a learning curve, but it's smaller than anything else I can think of.  Second would be MySQL.  It's a little harder to learn, but more powerful. Last I remember, it was free too.  Microsoft Access was very not free. Frown

Just a disclaimer, I've been a programmer for 17 years, but I've been "out of the game" for a couple years now, so there may be better options.  Also, I never worked outside of a microsoft environment, so I'm not only biased, but uneducated in other environments.  I just wanted to give you my opinion.

mollyboo

Firstly, thanks for your reply. I know very little about either of these options - I take it neither of them would allow each game to pop up in a play-through format, similar to chessgames.com. It would simply be a list of moves played?

MrEdCollins

Take a look at this page.

I set this up years ago.  The instructions and files are from Chess Tempo.

PrivatePyle99

Regarding each game popping up in a play-through format, that's a whole seperate issue.  The first issue is storage, how do you (as the site owner) save the games.  That's where Access, MySql, etc come into play.

A completely seperate issue is how to display the games on your site.  I believe there are several chess board applications that are open source (meaning you can use them for free and change the code if you need to to meet your requirements.) I'm not aware of an option that would be easy to use if you have no coding experience, but there may be one.

I can't program the site for you, but I'd be happy to help you learn if you want.

mollyboo

Thank you everyone - PP99, I will take you up on your offer of help, if you don't mind - it really would have to be babysteps though, as this is my first venture into web design, and I have never used chessbase or any of the other programs mentioned in this thread. I downloaded this program http://chessdb.sourceforge.net/ as it seemed to offer what I want. Am I on the right track?

mollyboo

MrEd -that is exactly what I need. How did you do that? (step by step if you don't mind!)

PrivatePyle99

Hey, sorry for the dealy in getting back to you. ChessDB looks like it would work, but I've heard really good things about SCID vs PC which is another free chess database program.  I think it can export HTML, which is probably the easiest way to accompish what you want to do.  I'm going to download it now and play around with it to make sure it does what you want.  I'll let you know later today probably.

PrivatePyle99

Yeah, SCID will do this, I'm going to go through and try to come up with some instructions for what you want to do.  I just have a couple questions first.  How are you building the site?  Are you writing the HTML (web code) or using a tool where you select options and it bulds the site for you? If you are using a tool, do you know how to upload html files (which are just web pages) using the tool?

Also, are we talking about 10's of games, 100's, 1000's? It looks like displaying a persons games will be pretty easy, but do people need to search for games?  Is there just a list of players on the website and you click on a players name and see all their games? Do they need to be categorized in any way other than by player? Any kind of filtering involved?

MrEdCollins
mollyboo wrote:

MrEd -that is exactly what I need. How did you do that? (step by step if you don't mind!)

Actually, I don't remember the steps. I did this many years ago.  Fortunately, the steps can be found here here: 

http://chesstempo.com/pgn-viewer.html
http://chesstempo.com/pgn-usage.html

PrivatePyle99

This is way to complex for somebody just starting out, especially without knowing the requirements.  If what you are looking for is to have a list of players on your site that link to a list of all of that players games (say 50 of them) and then be able to view the games on a chess board on your site, I think we can do that without writing any code at all, with free tools.

If you want some searchable database where you can look up a players games sorted by opening, cross-referenced with their rating at the time and the opponents rating above a certain range that were played on Tuesdays in May, you're going to have to write some code. Smile

Either way is easy, the second way is just going to require that you learn a lot about programming. It's a pretty fun thing to learn though.

mollyboo

PP99 -My brother created the website, using Wordpress (Suffu-scion Theme). I've been let loose with the dashboard. We are probably talking the first ten moves of 100's of games as opposed to thousands to begin with - but if I keep adding to the database, I suppose it could run to maybe 5000 games eventually. It's amazing how these things snowball.

The games will be arranged by opponent, showing his reportoire with Black and White. I really appreciate your help!

Idosdos - you just scared me! I'm sure I'll get my head around what you've written, but I can't stress how much of a beginner I am at this!

Estragon - I'm not sure if I have chessbase - does is come as part of Fritz 10? If so, yes!

PrivatePyle99

Okay, I think I’ve got things figured out.  I haven’t used SCID before, so if anybody knows of a better way, speak! ;-)  What we’re going to do is download a database management program that you can create the database in, then we enter all the games, filter the games by player, create the webpage for that player, upload it, and link it.  Easy, right?

1.       Download SCID vs. PC and open it http://scidvspc.sourceforge.net/

2.       Click File -> New to create a new SCID database

3.       Enter the first game then click the save icon. Hover over the icons for a tooltip.

4.       Click on the Game List icon to see a list of the games in the database (should be only 1 now).

5.       Now, for each new game, click Game -> New Game and go to the Board tab to enter the moves.  Click save after each game (I think).

6.       You now have a database.  SCID can do all kinds of crazy cool stuff, there should be good info on how to use it on the web.  Now we make web pages.

7.       Click search -> general

8.       In the window that pops up, enter the first player’s name you would like to have on your website.  If you want all the games that player played, not just one color, click the Yes button for Ignore colors. 

9.       Click Search.

10.   The games list should now only show games from that player.

11.   Click tools -> export all filter games -> export filter to html and JavaScript.

12.   Save it someplace you’ll remember, I would suggest a separate folder for each player, but it’s not necessary.  I’d probably name the files with each player’s last name.

13.   Now, if you go to that folder in Windows Explorer (I should have asked before, I hope you’re on windows and not mac because mac’s only have one mouse button and that just baffles me.) You should see a bunch of files.  Click whatever the name of the files you entered was that is an HTML document (.html).  If you named it Johnson, then click on Johnson.html.  Everything else will be needed but this is the page that pulls it all together.

14.   You should be able to see exactly what it will look like on the website.  If you want to change the look, you’ll need to edit the html files (not just the main one) and/or the scid.css file which is a cascading style sheet.  It makes things pretty. You may be able to do this in WordPress.

15.   Now, for the part I don’t know exactly how to help you with.  You’ll need to do two things to get the games on your live site.

a.       First, you have to upload all of the files in that player’s folder to your server.  How to do this depends on who the host is, so they can probably help with that.

b.      Second, you need a page that will list all of the players’ names, and the names should be links that go to the player’s .html page that you uploaded.  This can probably be created in WordPress, but I’ve never used it so I don’t know the process (I don’t really even know what it is.)

This should give you what you want.  You would just need to enter all the games then create, upload and link the html page for each player.

Chessbase is another database management program for chess games, just like SCID.  It doesn't come with Fritz but it's made by the same company.  There are probably advantages to using Chessbase instead of SCID, I use Chessbase, but I don't use SCID so I don't know what the advantages are.  The disadvantage is Chessbase is $100 without any data.  I don't know what that is in pounds or euro's but it's more than free.

Just as a precaution, I’ll say this isn’t the “right” way to do this, it's the free easy way, but it’ll probably work for 50,000 games, so 5000 should be just fine. If you want to take your time and learn programming as you go, this isn't the way to do that but I could come up with a new list ;-). If you really want to get crazy, the scid.css and scid.js files don’t need to be uploaded for every player, but you’d have to change the references in the html to point to one master copy.  The files are really small , so it’s probably more work than it’s worth.

If you have any questions, just let me know.

 

mollyboo

Thank you so much for this! Way beyond the call of duty, and I'll let you know how it goes. 

mollyboo

Just a quick update for everyone who was kind enough to offer advice - I managed to get a database of sorts (early days) and it's working well enoughfor me. Thank you all.