In the latest episode of Build it with Tim, we dive into a complex application that allows user to login, select a test, register for that test, and then go through the process of actually taking that test. A user provides their answers, and based on a pre-defined correct answer, the user's answer is graded and calculated towards their final score.
The data structure is not overly complicated for this application but it's designed for use with the Tadabase Record Utilities pipe. While built specific for that pipe, the application follows a pretty common pattern and architecture. We'll use the following tables:
- Tests
- Questions
- Answers
- Test Registrations
- Test Questions
Administrators of the application create test records, and then create connected questions. For each question, multiple answer records are created that connect to the question, as well as, the relevant test.
The final 2 tables are similar in design with one major difference - these tables have an additional connection to the Users Table. In order to provide unique test instances for each user, we must create separate test registrations and test questions for each user that registers.
In order to do this, we'll use the Tadabase Record Utilities Pipe - specifically the Import Child Records function. By defining "template" records, ie. - existing registrations and test questions that connect to the template test registration - we can use the Pipe to find and duplicate this data and assign the new records to the user who selected the test.
I think in this case, reading about it is probably as difficult to understand as it is to explain it - and that's why I made this video!
Check out this weeks episode below
Published by