Thanks so much!
One question, (that I’m thinking is probably a long subjective answer)
How would you handle a database that mixes existing public data, with private data that follows the same schema?
Would I create separate tables for public and private, or mix them together with a field that identifies them as public or belonging to the user?
For instance… let’s say you have a recipe app that stores users recipes only they can see.
They can use existing categories, meal types, and methods, or, create their own.
So each recipe will have:
Thumbnail Image
Name
directions
ingredients(text only)
category
type
method
Then the part I’m unsure about let’s say I provide:
Publicly available:
Categories 3 [French, American, Mexican]
Meal Type 3 [Breakfast, Lunch, Dinner]
Method 3 [Sautee, Grill, Bake]
Generic images 20 (to be used if the person doesn’t have a photo for the above 3 )
Then a user could also add additional private categories, types, methods, images to their own recipe items, not viewable to any other users.
Example Private items:
Categories: [Italian, Thai, Mom’s Southern, Jimmy’s Secret, …]
Meal Type: [Brunch, After Workout, Midnight Snack, … ]
Methods: [Broil, Vitamix, Reverse Sear, Air Fry, … ]
Icons for the above data could be chosen from the existing bank of images, or the user could upload their own.
Then also, users could create lists of these to sort by that are not permanent: [ Favorites, October diet, Pam’s Birthday Dinner ]
This is what I was thinking, but I think I’m doing this wrong:
Tables - [Columns]
Categories - [ name(string), icon(File reference), privacy-user/public(Boolean)]
Meal Types - [ name(string), icon(File reference), privacy-user/public(Boolean)]
Method - [ name(string), icon(File reference), privacy-user/public(Boolean)]
Icons - [ name(string), image(File reference), type(Multiple Choice), privacy-user/public(Boolean)]
List - [name(string) (PK), recipe (FK)]
Recipe - [ name(string) (PK), image(file reference) , directions(text), ingredients(text), category (FK), mealtype (FK), Method (FK), List (FK) ]
appreciate any advice or guidance!