Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Database Design

$
0
0

Hi everyone, looking for some advice on a database design, the business model is around an online ecommerce tyre website.

Basically, I have to purge the tbl.Products each night and then re-populate the table with the new product details.

Database design

tbl.Orders

tbl.Link_OrderProduct

tbl.Products

tbl.Link_products_Garages

tbl.Garage

Business rules

tbl.Garage can have many products

tbl.Products can have many tbl.Garage , hence the reason for a tbl.Link_products_Garages

tbl.Products can have many tbl.Orders

tbl.Orders can have many tbl.Products hence the reason for a tbl.Link_OrderProduct

Now every time I need to purge the tbl.Products I’m running into a bit of a nightmare FOREIGN KEY constraint arrrrggggg

What’s the best way to purge the data from the tbl.Products and then re-populate the tbl.Products.

Any pointers much appreciate.



Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>