Forum BigDB Question about number of objects in BigDB

Discussion and help relating to the PlayerIO database solution, BigDB.

Question about number of objects in BigDB

Postby MakanaGamesLab » March 13th, 2011, 1:01 am

Player.IO free package shows you can have up to 25,000 objects.

Is this independent of the complexity of these objects?

is not the same:

Code: Select all
player = {
    userid = ...
    name = ...
    energy = ...
    items =
    power = ...
    width = ...
    height = ...
    color1 = ...
    color2 = ...
    color3 = ...
    color4 = ...
    }
}


that


Code: Select all
player = {
    userid = ...
    name = ...
    }
}


Should not it be by size in bytes?
MakanaGamesLab
 
Posts: 8
Joined: June 13th, 2010, 6:59 pm

Re: Question about number of objects in BigDB

Postby Billy » March 13th, 2011, 6:36 pm

There's a limit on size in bytes as well (500Kb)

http://playerio.com/documentation/bigdb/objects

A database object has a maximum total size of 500Kb


And yes, each one can be arbitrarily complex

two objects in the same table don't need to have the same structure, and all objects can contain simple or arbitrarily complex datastuctures, depending on the needs of the developer and the particular game.


Loading and saving counts towards bandwidth, so you have to choose your trade-off (as I was asking about in the thread below...)
Billy
 
Posts: 4
Joined: June 23rd, 2010, 4:31 pm

Re: Question about number of objects in BigDB

Postby MakanaGamesLab » March 13th, 2011, 8:09 pm

Thanks for the reply Billy

but my question relates to something else.

What is the best way to design my database for not to exceed the limit of 25,000 objects in the short term?

Is it better to create records with many fields of basic data types?

For example:

EXAMPLE 1:

Code: Select all
Table: Players
player = {
    userid = ...
    name = ...
    energy = ...
    weapon1Name = ...
    weapon1Ammo = ...
    weapon2Name = ...
    weapon2Ammo = ...

}



EXAMPLE 2:

Code: Select all
Table: Players
player = {
    userid = ...
    name = ...
    energy = ...
}

Table: Weapons {
    userid = ...
    weaponName = ...
    weaponAmmo = ...
}



In the second example, the Weapons table contains two records for each
user.

then

In the first example, for each registered user I have a single object with two
weapons.

In contrast, in the second example, for each registered user I have 3 objects
(the user, and two rows in the table Weapons)

Then, the second design has a tendency to exceed the limit of 25.000
objects more quickly.

Is this so?
MakanaGamesLab
 
Posts: 8
Joined: June 13th, 2010, 6:59 pm

Re: Question about number of objects in BigDB

Postby HAnz » March 13th, 2011, 9:50 pm

To put it simply you could save all data connected to a player in one DB object, this will reduce the amount of DB objects, thus give you the most out of the 25k free objects.

However, you would do this at the expense of increased bandwidth usage since you need to load all the data in the DB object, even the the data you dont need right then.

If you don't load stuff very often and don't have that much info connected to each player it might make sense to only use one DB object per player. But if you want to do a lot of loading and/or get different data about the player then maybe you want to break it up into smaller pieces (more DB objects per player).
I make games and stuff.
User avatar
HAnz
 
Posts: 46
Joined: August 7th, 2010, 2:59 pm

Re: Question about number of objects in BigDB

Postby MakanaGamesLab » March 16th, 2011, 2:14 pm

understood! thank you very much HAnz!
MakanaGamesLab
 
Posts: 8
Joined: June 13th, 2010, 6:59 pm


Return to BigDB



cron