Now, I'm asking this because I never used an ORM before and would like to optimize this to reduce both database load and disk usage/space.
I want to use routing-controllers and socketio to send realtime data for some stats.
(Still trying to figure out how to make r available in my controllers though)
Table Abilities (belongs to Hero) (~1000 records, each hero may have between 1 and 30 abilities for example)
abil_id, hero_id, name, desc, dmg, recover, mod, ...
Table Upgrade (belongs to one or mulitple abilities)(~4000 records, each hero and/or ability may have between 1 and 30 upgrade for example)
up_id, name, desc....
Will this store 'Upgrade' elements in both an Upgrade table and a sub-doucment of the parent hero or ability.
Example 2:
I grab data from a website that doesnt support API and want to cache as much as possible to reduce the bandwidth/requests made to this site.
Discovered this on Twitter ! :O
Now, I'm asking this because I never used an ORM before and would like to optimize this to reduce both database load and disk usage/space.
I want to use routing-controllers and socketio to send realtime data for some stats. (Still trying to figure out how to make r available in my controllers though)
Example 1 Table Heroes: (~100 records)
hero_id, name, stat1, stat2, stat3, created_at, updated_at, version, abils
Table Abilities (belongs to Hero) (~1000 records, each hero may have between 1 and 30 abilities for example)
abil_id, hero_id, name, desc, dmg, recover, mod, ...
Table Upgrade (belongs to one or mulitple abilities)(~4000 records, each hero and/or ability may have between 1 and 30 upgrade for example)
up_id, name, desc....
Will this store 'Upgrade' elements in both an Upgrade table and a sub-doucment of the parent hero or ability.
Example 2: I grab data from a website that doesnt support API and want to cache as much as possible to reduce the bandwidth/requests made to this site.
Table Players: (~500 players) player_id, player_name, last_update
Table PlayerStats: (~alot, 1 document per player every 6 hours or so) player_id, stat_id, created_at, kills, death, orb, gems, time, hero_id, ...
I would like to get all kills for a player, or the global average kill per hero.
Thanks for taking the time! <3
FIY using: