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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:48:05+00:00 2026-06-10T04:48:05+00:00

I am doing a little programming exercise in Java to get me back into

  • 0

I am doing a little programming exercise in Java to get me back into the swing of things before school. My program will be video game (Team Fortress 2) related and as such I need to store data about a large number of weapons.

My current model is that I have a class for each type of weapon, (e.g. Scout_Primary or Soldier_Secondary) and I will modify the variables in each class depending on what specific weapon is selected. For example if Scout_Primary is “Scattergun” I will modify its base damage and reload speed accordingly.

If you are familiar with TF2 you will know that there is a large amount of weapons. How do I store all the weapons’ stats in my program? I do not wish to write giant switch statements containing stats for each weapon in a category. I am very eager to work with SQL more (I have some experience with it but not too much, I have used JDBC before).

Is it possible to create a database and just package it with the program itself so that I don’t have to worry about hosting? The only experience I have is with remote databases.

What I would like to do would be to have that local database and perform Selects and pass the data to a constructor. Thanks in advance.

EDIT: I have been looking at Derby, is this the right direction?

  • 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-10T04:48:06+00:00Added an answer on June 10, 2026 at 4:48 am

    Yes, SQL could be appropriate for this. You should look into Apache Derby, its main benefit is that it is lightweight and very easy to embed into a Java application. You can do exactly what you’re talking about – use it locally.

    The only issue will be bundling the actual data with your application. I would suggest you start with it in a simple file, maybe JSON or XML encoded, or even just CSV – basically anything you choose. Then when the program starts, you check to see if the database exists. If not, you create it, read the file, and store the data from the file into the database. Then you’re ready to do querying with SELECT statements or whatever else you want.

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

Sidebar

Related Questions

Okay, so I'm doing a little blowfish implementation in PHP as a programming exercise
I'm programming a simple Java NIO server and have a little headache: I get
I am doing a little programming exercise in Modula2. I am using the gm2
I'm only starting learning c# (and programming in general). I'm doing a little college
I was doing a little test to try Ruby's pty and I can't get
After years of doing a little programming on the side (Classic ASP for 12
I've been programming in Java for a little while now but have never really
I've been doing object-oriented programming for most of the past 7 years, using Java
I have been doing a little reading on Flow Based Programming over the last
My little brother is just getting into programming, and for his Science Fair project,

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.