What Method is better for Creating a Guild

I’m developing a MMORPG based on the popular anime Sword Art Online. I’m programming the functionality of creating a guild and don’t know what method would be best to store the information in a MySQL database. The values I need to store are as follows:

public string guildName = "";
public string guildDescription = "";
public int guildFunds;
public List<string> membersInGuild = new List<string> {"Bill, Bob"};
public Color emblemColor;
public Texture2D guildEmblem;
public List<string> guildInventoryItems = new List<string> {""};
public List<string> guildInventoryItemStats = new List<string> {""};

I’m thinking of storing the guild name, description, funds, and emblem color in one database that holds this information for every guild in the game, may just name this database “Guilds”.

For the members in guild, should I just use the database that holds all the users of the game and add another variable holding what guild they are in or if they are not in one? Or should I create a seperate database with a list of all players in a guild and what guild they belong to and then determine they are not in a guild if they are not in the list?

And what of the emblem? Players are able to upload there own emblem, which is a much larger file size than a string so should I create a seperate database stating each guild then a variable (or cell) holding the emblem information?

Lastly the inventory items and stats in a guild. Should I create yet another database holding every item currently in a guild and then add variables for its stats and what guild it belongs to?

Thanks for the advice, and if you think of a method I have not stated that may be easier than any of the other I’d love to heat it.

I’m pretty sure this question is some kind of follow-up question of your other question.

In general you have to seperate two things:

  • How an object is represented at runtime in your game
  • and how it is stored in a database

There’s usually a big difference. Any data stored in a database is stored in a way you can easily access and search for any parts of the stored information. In game you usually structure the data in way it’s easy to use (for whatever you need it). Since MMOGs are usually mainly developed on the server, the client just displays information. Most actions a user can do are executed on the server and change / affect data in the database. The clients just get informed or they update themself by reading the new information from the server.

All your sub-questions can’t be answered in a clear way since it all depends on the usage (how often is certain data read, what’s the relation between certain data, the average size of the data).

It seams you have only little or no experience in database design and server programming. May i ask why you decided to make an MMOG? MMOGs require a lot specific technologies / knowledge about databases, bandwidth, traffic, server load, security, data validation, …

If you start with no experience in those fields it’s probably going to fail.

ps: What is “much larger than a string”? A string in .NET / Mono can store up to 2GB of data. In a mysql database the type “LONGTEXT” can store up to 4GB. So i don’t think your image is much larger than a string can possibly be :wink:

I would suggest to read a lot about relational databases, how they work and how they are used. Look at different examples and try to understand why they designed it that way.

As final “hint” :wink: