Aloha, I'm working on a personal project involving php and mysql. I'm way rusty, but I have a few ideas and am looking to my peers for some validation on how to design the database - I figure since all the information is stored their, it's more important then the front end, so I want to get it right the first time.
The project is basically taking a spreadsheet I made for Castle Age (it's a Facebook game that I'm enjoying) and turning it into a multi-user web page (each user would have their own account that would store the various financial data within Castle Age, tracking how much land they own (income) and how much weapons, soldiers, and generals they own (expenditure)).
Due to the dynamic nature of Castle Age and its updates (new stuff being added all the time) I couldn't take the easy way out and just hard code the available data into the database, so I'm looking to make sure I'm headed in the right direction at least.
I have the 3 following tables to start with:
userID, user, pass, email, balance
landID, landname, landinitcost, landincrementcost, landincome
userID, landID, numownedland
Accounts and Land both have a unique primary key that auto-increments, userland has NO primary key thus far, as I'm hoping to tie userland.userID = accounts.userID & land.landID = userland.landID
Again, this is just a project for fun and personal use amongst me and some friends - but am I on the right track using 3 tables so far?