If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4

Thread: Database Design

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Member #
    Hi, I am new to mySQL database design.

    I am having trouble getting my head around the best way to design my database for a simple online game.

    Here are the details followed by my attempt and questions:

    A game where multiple decisions are made by teams competing against each other.

    Decisions are grouped into 7 stages where each stage has multiple choice actions. Based on their decisions, their performance is calculated and outputted after each stage of decisions.

    At the end of the game the teams are ranked in terms of performance.

    Firstly I have drawn up some inputs that I will obtain from the users:

    Table Name: Game
    Game No.
    Total No. of Players
    Current Status
    No. of Teams

    Table Name:School Details
    Street Address

    Table Name: Team
    Team ID
    No. of Players in Team

    Table Name: Decisions
    Marketing Research T
    Sector Choice
    Start-up Consultant
    Sale Price
    Heating Element
    Head of Engineering
    Head of S&M
    Factory Size
    Machinery Choice 1
    Number of Machines 1
    Product Research & Development Budget 1
    Sales and Marketing Budget 1
    Advertising Budget 1
    Production Run 1

    Table Name: Summary
    (Linked to TeamID)
    Current Balance
    Previos Balance
    Current Market Share
    Previous Market Share
    Previous Price
    Current Price

    I have grouped these into what I think the tables should be. There is a possibility of a game running from different schools with the games being unrelated and running separately hence the GameID.

    A classroom is split into teams of about 5 people per team. Then they choose a team name, and begin to play the game together. They type in their TeamName and Password their logo is uploaded and they input their slogan. Next stage they make decisions via radio inputs. eg(They select their Martketing Team from one of three radio buttons, then they choose their Head of Engineering from one of three radio buttons). After some choices are made they input their price for the product and the details are sent to the database. Then they must wait until all other teams have completed stage1 and then the game manager decides when access is available to stage 2. In stage 2 and other stages they input new values and may update old ones. They are shown a report of their current financial state at the start of each new stage.

    Sorry for the long message but I am unsure how to divide up the "Decisions" table for it to run more smoothly.

    Thank you for your time


  3. #2
    Junior Member
    Join Date
    Oct 2011
    Member #
    Here is a drawing of my database design...there are a lot more attributes in the decisions box I never put in but you get the idea.

    I am wondering if this is correct also how could I improve it? I would like to break down the decisions into the stages as mentioned in the above post.

  4. #3
    Senior Member Ganners's Avatar
    Join Date
    Feb 2011
    United Kingdom
    Member #
    92 times
    Well, at the moment it's fine. What you have to ask is: Will you need to add more decisions in future? So at the moment, there's a field for each decision to be made, which is fine. But if you wanted the decisions to be more dynamic you could do something like:

    So in Decisions you will have your possible decisions as rows, then you can have as many as you want without the need to add new table fields.
    NeverPhased likes this.
    Mark Gannaway Software Developer

    Recent Experiments
    - Backpropogation Neural Network language solving (
    - Animated image to ASCII (
    - 3D Paper Characters (
    - Anagram solving (

  5. #4
    Junior Member
    Join Date
    Oct 2011
    Member #
    Yes I will need to be able to add or delete decisions in the future, thank you so much that's a great help

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 04:42 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: