Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (526)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Choosing a database software  (Read 5989 times)
0 Members and 1 Guest are viewing this topic.
Offline RylandAlmanza

Junior Devvie


Medals: 3



« Posted 2012-03-04 21:01:49 »

I'm about to make a game to test networking in java (I've worked with networking in other programming languages, so I'm semi-familiar with it.) It seems that every language I've tried has a different preferred database software. For PHP, it was MySQL. For Javascript (Node.js) it was either MongoDB or Redis. etc. What's java's preferred database? Anyone have some recommendations?
Offline _Al3x

Senior Devvie


Medals: 7


Indie Games FTW!


« Reply #1 - Posted 2012-03-04 21:05:10 »

I would go with MySQL... but I'm new in Java so... Sad

Offline teletubo
« League of Dukes »

JGO Ninja


Medals: 48
Projects: 4
Exp: 8 years



« Reply #2 - Posted 2012-03-04 21:07:47 »

I use MySQL since it's free and it's okay.

However I don't know why you're worried with that right now.  You should just do your network code and make it work, then when you have something done, start thinking about persistence.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline _Al3x

Senior Devvie


Medals: 7


Indie Games FTW!


« Reply #3 - Posted 2012-03-04 21:10:25 »

Also, with enough abstraction, can't you make your core software database-"independant" and later use anyone you chose? I mean, this way you'll have to tweak a few calls and that's it.

I think Tongue

Offline UprightPath
« Reply #4 - Posted 2012-03-04 21:15:55 »

Yes, very much so.

I've actually got a content system written where I'd just have to change a few SQL statements to go from Oracle to MySQL. And even then, it's mainly in the way I handle locks.

If your system is tied to a specific DB, then you're probably doing something very wrong.

Offline lhkbob

JGO Knight


Medals: 32



« Reply #5 - Posted 2012-03-04 21:17:46 »

I prefer PostgreSQL to MySQL from an administrative point of view. Their user model is so much saner.

Offline 65K
« Reply #6 - Posted 2012-03-04 21:22:14 »

In a Java forum someone has to mention JavaDB aka Derby Wink

Offline RylandAlmanza

Junior Devvie


Medals: 3



« Reply #7 - Posted 2012-03-04 21:29:18 »

Thanks everyone! That's just about all the information I needed! Smiley
Offline lesto

Senior Newbie





« Reply #8 - Posted 2012-03-04 21:31:16 »

derby is written in java, Hibernate is in java and is not a relational database, but a object-relational mapping (ORM): you can store object!
http://en.wikipedia.org/wiki/Hibernate_%28Java%29
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 833
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #9 - Posted 2012-03-04 21:33:54 »

I prefer PostgreSQL to MySQL from an administrative point of view. Their user model is so much saner.
PostgreSQL is far superiour to MySQL. The only thing holding it back is the unpronounceable name. Imagine introducing both MySQL and PostgreSQL to your manager, now imagine what he'll pick. Yes, that's how it goes. Cranky

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline lhkbob

JGO Knight


Medals: 32



« Reply #10 - Posted 2012-03-04 21:36:50 »

derby is written in java, Hibernate is in java and is not a relational database, but a object-relational mapping (ORM): you can store object!
http://en.wikipedia.org/wiki/Hibernate_%28Java%29
Not really, Hibernate translates the Java object definition into an equivalent relationship schema, and then automatically performs SQL queries to update, insert and select rows and convert them into java objects using byte code and reflection.

Offline ra4king

JGO Kernel


Medals: 355
Projects: 3
Exp: 5 years


I'm the King!


« Reply #11 - Posted 2012-03-04 23:27:01 »

I've heard H2 is an excellent and fast Java database software.

Offline ReBirth
« Reply #12 - Posted 2012-03-05 00:44:05 »

H2 and mySQL are great. I heard mostly game use H2 than mySQL.

Offline 65K
« Reply #13 - Posted 2012-03-05 07:52:17 »

I would also favor Postgres over MySQL.
For database access, MyBatis is worth a look.

Offline theagentd

« JGO Bitwise Duke »


Medals: 361
Projects: 2
Exp: 8 years



« Reply #14 - Posted 2012-03-05 09:47:54 »

I prefer PostgreSQL to MySQL from an administrative point of view. Their user model is so much saner.
PostgreSQL is far superiour to MySQL. The only thing holding it back is the unpronounceable name. Imagine introducing both MySQL and PostgreSQL to your manager, now imagine what he'll pick. Yes, that's how it goes. Cranky
I find that incredibly amusing, since MySQL was made by a Swedish guy and named after his daughter, My. "My" in Swedish is pronounced like a long version of the Y in "mystic", not like the English word "my" as in "My own car". Even funnier "mys-kul" (same Y as in the name My) would mean something similar to "cuddle fun".  Grin

