I'm trying to understand how the internals of Wikibase work. Specifically, I want to know how Wikibase is able to show the current statements of a Wikidata item in the web browser of end users.
I decided to inspect the source code (link to the Wikibase repository in gerrit.wikimedia.org), but as I am not very familiar with PHP and the internals of Wikibase, I believed that I didn't find the relevant part that accomplishes what I am looking for.
I presume that Wikibase keeps track of the current statements in a table and whenever a new revision is added to the Mediawiki's the revision
table, the table that stores Wikibase statements is modified accordingly. Then, when someone asks for the current statements of a Wikidata item, Wikibase returns the rows at the table that stores current Wikibase statements.
My question is: What is the workflow that is followed for Wikibase to return the current statements of a Wikidata item to users so that they see it in their web browsers?