Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9040767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:04:28+00:00 2026-06-16T10:04:28+00:00

Well im working on an online game project where every player will get to

  • 0

Well im working on an online game project where every player will get to have a house, the project was going great until u had to organize houses thinking that i will have a limit of 10.000 players on the server.

so here are some facts:

each player may have up to 10 houses (min 1).
that means i need 100.000 possible houses so that no matter how full the server gets, there will always be 10 possible houses for each player.

there will be 20 cities, each city will have 200 neighborhoods, and each neighborhood will have 25 houses

so thats when the problem shows up, how would the database work?

whenever i want to see any of the 100.000 houses, it will belong to a neighborhood on a city, and i need to be able to play with that, like if i want to see house #5 of the neighborhood #123 city#8, then i should be able to get the data.

i was thinking about having one table with all 100.000 houses, and having values on that table to tell what neighborhood it is on what city, but it feels like there must be a better way. (maybe using multiple tables? i dont know)

so any help would be appreciated.

thank you for your time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T10:04:29+00:00Added an answer on June 16, 2026 at 10:04 am

    It’s hard to answer, because your complete requirements aren’t known.

    But I’d recommend that you normalize the database – 3rd normal form at minimum. If you don’t know what that is, I’d recommend learning about it ASAP.

    My best guess is as follows:

    1. PLAYER is one-to-many with HOUSE. If more than one PLAYER owns the same HOUSE, then it’s many-to-many.
    2. CITY is one to many with NEIGHBORHOOD
    3. NEIGHBORHOOD is one-to-many with HOUSE

    You’ll do JOINS to associate a PLAYER with cities, neighborhoods, and houses. You should have surrogate primary keys on all tables and appropriate foreign keys. Add UNIQUE indexes on all other candidate key combinations.

    Run EXPLAIN PLAN on all your queries to make sure that they don’t require TABLE SCAN and perform adequately.

    10,000 players isn’t a big number for a database. You won’t have any problem.

    Here’s what your query to select all the houses in a neighborhood might look like:

    SELECT *
    FROM HOUSE H
    INNER JOIN NEIGHBORHOOD N
    ON H.HOUSE_ID = N.HOUSE_ID
    INNER JOIN CITY C
    ON N.NEIGHBORHOOD_ID = C.NEIGHBORHOOD_ID
    WHERE C.CITY_ID = 8
    AND N.NEIGHBORHOOD_ID = 123
    ORDER BY H.HOUSE_ID
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well, I'm working on an online game in Java. I have a client and
I have some (I think) really great ideas for an online strategy game similar
Code below is working well as long as I have class ClassSameAssembly in same
I have a report working well where I extract the number of logins per
I have a script working well for creating ad hoc iPhone builds. I can
I have spatial search working well with SOLR 3.2 Example : ?q=*&fq={!geofilt pt=48.86761919303129,2.3527903735351856 sfield=coordinates
I have swipeleft/swiperight working well in my app but when the user does the
I have a show/hide toggle working well in multiple instances (thanks to help here
My Xcode's snapshot feature isn't working well. (version 4.2.1) I have used the snapshot
I'm working on a online painting application. The application swf as well as the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.