MySQL applications for a game

Started by
10 comments, last by Brain 8 years, 6 months ago

I am looking to get an analyst job in the financial services industry, and I meet most of the requirements but knowledge of MySQL. What's more, they require a portfolio which I can show to the recruiters.

Coincidentally, I am in the business of making games and have spare time to learn MySQL. However, apart from storing save game data and doing leaderboards, what other things I can do with a MySQL library for a game? Is it possible to code an entire game solely using this language?

Thank you smile.png

Advertisement

It would appear that some people generate Mandelbrot fractals with SQL, and the claim is that (extended) SQL is indeed Turing complete.

But no, in general, SQL is not designed for that kind of stuff, and it's not Turing complete. It's not a "real" programming language, but a highly specialized language for managing and retrieving data.

Even a game like "guess the number" will be quite a challenge. How do you expect the user to enter the number, INSERT statements? Not saying that this isn't possible, but... it's somewhat... well, let's say odd.

If I had your job application on the desk and you were showing me how to draw Mandelbrots with SQL, I would acknowledge that you understand SQL a lot better than I do. But I would also conclude that you totally missed the reality check. Next please. Look up "Maslow's hammer".

I think you will fare a lot better if you demonstrate that you can use SQL (or MySQL) in a more "practical" manner (practical in particular according to what a financial sector guy will deem "practical"). Maybe with a PHP binding for a browser interface (this is really easy and straightforward to get up and running). Or Ruby if you don't like PHP.

Showing highscores / leader board is a good idea already if you want this in a "game" context. What about managing users and subscriptions?

Even the membership list of your town's dog club may be appropriate (including seniority and management of membership fees, and ranking dogs by how they did at competitions).

It would appear that some people generate Mandelbrot fractals with SQL, and the claim is that (extended) SQL is indeed Turing complete.

But no, in general, SQL is not designed for that kind of stuff, and it's not Turing complete. It's not a "real" programming language, but a highly specialized language for managing and retrieving data.

Even a game like "guess the number" will be quite a challenge. How do you expect the user to enter the number, INSERT statements? Not saying that this isn't possible, but... it's somewhat... well, let's say odd.

If I had your job application on the desk and you were showing me how to draw Mandelbrots with SQL, I would acknowledge that you understand SQL a lot better than I do. But I would also conclude that you totally missed the reality check. Next please. Look up "Maslow's hammer".

I think you will fare a lot better if you demonstrate that you can use SQL (or MySQL) in a more "practical" manner (practical in particular according to what a financial sector guy will deem "practical"). Maybe with a PHP binding for a browser interface (this is really easy and straightforward to get up and running). Or Ruby if you don't like PHP.

Showing highscores / leader board is a good idea already if you want this in a "game" context. What about managing users and subscriptions?

Even the membership list of your town's dog club may be appropriate (including seniority and management of membership fees, and ranking dogs by how they did at competitions).

Thank you :)

Would MySQL highscores/leaderboards be sufficient to get a financial analyst job or would I need to make a standalone app which relies only on databases?

That depends on what they are looking for and who is doing the interview, impossible to tell. But "no" is more likely than "yes".

When someone wants a portfolio, then usually the idea is that you are someone experienced in the field who can present some actual work made for other clients/employers. They don't want someone who has an approximate idea learned from online tutorials last week, but they want someone who has already done something that works. It needs not be something commercial, I've had -- although I wasn't looking -- job offers (...which I turned down) because I had released some FOSS software that they had run across, and which they apparently liked enough.

Pulling highscores from a database is a start, but it's not precisely an outstanding, daunting task which requires a lot of skill. Which is why I mentioned managing users and subscritpions as an example earlier. This includes payments, which is not just somewhat "related to financial", but properly normalizing and then linking e.g. characters to user accounts and to payments (and support tickets, etc) is also something that goes beyond "trivial". It's something that not just anybody will be able to hack together in an afternoon after reading through the MySQL docs once. Which is what they want to filter out.

If your CV and all your other skills are a alright, then that may be enough to get an interview (note "interview" is not the same as "job"), depending on what they're looking for.

However, unless SQL is not really mandatory or unless the interviewer is a total idiot, you will still need to have at least a moderate understanding of the matter to convince him that you indeed do know what you pretend to know (instead of just having copied some cookie-cutter code from the internet).

You said that you have everything except (My)SQL knowledge, which suggests that you know rather little about it, or nothing at all. Thus, before applying to a job which makes that a requirement, I would suggest you spend some considerable time learning first.

