r/DatabaseHelp • u/AmauryH • Apr 21 '20
Quick question about db structure
Hello guys,
I have a web designer background (html/css/javascript) and I'm starting to learn more about development.
I'm following Andrew Mead's courses about react and at the same time, I'm building a small web app with what I learn.
The course isn't about db structure so I'm not really prepared to the reflexion that I need to have before starting.
I'll go with Firebase. (to be able to use what I'll learn from the courses)
The purpose of the app is to manage a collection of actions figures.
Each action figure will be an object:
{"id": "unique-id","url": "https://website-where-i-m-getting-the-data-from.com","name": "name","description": "description","img": "https://website-where-i-m-getting-the-data-from.com/some-img.jpg","infos": {"Toy Line:": "toy line","Scale:": "3.75\"","Retailer Exclusive:": "No","Variation Pictured:": "No","Date Stamp:": "2007","Released:": "2007","Joint Count:": "12","Joint Details:": "Ball-jointed neck, 2 ball-jointed shoulders, 2 ball-jointed elbows, 2 swivel forearms, waist, 2 hips, 2 ball-jointed knees","Accessory Count:": "3","Accessory Details:": "Removable 2-piece helmet, Blaster, Removable chest armor"
},"isInCollection": true,"isInWishlist": false}
I'll need to perform some actions :
- Render full list
- Render list with conditions (name, toy line, etc...)
- Render list of name or toy line.
My question is:
Can I go with just an array of objects "Action figures", or a best practice would be to create a second array with all the names and a third with all the toy lines ?
We are talking about 300 items, 600 tops.
Thanks for your time!