Having really hard time structuring Data

Hi everyone, I’m having a really hard time understanding the data structure! Very frustrating but I’m trying to accomplish an inventory management system with kind of a complex variation. Any help on data structuring is appreciated.

So I want to structure the data as:

–>Products
---->Type
------>Brands
-------->Brand Name
---------->SKU
------------>Colors
-------------->Color
-------------->Color
------------>Sizes
-------------->Size
-------------->Size

Thank you, this is really tearing my hairs out!

Can you give some examples ?

Hi pengx26.

Data structure has been one of my biggest obstacles the last few days since I’ve joined Bubble but I think I got it figured out.

Is this https://bubble.io/page?type=page&name=inventory&id=forum_app2&tab=tabs-1 demo app I’ve created more or less what you’re looking for?

I created a thing for Sizes & Colors, SKU and Brands. The SKU thing includes things for Sizes and Colors that were selected on the dropdown. The Brands thing includes things for the SKU selected from the dropdown. The SKU will will automatically relate to the color and size selected. From here you can continue with Types and Products. Work it backwards.

I hope it helps.

2 Likes

Thank you, that help me to wrap my head around it. However, I forgot a crucial part, I’m trying to have quantities related to those items so:

–>Products
---->Type
------>Brands
-------->Brand Name
---------->SKU
------------>Colors
------------->Color
---------------->Size
------------------> Quantity
---------------->Size
------------------> Quantity
------------->Color
-------------->Sizes
---------------->Size
------------------> Quantity
---------------->Size
------------------> Quantity

A Size according to a Color according to a SKU according to a Brand, each Size has its own quantity. I’ve tried structuring it the same way you have for quantities but then the quantities become universal for the whole SKU and not for each SIZE.

Ah ha! I finally got it after some crazy data structuring!

I had to structure it:

Quantities:(Quantity-Text) are within Sizes:(Size-text, Quantities-linked to Quantities) and then structure both of those within Colors: (Color-text, Sizes-linked to Sizes) and then finally structuring all of that within a SKU table of SKU: (Brands-Brands,Colors-Colors,Name-SKU List, Sizes-Colors, Quantities-Sizes).

Phew, that was a lot but thanks so much for the help!
Attached is an image to help others

1 Like

If that works for you, great :slightly_smiling:

But I must say it looks a bit odd, so having Sizes as a type Colours and Quantities as type Sizes.

I would have thought you would want a data type of something like “Inventory Line”.

This is a combination of SKU, Size, Colour (each with that data type) and has a numeric field called Quantity.

It just looks (to me anyway) that you are going to have difficulty doing updates and searches on something so complex.

You would want to split your “inventory management” (we have x of these SKUs of this colour and size) from your “product management” (This SKU only comes in Blue and Red).

Trying to squeeze both product structure/rules and inventory into a single structure may prove tricky.

3 Likes

Hmm maybe I’m thinking about it wrong. But I’m trying to have it to be hierarchal according to the Color-Size-Quantity because each Product has multiple Colors and each Color has multiple Sizes and each Size has their own quantity.
Example: Product Tools of Color Blue has a Size Small with 2 quantities, which differs from Product Tools of Color Red has a Size Small with 3 quantities.

The point of the system is so that I’m going to have a +/- on the side that reduces or adds quantity to that specific certain Product-Color-Size-Quantity. Right now what I have seems to be working correctly, the only thing is that every time I add a product, it adds a new “product” instead of placing it just under the other “product” that has the same name.