I have a general question about inserting elements / updating current state of a database that follows an entity relationship design. Assume we have this design: https://www.visual-paradigm.com/VPGallery/img/datamodeling/EntityRelationshipDiagram/Entity-Relationship-Diagram-Sample.png.
Assume that everything is automated on a different platform, but we need to save it in our DB for archive purposes. Every week I get an update csv about new customers that have joined our company, all the orders and any new products that are added in the store. Can I do the following procedure while keeping the entity relationship model intact?
- Truncate products and add new products file
- Append new users
- Append new orders
Can I truncate the product table without interfering with FK and PK? Notice that every query should be in SQL, the updating as well.