0

I'm trying to achieve this complex schema.

{

relation1_id : Number,
... 
...

item_caption: [
    {
        caption: '',
        subcaption: '',

        products: [
            {
                pid: 1,
                quantity: 5
            },
            {
                pid: 2,
                quantity: 52
            }
        ]
    },
    {
        ... 
    }
]}

I did consider JSONB but i may need statistics of the child schemas ( products_heading & heading_items ). I heard JSONB isn't well verse with statistics.

My current schema. I'm having a hard time writing CRUD api point for this. How would you tackle this ?

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.