Add, remove and delete

Hey,

I have am working on an app, that has 2 data types:

  1. Artist
  2. Song

And artist has the fields:

  1. Name (text)
  2. Songs (list of Songs)

And song has the field artist and name:

  1. Artist (Artist)
  2. Name (text)

When I create a Song (many previous Artists created) and add that Song to the list of songs of an Artist. Is it neccesary to add the Artist to the song?

And when I delete a song is it neccesary to remove the Song from the list of songs of an Artist, or by only deleting the Song will do?

Thanks in advance :slightly_smiling_face: :computer:

If you do not add the contents of an entry it will be incomplete.

If you delete an entry’’s field content it will have that field empty.

The above will only be problematic if either one, or both, are needed for logic to function in your app.

Can you explain a little bit more?

Ohh, okay, so when I delete an entry, it will be removed from the list, right? So no need to remove it and then delete it.

Can you also explain a little bit more?

Thanks for your help

Examples:

If you had a condition in an element that depends on an entry having content

If you had a condition in a flow that depends on the absence of data

If you need counting of entries that have that content

If you count entries that do not have that content

Please note that the way the question is posed requires more context.

Are you interested in understanding more about best practices in database modeling? If so, this is a great resource recommended by a frequent Bubble contributor @boston85719. In my case, learned tons from going through some of the blog articles! :grinning:

Yes, I think this is one of the resources I provide to my Bubble Bootcamp students that I frequently hear was very helpful…the post I listed this on originally is also one of my most liked tips, so definitely a resource a lot of Bubblers find helpful.

1 Like

Ohh, okay, thanks for the help

1 Like

Yes, I think I saw a post / reply from you also recommending that article.

I’m going to read it, thanks.

This topic was automatically closed after 70 days. New replies are no longer allowed.