Forum Documentation Showcase Pricing Learn more

Is it good practice to create relations to the same data type?


#1

Let’s say i have a Menu datatype and I have need for Main menu and Sub menus.

Should I create a own data type for both of them or not just to use single data type?

How does it work if I have thousands rows of data?


#2

It really depends on the context, but your menu example is one I’d keep under a single data type. Mainly because they’re essentially the same type of thing, and a sub-menu item might need to be converted to a primary menu item, which is much easier to do if it’s already the same type.

Other examples with hierarchy would be Category / Sub-Category, Keywords / Sub-Keywords, Users (Supervisor / Employee), Task / Sub-Task

If these things essentially have the exact same properties and only differ in label when related to another record, then I’d keep it as the same type. However, if the related data can be more standalone, like Shopping Cart / Line Item or Project / To-Dos, then you’ll want separate types.


Gaby at Coaching No Code Apps (formerly Coaching Bubble)

Courses & Products, Tutorials, Private Coaching, and High-level Development

Start Learning Today :mortar_board: