Hey,
I am going to be creating a Web Based Space RPG Game, that will use a lot of MySQL. Some of the things that will be kept in the database are:
Planets
Businesses (Repair Workshop, Market, JunkYard etc)
Goods (Wood, Metal etc)
Engines
Weapons
Shields
(ETC)
Stock
Each Planet will be able to have what ever Business I select it to have. Then each Business will be Unique to that planet. Meaning that each Business on Different Planets can Sell Different things. For Example:
Earth:
Business: Market
Market Sells: Weapons, Engines
Mars:
Business: Market
Market Sells: Weapons,Shields
(When I say Weapons, Shields, I don't mean it sells that Catogry. It will be indervidual Items. Like Weapon1, Engine4 etc etc)
Each Business MUST be unique to it's parent planet. We then need to have Stock Levels. This is the tricky part (For me anyway), each Item that a Business sells needs to be Uinque to the Business AND Planet. For example:
Earth:
Business: Market
Market Sells: Weapons, Engines
Weapons Stock: 43
Engine Stock: 32
Mars:
Business: Market
Market Sells: Weapons, Shields
Weapon Stock: 3
Shields Stock: 124
(When I say Weapons, Shields, I don't mean it sells that Catogry. It will be indervidual Items. Like Weapon1, Engine4 etc etc)
I have been trying to design the table(s) for 2 days and im getting no where. They all need to be linked in someway, but yet everything needs to be uinque to the Sub-Parent Business and Parent Planet. Confusing.....for me.
Here is a picture of the tables I have so far (for this part), I did it in Exel so I can easily change things around hehe.
http://img530.imageshack.us/img530/8460/mysql4zv.gif
The Business I have set up as a BitValue, which means I could easily allocate Business to a planet.
Please can someone help me, i've been strugling like mad with this! It would be greatly appricated.