Being able to do simple inserts or selects with order by or group by are trivial and can found on Google with a minute of searching. MySQL starts getting more interesting with you start trying to aggregate data from multiple tables. With it being a financial job I'd have to assume you are going to be doing more then selecting a couple of columns from a table. Just knowing the query language isn't enough either, you have to be able to smartly put together the query for best performance. You can easily take a query that takes a second or two to run and turn it in to minutes if you tried doing something like selecting from an non indexed column. Depending on how hardcore you really need to know MySQL for the job they could easily spend a few hours on practical tests. Trying to do a little mock accounting spreadsheet type app to calculate all the usual accounting info using MySQL to store and create results would probably go much further then a game. Depending on how starched their shirts are games are still looked down by some in the corporate world.

Possible Stuff:

  • Highscores
  • Liddle game with map composition / savegame / player statistics in the database

After you are good with SQL, you should look into MySQL stored procedures to shift the data handling as much as sane and possible to the DB Server...

When you find the gme you want to make, focus on DB features that could come in handy.

e.g. a DB trigger that detects a new Nr 1 highscore and fires a stored procedure to change the MOTD or to write a blogpost with some screenshots.

Why is this in Production and Management?

I am looking to get an analyst job in the financial services industry, and I meet most of the requirements but knowledge of MySQL. What's more, they require a portfolio which I can show to the recruiters.


Sounds like a Job Advice question, but then there's this...

Coincidentally, I am in the business of making games and have spare time to learn MySQL. However, apart from storing save game data and doing leaderboards, what other things I can do with a MySQL library for a game? Is it possible to code an entire game solely using this language?


That sounds like a For Beginners or General Programming question.

Moving this out of Production & Management, where this does not belong.

-- Tom Sloper -- sloperama.com


Would MySQL highscores/leaderboards be sufficient to get a financial analyst job or would I need to make a standalone app which relies only on databases?

Depends on the job.

If the job is for a junior developer, or for someone who rarely works with database, or for a position where they are willing to help you learn, then maybe. But if it is for a job where they expect many years of experience and competency, probably not.

During an interview a good interviewer will ask questions that go deeper, and deeper, and deeper, until they figure out how much you really know.

Normally a technical interviewer will start simple, asking you for the code needed to retrieve a few values, how to insert some values, update, and delete. Then they'll ask harder questions, like some joins, some tabular computations like the best in a list, or code to help with pagination (display 1-10, 11-20, 21-29, ...), and similar. They'll dig deeper asking about indexes and maintaining indexes and using hints. They'll ask about security models. They'll ask about data correctness. They'll ask about isolation levels and concurrency tickets.

And they'll keep asking questions until they really know how much you know.

If you are looking for a job requiring 5+ years of database programming experience you should not expect to get the job if your exposure is writing a high score table one time.

But if they are looking for someone who has had a small amount of exposure and are willing to work with you because you know the rest, then you might be a great candidate.

Just don't lie, because they WILL discover it sooner or later. Lying is an effective way to either get passed over for the job if they catch you early, or fired from the job if they catch you later.


Is it possible to code an entire game solely using this language?

Not really code but you can use it in a data driven engine\game to drive all data for it.

You could drive all the data in a game as large(By large I mean dataset) as World of Warcraft with SQL. Quest, NPC\Positional, Ability and Map data can all be represented by tables, rows and columns in SQL.

Engineering Manager at Deloitte Australia

A highscore table is probably not going to cut it. In fact a highscore table is pretty much a hello world program.

Think how SQL may be used in finance .... Now think how you may use this in a game.

In finance the database is going to hold prices of commodities, transaction history, Profit and loss calculations, customer transaction history etc..,

So if you want to gamify this you could create a database backend for a shop in an MMO. You'd need a table of all the items for sale (potions, armour etc..), you'd need a table of all the transactions. You'd probably have stored procedures to calculate the PNL taking into account things like bonus modifiers etc..
What a recruiter is going to be looking for is how well your database is structured:
Have you just bunched everything in a single table or have you separated concerns into separate tables (for example transaction history should not be in your items table). Are any of your stored procedures going to cause a bottleneck.

All this is database 101 stuff. As an analyst you wouldn't usually need to write to implement all of this stuff but what you would need to be able to do really well is write queries to return specific sets of data.

For example your level 5 character walks into a potion shop wearing a thieves guild ring.
You would need to have a query that can populate the shops inventory so you'd need to be able to get level 5 and lower items that have the attribute "potion" combined with any black market items available to members of the thieves guild combined with any items that this character has previously sold to this shop (transaction history). You'd also need to set the prices based on any modifiers (skills table) that are pertinent to members of the thieves guild.

This topic is closed to new replies.

Advertisement