Page 1 of 1

Database Design Help

Posted: Wed Nov 12, 2008 4:45 pm
by kalebaustin
Hi everyone

I'm beginning on created a website and need help with the database structure. It's for a MMORPG; the rpg now has an "Achievement System" where if you complete certain criteria you gain that achievement which awards points, usually 10-25, and rarely an item and sometimes two, ie an item and a title before/after your name. The achievements are also grouped, such as a General group, a Classic Group, 1st expansion group ect...

What I want is to put all of the achievements in a database so you can view the criteria of said achievement and then be able to click on one item on the criteria to get more information.
So for instance:
"Well Read" achievement awards 10 points, and an item; the criteria to meet achievement is to read 10 specific books->

"Well Read" - 10 Points, item
Book #1
Book #2
Book #3
Book #4

I've been dabbling in php for lil over a year and consider myself decent, however I'm still lost on database design, so I request an suggestions you might be able to supply.


Basic Idea

Acheivements
Achievement name
Achievement group
Criteria
Points awarded
other reward (if any up to 3 or 4)
possibly a user-rated difficulty rating

Re: Database Design Help

Posted: Thu Nov 13, 2008 12:49 pm
by josh
Which open source code bases have you studied up on? Have you compared and contrasted the design decisions of any of your existing competitors yet?

Re: Database Design Help

Posted: Sat Nov 15, 2008 3:45 pm
by califdon
The design of every database should begin with identifying what entities you want to represent. Unless you have this clearly in mind, any other effort is wasted. I don't know enough about what you're doing to try to guess what entities are appropriate for your project; that's what YOU have to determine. But just listing words like Achievements doesn't do it. An entity is a person, a group, an object, a place, an event, a document, or something like that. Basically it's like a noun in grammar. Each entity becomes a table in a database. Every entity has attributes that define each instance of the entity. So if it's a person, the attributes might be Name, Address, DateOfBirth, etc. But not his/her age (which doesn't define a person, it is constantly changing), or what classes he/she has taken. Until you have a solid description of all the entities and their attributes, you have not begun to design your database and there's little hope of getting it to work correctly. You might start off by reading a tutorial like this: http://asadsiddiqi.wordpress.com/2008/0 ... -tutorial/