[Question] Does it fit my use case?
Extarys opened this issue · 0 comments
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:
"koa": "^2.3.0",
"koa-bodyparser": "^4.2.0",
"koa-multer": "^1.0.1",
"koa-pug": "^3.0.0-2",
"koa-router": "^7.2.1",
"reflect-metadata": "^0.1.10",
"rethinkdbdash": "^2.3.29",
"routing-controllers": "^0.7.0",
"socket.io": "^2.0.3",
"socketio": "^1.0.0",
"typedi": "^0.5.2",
"typescript": "^2.3.4"