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

  • Home
  • SEARCH
  • 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 275071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:42:28+00:00 2026-05-12T00:42:28+00:00

I am creating a light RPG game where a character is able to equipment

  • 0

I am creating a light RPG game where a character is able to equipment a weapon, an armor and 2 accessories slot. Here’s one possible solution:

equipped_equipment(<characterid>, <equipmentid>, <slotid>)
slot(<slotid>, slotname)
equipment(<equipmentid>, equipment_name, equipment_script_name)

So, to find out what weapon the character is equipping, I could do

SELECT equipmentid, equipment_name FROM equipment e, equipped_equipment eq
  WHERE e.equipmentid = eq.equipmentid AND eq.slotid = 'weapon' AND
  eq.characterid = 1

But how does this compare to something a schema like this?

equipment (<characterid>, weapon_slot, armor_slot, accessory1_sot, accessory2_slot)

Of course, using the three tables above (which is somewhat normalized – I could probably separate out equipment_name and put in into an equipment_details table or some sort) it allows me

  1. Add new slots easily
  2. Avoid blank entries
    (…anything else I may have missed out)

But the second, non-normalized solution allows me to get the IDs of all the equipment with one query, and adding a new slot is simply adding a new column. Which one is better in the long run? Suggestions and improvements welcomed!

  • 1 1 Answer
  • 2 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-05-12T00:42:29+00:00Added an answer on May 12, 2026 at 12:42 am

    There are tons of dupes for this, I’ll let somebody else find them 🙂

    I think a reasonable path to follow is:

    • Have a normalized database
    • Create denormalized views
    • Write your app to query those views
    • Profile (with tons of clients)
    • If db is certainly a bottleneck, profile harder to find out which tables are involved in it, then optimize the DB (indexes, query plans, and so on)
    • Profile again
    • If db is still a bottleneck, you can then denormalize to the views’ interface (so you don’t have to change the app)

    The reason for this is that fixing data corruption, duplication or inconsistency bugs is hard and sometimes even impossible, so try as hard as you can to get the proper performance with normalization. Only then, if you’ve proven you can’t get the desired performance, try denormalizing and only what needs to be denormalized.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hopefully someone here can shed some light on my issue :D I've been creating
When creating a setup/MSI with Visual Studio is it possible to make a setup
I am creating a silver light 4 application which shows Hindi text using my
I'm creating an inset border effect between paragraphs by using a light border as
I hope someone out there can shed some light on the topic of creating
I am creating a Silverlight 4 application with Entity Framework, RIA Services and MVVM-Light
Laurent of MVVM Light fame introduced me to MVVM, and the convention of one
Is there any material/tutorials available that can shed some light on creating drap and
I'm creating a simple flash light app. Whenever I turn the screen all white,
Can anyone shed a little light on how I would go about creating an

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.