The game is Necromunda, a table-top game from the company Games Workshop. The usage would primarily come from myself, although several friends would have access to it as well. In all honesty, I sincerely doubt anyone else would ever use it, but I would definitely make it accessible to the public... When it's finished.
I work with a database at work - MediaPlus Circulation from DTI - but that really doesn't involve any database design or even any true SQL queries. Their software has a built-in query builder, although it's becoming far too limited for my needs. I don't have the authority to just go and write straight-up SQL queries, despite generally knowing how! I think I get 1NF and 2NF no problem. 3NF is where I begin to fail.
It's worth noting that 1) I am expanding on the original content and intention of Necromunda with this campaign manager (which I guess could also be abbreviated as CMS!), 2) I intend to build upon it for bigger projects, and 3) this is ultimately a learning experience to springboard my way into other database-driven projects (both for work and personal use).
I don't know how familiar with the original game many people are likely to be, but here's a brief overview:
The players take control of gangs in an underground city set in the Warhammer 40,000 universe. The gangs are represented with miniature figurines, moved around on a tabletop amongst terrain pieces. You roll dice for things like shooting and combat. While you can play one-off games, the real heart of the game is in running a campaign and actually advancing the gangs by earning experience and gaining abilities (not unlike an RPG). This campaign system inspires a lot of trash talking and showboating, naturally.
Although we've taken a long break due to work, relationships and family, my friends and I are die-hard fans and have been playing the game since it was originally released. I'm basically looking for a way to NOT use pen and paper and this CMS seemed like the best solution.
Some of the ways I intend to build upon the original game design are with tracking statistics not normally paid attention to. I don't want to go too far into discussing the front-end/application part of the whole project because, well, the database needs to be made first! The basics of the stat tracking would be things like win/loss records, how effective gang members are (ie, shots fires, hits made, wounds caused, etc). Normally, beyond keeping track of wounds caused for earning experience in a given game, the game has no need for you to keep track of these things. With the plans I have, despite the scope of the stats, tracking them would be very simply for the end user.
Some of the hardest decisions I've been having to make are, basically, how much do I want to break things down into different tables. Obviously, normalization is crucial, but sometimes I wonder if it'd be advantageous to go even further than that. Would I be adding undue complexity or extra flexability?
Let me throw in some sample, work-in-progress tables and you guys can tell me if I'm WAY off base or not. I will present these NOT as SQL, but as a list of column names, the very generic data type, and whether or not they are some kind of key.
Code:
CampaignData:
CampaignID Int Primary Key (auto-increment?)
CampaignName Text
NumPlayers Int
StartDate Date
EndDate Date
GamesPlayed Int
GangsStarted Int
GangsRetired Int
GangersKilled Int
HiredGunsHired Int
CredsEarned Int
CredsSpent Int
ExpEarned Int
SkillsLearned Int
RaresBought Int
GangersRecruited Int
AwardsEarned Int
TitlesEarned Int
CampaignDescription Text
The columns that would clearly be updated regularly, such as GamesPlayed and ExpEarned would not be calculated by the database. The front-end would do the math and plug the numbers back into the table. Unless, of course, that turns out to be monstrously inefficient in terms of resources.
Code:
AttributeData:
AttributeID Int Primary Key
AttributeName Text Unique (there are 9 unique attributes - that fact will never change)
AttributeDescription Text
MinValue Int
MaxValue Int
ClassID Int Foreign Key to ClassData.ClassID
StartingValue Int
ClassMaxValue Int
GangMemberID Int Foreign Key to GangMemberData.GangMemberID
CurrentValue Int
The idea with this table is, rather than store the values for a given attribute (such as Weapon Skill) in the data for a given gang member, they are stored here and linked to the GangMemberData table with a FK. Similarly, the starting and max values for a given gang member type (Class) are stored here and linked to that class via a FK. MinValue and MaxValue may actually be pointless. Min is always 1 and Max is always 10. That can be checked via code in the application-end of the whole project and raise up any necessary warnings or errors or potentially force data back to an acceptable number.
This is the type of table where I get confused. If there are 20 classes throughout the game, you're going to have 20 instances of each AttributeID and that makes me think I am either doing this backwards or just don't know what I'm doing! Hahaha.
So, to wrap this post up, this confusion and lack of knowledge is why I intend to lay the whole thing out first before even beginning to code the DB.