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?
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.
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’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.
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:
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.
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”. ;D
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.
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.