3 ms·
This is interesting, I always wanted to find a good use case for RDF but in the end RDBMS worked out fine. Sports events seem a good example. What made it easi
by Jakob 9y ago
This is interesting, I always wanted to find a good use case for RDF but in the end RDBMS worked out fine.
Sports events seem a good example. What made it easier for you in your example of basketball play-by-plays with RDF?
Taking the first example https://github.com/andrewstellman/pbprdf#example-analyze-a-set-of-games https://github.com/andrewstellman/pbprdf#example-analyze-a-s... and translating it into an RDBMS approach seems rather straight forward:
GameEvent (PersonA, EventType, PersonB, Game, Time)
Roster (Person, Game, Team)
To get the fouls drawn you then take
SELECT Team, COUNT(Team)
FROM GameEvent
JOIN Roster ON GameEvent.Game = Roster.Game AND GameEvent.PersonB = Roster.Person
WHERE GameEvent.EventType = "foul"
GROUP BY Roster.Team
Is it because of easier schema changes later on like introducing "secondsLeftInPeriod"? I suppose in a normalized relational scenario that could be something like:
Period (Number, Game, StartTime, EndTime)
And doing
.. WHERE Period.EndTime - GameEvent.Time < 5 ..
- andrewstellman 9y ago> Is it because of easier schema changes later on like introducing "secondsLeftInPeriod"? That's definitely an important benefit. RDF makes it really easy to introduce changes that not only don't break the existing schema, but can be entirely isolated or combined in queries. Another thing that RDF makes easy is analysis that takes advantage of a graph -- using relationships with other players, shots, etc. What players have the highest percentage making 3-point shots in possessions immediately after a player on the other team missed a 3-point shot? Building queries you compare previous possessions, shots, quarters; players' relations to each other (e.g. performance players who were subbed in after previous teammates went scoreless for 3 possessions) -- these things are a lot easier to do in RDF than in SQL. Obviously, there are many things that are easier to model in RDBMS and query in SQL than with RDF/SPARQL. Every tool has its uses.