Using Unity with a complex database

Hi all,
I am a newbie who’s currently designing a space-based realtime MMO. I’ve been looking at Unity as a way to build the game’s environment but I have a few questions before committing.

The game backend contains a large database, here are a few relevant pieces of information:

  • The galaxy in which the gameplay takes place features around 2 million stars, 5 million planets and a few million celestials to begin with.
  • These are all stored in a database and each item has a load of properties, e.g. stars have location (x,y,z), class, subclass, color, surface temperature, age, diameter, solar system modifiers, etc.
  • Each player will have to access this database through the Unity frontend (through a midtier which will take commands and get relevant data from the database)

The data retrieval path is client->server->database->server->client (so no direct connections).

I’m starting small, so the first thing I’d like to implement is galaxy view. In Galaxy view, a player clicks on a button in the GUI and then the GUI renders colored dots, each of the dots representing a star. Each dot will be positioned according to x, y, z, which are relative to the center of the galaxy. Each dot will be colored according to “color” value from the database.
The player should be able to zoom in and out using mouse scroll, rotate the galaxy using left click + drag, pan across using right-click + drag.

When right-clicking a star, more information about that star should be retrieved from the database and displayed in a small pop-up, e.g. age, temperature, class, subclass, chance of having planets.

I’ve been thinking of using an API call with OAuth implementation to make sure players will only see what’s available to them (e.g. visited stars would be blinking).

My question: does Unity3D support this kind of implementation? I’m particularly worried about database size and the ability to retrieve such a large number of records. An alternative would be to save common data in the client and have that data downloaded, then synchronize changes on demand. For example star locations will never change, but star names can change (there is a default name and a custom name, by default the custom name is empty but players can set names for stars under certain circumstances).

I already have this data in the database, but as a complete newbie I only know how to access the data directly (using SQL), not how the client would obtain it in a proper manner.

Any hints would be much appreciated!

Thank you for your patience @war4peace, now i am able to explain you some tips.

An SQL Server, MySql, MongoDB(NoSQL) all this databases are able to handle terabytes of data with fast response(1ms), obviously depends on your clusters and hardwares, don’t worry about the million of rows that will appear because of the stars, galaxys and other stuffs, i actually work with a bilion of rows, combining some technologies, such, SQL Server(Data), ElasticSearch(Fast selects) and MongoDB(Queue). Worry about your modeling you need a fast performance modeling? A structured Data? What will you need in the future?

If i am making things like that, my choose would be MongoDB, because i can store some informations in the same Registry as the Star, and he is NOSQL database, without joins or like querys that i need to wait minutes to be completed.

An example of the registry in MongoDB: Start XYZ01 - Temp 90 - Age 123457534, etc.

In the same registry i can pull some datas about that star without join another table or keep running all the current table to find it.

But remember, the NoSQL type architechture its different from the SQL Structured, you need to study a lil bit about the NoSQL such MongoDB.

You can take a look at this Duke post he explain some structure that is high recommend you to follow: Database Connections with Unity