I've been working through some Rails tutorials and am still a novice at best, but I'm thinking about a project I want to develop and am just trying to wrap my head around the db design. I suppose this would also work in the db forum.
I'd like to develop an online ordering system for my restaurant. It's a deli counter that offers sandwiches, pizza, soup etc. My main concern is to create a shopping cart type app that allows the user to choose each topping/bread etc on each sandwich.
I haven't started coding yet, but I'm stuck just thinking about the db design itself. Each sandwich order will have a radio button list for bread, checkbox for cheeses and checkbox for toppings. My first thought was to create one massive table with fields such as, white,brown,rye,chedder,swiss,ham,tomato etc and have each field as an enum y/n. But, this seems really sloppy. So I thought I could separate each section into their own tables, ie. bread, cheese, toppings and maintain a main sandwich table with other info. The separate tables would still be y/n entries and would reference the sandwich table id as foreign key for each sandwich so I would do some joins to get the final order. My only final issue is that I'd actually like the different toppings to be editable through a web interface, so anyone can add or remove available toppings. Now i'm just totally confused as to how I should design this in order to maintain scalability and flexibility.
I guess this is kind of a convoluted post, but if someone with more db experience might be able to point me in the right direction I'd really appreciate it.