Main view & sub view (Notion)
In Microsoft Access, there is something like a main form and a sub form. E.g., concerning orders, the main form contains the order heading and order totals and the sub form would contain the order lines. I guess that in Notion, this would rather be called main view and sub view, or main database and sub database.
But how would you build such a thing?
How this worked in Microsoft Access
Around the turn of the century, I have had extensive experience with building these kinds of forms on Microsoft Access, hence why I use it as reference. If I remember correctly, there were basically two ways of doing this:
Linked subform data source?
If I remember correctly, when you insert a subform (a form is just a windows) on a mainform, and you specified the source for this subform, I though you could directly link it to the source of the main form.
Filter on the content of a control
The other approach, that I'm more sure about: The data source for the subform had a filter. The input for that filter, was a value in a control on the main form. A control is a field on that form.
The subform query would be something like this:
select * from order_lines where order_id = MyMainForm.textbox_order_id.value
This is quite a monumental stap from a database point of view: The user interface gets factored in. In MySQL, I would never come across something like this, for MySQL is concerned with the storage layer in a three-tier architecture. This would be something that would play a role in the top two tiers: Business logic and interface. It would be more something to do in PHP or Python. Not in SQL.
Peek view with a form?
Board view & grouping?
- Grouping (columns) would be order-ID
- Subgrouping (rows) would be order lines
Problem: Where to put the order header (including orde totals)?
Peek view & backlinks?
- Have an order header peek view, including backlings
- Click on a backling to see the orderline
That doesn't sound very good: I think I would like order lines and orders on the same screen
Filter on the value of a control?
See the earlier chapter on how I used to do this kind of things in Microsoft Access. As far as I am concerned, this is not possible in Notion.