I am designing database architecture. I have user. User make request for order. Order is associated with payment. Once payment is completed, I want to generate sticker for that user.
Sticker has initial prize(i.e. $10). Now, admin can edit sticker prize. so, if admin change sticker prize then order will generate with new prize after change by admin.
By database architecture is as follow :
User(id, name, email, password)
Order(id, user_id, no_of_sticker,sticker_prize, address, status)
Payment(id, order_id, amount, date)
sticker(id, order_id, name, content)
sticker_info(sticker_prize)
Now, my question is--- is it good to create new table for just one single attribute. That sticker_prize is only available for admin to edit
Please give your valuable suggestion.
Thanks in adv.
Creating the sticker_info table, for the purpose of storing a single value is ok from a database design perspective. You should ensure you have a primary key on the table so you can not get duplicate rows.
In larger systems, there are often lots of values like this, and often the solution is a table like: configuration( configId, configValue )
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With