Closed greut closed 12 years ago
If not everything can be done with triggers, should we not use something else entirely?
I'm still not clear on the problem at hand, we should meet to make significant progress on that. I have too much stuff to do which means it's hard to focus. If you're here we can trail through the different requests to write. When's a good time?
I'll finish the sqlldr work (see the dedicated branch), it's sooo much faster that it's insane. Having that in place will enable faster changes, triggers, schema, something else, … Oracle being that powerful (PL/SQL is a pandora box) I doubt that things cannot be done there. By “not everything can be done with that though” I meant that we won't be able to denormalize everything. I'll start with the coach stuff to see how it works.
For a meeting, Friday is good since you live according to the Eastern Daylight Timezone. I don't have any other free afternoons only mornings.
I'm free on mornings too you know :)
Good news for sqlldr!
I don't want you to feel jet-lagged or anything ;-)
Meh, coffee solves all problems, and I might have to drive to Geneva friday afternoon, so...
Oracle comes with materialized view which is a way of doing denormalization as simply as writing a view, much more simpler than any triggers. As the coach is an empty shell right now, I could try replacing it with this kind of view meaning more stuff are gonna point to people
(fyi, drafts
belongs to a person
and not a player
anymore).
materialized view seem to useful once you start using the EE version of Oracle, and not the XE. So I backed off and used a trigger. A coach
is more than ever an empty shell containing only denormalized data, coach season
are not belonging to a person
and not a coach
anymore. I'm tempted to do the same to the player
: why do birth-date, weight and height belong to a player
more than a person
?
Things denormalized so far:
TENDEX
If you think that something else should be denormalized create a ticket. I'm closing this one.
The data we didn't import yet that might be useful for the queries required:
[season|playoff]_[win|loss]
— it can be computed fromcoach_seasons
player_stats
for one player.[first|last]_season
might help knowing the ones who never played.TENDEX=(points + reb + ass + st + blk ‐ missedFT ‐ missedFG ‐ TO) / minutes
TEAM TENDEX=sum of top 5 players TENDEX
Am I missing something? Adding too much?
What changes should we do to adapt the schema to those requirements?
I'd go using triggers so things will be updated as the data evolves. Not everything can be done with that though.