I think it might help to adjust your thinking about struct. Do not think about databases or even schemas at first. Start with your content. Think about wiki pages as you know them, then think about what data you would like to formalize later on.
Let's have an example. You're a carpenter and you want to have a wiki page for each customer project you take on.
So you start with a couple of pages:
- project:table
- project:cupboard
- project:chairs
Each page is a normal wiki page describing the project. They are pretty different. A table is quite a different thing than a cupboard. But there are some things that are similar. Each has a customer. And there's a price on each page. And you also like to write down when you started the project.
You still don't need struct for that. You simply have a list on each page like this:
* customer: John Doe
* price: 400€
* started: 2019-12-13
But after you do this for a while you notice that you'd like to list all projects you did in 2019 that resulted in more than 500€.
With plain wiki text you can't. It would be nice to have this kind of data in a more formalized way so you can later aggregate and filter it. Or even export it to CSV to do some Excel magic on it. And that's the point where the struct plugin comes in.
Instead of putting the data into a wiki text list, you create a schema that defines the data you want to formalize:
- customer is a text field
- price is a decimal field
- start is a date field
Next you assign this schema to the namespace projects:*
. Now, whenever you edit or create a page in the projects
namespace, you will find a little form under your normal wiki editor asking for the values of these three fields. Once saved, the values will be shown at the top of the page in a little table.
Next you can create a new page and put an aggregation table on it. There you can list and filter all the data in the schema you defined and easily figure out your projects in 2019 with more than 500€ value.
Once you got to this point, you should have a much better understanding on how struct basically works and advance to the next steps. Like make customers their own pages and use a lookup field to easily select the customer from a dropdown.
I hope that helps with understanding what struct does.