Quick analysis
😎
First a simplified ERD
+--------------+ +--------------+ +-----------------+
| Trial | | Culture | | CultureStep |
+--------------+ +--------------+ +-----------------+
| TrialID | ,---|-| CultureID |-|--, | CultureStepID |
| TrialCode | | | CultureName | '---|<| CultureID |
| CultureID |>|--' | (Culture ) | | ( CultureStep ) |
| (Trial ) | | (attributes) | | ( attributes ) |
| (attributes) | +--------------+ +-----------------+
+--------------+
Looking at the ERD, we can tell that:
Each Trial has one and only one Culture.
One or more Trials can share the same Culture.
And
Each Culture has one or more CultureSteps.
One or more Cultures can share one or more CultureSteps.
Inspecting the Cardinality
Table | Row Count
------------|-----------
Trial | 6793
Culture | 2327
CultureStep | 13957
As the query "Select * from Culture inner join Trial on Culture.CultureID = Trial.CultureID" returns 6785 rows, we know that there are 8 (6793 - 6785) Trials sharing the same Culture. We can also tell that each Culture has the average of 6 CultureSteps (13957/2327 = 5.998).
Since we do not know the distribution of CultureID in the CultureStep table, the exact numbers cannot be produced but here is an approxymation:
Select * from (Culture inner join Trial on Culture.CultureID = Trial.CultureID) inner join CultureStep on Culture.CultureID=CultureStep.CultureID
Given that each CultureID appears aprox. 6 times in the CultureStep and the set Culture-Trial has 6785 entries, the expected result should have close to 6 x 6785 entries.