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 9197275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:02:00+00:00 2026-06-17T22:02:00+00:00

I use a JDBC/Derby to store highscore data for a puzzle game I am

  • 0

I use a JDBC/Derby to store highscore data for a puzzle game I am writing. Due to the nature of the game, it will be useful to be able to look at the highscore data based on filters (i.e. show me my highest scores on this level, show me the highest scores on this computer, etc.)

This game also has a “campaign” mode, where the player works toward goals and unlocks achievements.

Currently the campaign data is stored in a Serializable java file that I write out to disk.

However, since the high score data is stored in a database, and because the PlayerID in the highscore table is going to be linked to the campaign file, it feels like I should also be storing the campaign data in the database.

The problem I’m facing is that I can’t break the data down at all. It seems to me that the “Player” table is going to be a hundred+ wide, each column representing the status of a goal or achievement.

I’m not a database guy. I don’t know if this is horrible design or not. I have read about normal forms 1-5, and I believe that I am in compliance with each form, but I’m suspicious that I’m Doing Something Wrong.

I really want the high scores in a database, and they fit perfectly. As a side effect, however, I am feeling a strong push to store the campaign booleans / other info in the database as well. It feels weird to have some data written to files, and other data written to the database, especially when the two things reference each other.

Am I doing something Wrong? Is it OK to have a table with a hundred or two columns as long as it’s actually obeying the normal forms?

  • 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-17T22:02:01+00:00Added an answer on June 17, 2026 at 10:02 pm

    If most of the columns in the Player table represent the status of a goal or achievement, you could consider that repeating data and model it in child table.

    Player Table
    PlayerId (primary key)
    PlayerName
    
    Goals Table
    GoalId (primary key)
    GoalName
    
    PlayerGoals Table
    GoalId (primary key, foreign key to Goal)
    PlayerId (primary key, foreign key to Player)
    

    The Goals table is a master list, which you setup once when you write the game.
    When a player achieves something, you insert a row into PlayerGoals.

    You should model your data based on the expected use cases. Modelling it in this way (compared to a many-column Players table) will make these types of queries easier to write:-

    • List players along with how many goals they have completed
    • Which goal has been completed by the most players?
    • Any other queries which treat Goals generically

    It would be easier to add a goal because it becomes a matter of inserting a row into the Goals table rather than adding a column. However, maybe you need to write a bunch of code anyway and this is of no significance.

    On the other hand, these types of queries will be easier if you have one big flat Player table with many columns:-

    • Get me everything about a particular Player
    • List every player that has completed Goal X
    • List every player that has completed Goal X and not Goal Y

    In the end, you need to choose if you want to make the concept of Goals something that you model explicitly in the database or not. What is right and wrong depends on your priorities.

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

Sidebar

Related Questions

I want to use JDBC to access a MySQL database. What or will an
conn = DriverManager.getConnection(jdbc:derby:mydatabase;create=true,props); will this line make my DB get overwritten everytime i execute
I need connect to Oracle database use jdbc driver. I look on structure URL
we built a java ee web project and use jdbc for storing our data.
I will have to use JDBC with an old database, which I why I
I use jdbc to retrieve data from SQL Server, and ANSI_NULLS is off .
I have a project in which i use JDBC with MySQL to store some
I am trying to use JDBC and my query is working in some cases
this is just theoretical question. I use JDBC with my Java applications for using
I am starting to use MySQL with JDBC. Class.forName(com.mysql.jdbc.Driver); conn = DriverManager.getConnection(jdbc:mysql:///x, x, x);

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.