Myomyomyo.
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 833
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #15 - Posted 2012-03-05 10:11:25 »

Interesting, but you have to agree that 'that swedish guy' was not a complete moron and realized that everybody else would read is as the english 'my', making it feel friendly towards the developer (and manager). It's the same concept as 'iMac, iPod, iPhone, iPad', it feels accessible.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline R.D.

Senior Devvie


Medals: 2
Projects: 1


"For the last time, Hats ARE Awesome"


« Reply #16 - Posted 2012-03-05 10:15:07 »

It's the same concept as 'iMac, iPod, iPhone, iPad', it feels accessible.

Sadly, it isn't Sad
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 833
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #17 - Posted 2012-03-05 10:17:34 »

It's the same concept as 'iMac, iPod, iPhone, iPad', it feels accessible.

Sadly, it isn't Sad
In marketing, it's about what customers feel, not what you actually deliver. Bottled water is a great example of that.


But enough of this derailing Smiley

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Archibald

Junior Devvie


Projects: 1



« Reply #18 - Posted 2012-03-05 12:13:23 »

You have 2 reasonable options, MySQL and SQLite. Depends what you are making. If you need a real relational database (like if you are making MMORPG) go for MySQL. If you are making something smaller (or to be more precise something with low amount of concurrent writes) go for SQLite, which is smaller, easier to install and is used on smartphones.
Offline cylab

JGO Ninja


Medals: 55



« Reply #19 - Posted 2012-03-05 14:25:47 »

Some more two cents:

- prefer PostgreSQL over MySQL
- stay away from OR-Mappers like Hibernate

Mathias - I Know What [you] Did Last Summer!
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 833
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #20 - Posted 2012-03-05 14:35:38 »

Some more two cents:

- prefer PostgreSQL over MySQL
- stay away from OR-Mappers like Hibernate
There are OR-Mappers and there are OR-Mappers. Yes, full blown OR-Mappers with their own SQL dialect are a pain in the ass, but at the other end of the spectrum, it's an even nastier pain in the ass to have to stuff those resultsets into HashMaps or instances of your own classes manually.

I usually work with utility methods that for generate the often used queries, like a simple SELECT statement (listing the columns in a table) and methods that pump the resultset into instances of classes that have the same structure as the table. It has support for foreign keys, to make it a bit more convenient. If I weren't allowed to use such a minimal OR-Mapper, I'd probably quit that job. Life is too short to write SQL in Java. Lips Sealed

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline ReBirth
« Reply #21 - Posted 2012-03-06 14:33:39 »

OR-Mapper? that things that translate my object class into table?

Offline cylab

JGO Ninja


Medals: 55



« Reply #22 - Posted 2012-03-06 20:49:20 »

Life is too short to write SQL in Java. Lips Sealed

I lately had a project with JOOQ, but I am not quite sure, if I like it or not...

Mathias - I Know What [you] Did Last Summer!
Offline Json

Junior Devvie


Exp: 7 years



« Reply #23 - Posted 2012-04-21 12:13:43 »

When picking your data store I'd say it's not about what language you're writing your code in, but rather what kind of data you're intending to store and what the requirements around reading and writing are.

I would also suggest you stay away from OR frameworks or at least seriously evaluate the pros and cons of using one. They tend to put you in a right mess if you use them the wrong way.
Offline Danny02
« Reply #24 - Posted 2012-04-21 15:10:40 »

I really liked using hsqldb. Its a Java DB with some quite nice features.
-in memory db inside your own application(no server setup required).
-write some sql commands in java(don't know what they are called, like insertion hooks)
Offline SwampChicken
« Reply #25 - Posted 2012-04-24 09:28:47 »

hsqldb -> H2
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

toopeicgaming1999 (72 views)
2014-11-26 15:22:04

toopeicgaming1999 (62 views)
2014-11-26 15:20:36

toopeicgaming1999 (15 views)
2014-11-26 15:20:08

SHC (29 views)
2014-11-25 12:00:59

SHC (27 views)
2014-11-25 11:53:45

Norakomi (32 views)
2014-11-25 11:26:43

Gibbo3771 (27 views)
2014-11-24 19:59:16

trollwarrior1 (40 views)
2014-11-22 12:13:56

xFryIx (78 views)
2014-11-13 12:34:49

digdugdiggy (56 views)
2014-11-12 21:11:50
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!