- Home /
what database should i use
I am working on online game, but i got confused when i reached the database section. While searching on google i found that there is 2 types of online database, Firebase and mySQL. I don't know which one to pick for my online game. i need to store in it: username, pass, coin, gems, level,... i need the database to be able to hold high traffic.
sorry for my English. I know that this question is not related to unity but i am asking you as experts.
thank you in advance.
Answer by ZeN12 · Jul 21, 2017 at 07:51 AM
Database is a very complicated topic. If you don't know it don't develop it. My advice is to use services that provide storing data. Or find a back-end developer for this.
If you need to store only player info (score, name...) and you don't need relations between player (like you need to find all player with score between 50 and 100...). In this case you can use non-relational database where you just store a simple JSON. As an option you can use AWS Dynamo. Here is a plugin for this: https://www.assetstore.unity3d.com/en/#!/content/21215.
Another option is to google like this: "unity3d database service"
P.S don't forget to check the prices :)
Answer by Soniya_unity · Jul 21, 2017 at 07:56 AM
If You have Backend PHP developer then MySql is best, you can simply store and retrive data by API calling, but if you don't Have any PHP developer then go through XML Parsing. if you wants to work with Database then i think You should have PHP developer.
Answer by Jinkata · Jul 20, 2017 at 05:55 PM
Without knowing significantly more this is a question we can't answer for you. There are many many types of databases you can use, though there are a couple standard types. Just as important as what type of database you are going to use is also where/how you are hosting it and how do you access it. This a seriously open question and there's no simple answer.
I'm just assuming you're just starting out considering the type of question you asked and the example DBs you gave, I would recommend starting a free tier Heroku service and host in a Postgres db.
Keep in mind you can always change it later as you scale. Don't get caught up in trying to make the 'right' decision because there probably isn't one, and the time you waste trying to figure out how to do it perfectly (which usually isn't in the long run) you could be using to implement your idea.
Your answer
![](https://koobas.hobune.stream/wayback/20220612130733im_/https://answers.unity.com/themes/thub/images/avi.jpg)