Database Lists, How do I use a list?

Lists are a special type of field in a data type.

Lists are just that … lists of “stuff”. They can be empty, have one entry, or multiple entries.

At their simplest, they are just lists of values, so if your field’s type is “text” then they will contain multiple text values, so “apple” “banana” “cherry” but there is no reason why they can’t be empty.

Or a list of numbers - 1,2,3,4,5 or images or whatever. But they are very basic, there is no other data stored with them, no “last image added to the list” functionality.

A more complex list is created when the field type (so what you would normally have text, number, image etc in) is set to another data type - either a system one (so User - you can have a list of Users who like your Blog Post) or one your created yourself.

So you create a List of entries in another table/thing. You can add/remove/clear the list just as you can with text values.

And example would be having an INGREDIENT data type, and a RECIPE datatype.

A RECIPE would have a field called INGREDIENT LIST (or whatever you want to call it) it would have a field type of INGREDIENT and would be a LIST.

You can then start to ADD things/records from your INGREDIENT data type to the LIST on RECIPE. They are just links between one Data Type and another. Here a RECIPE has many (or one or none) INGREDIENTS. An INGREDIENT can be linked to many RECIPES. But when you change the “Mooshroom” text to spell it correctly “Mushroom” it will now be correct on all RECIPEs that include this thing.

We can of course then create a data type called RECIPE BOOK. That has a field, RECIPE LIST of type … RECIPE.

So yes, you can now navigate between things, using these links to select. So “Show me all the Recipe books that use mushrooms” or “Show me all the ingredients in this Recipe Book”.

9 Likes