Note that there are some explanatory texts on larger screens.

plurals
  1. POMigrating DB: Keep relations constraints?
    primarykey
    data
    text
    <p>At the risk of being called a fool, I am wondering what your thoughts are on maintaining relationship constraints within a MS SQL DB.</p> <p>I am migrating a system into a .NET environment from ASP. This brings with it business objects and other tiered-coding techniques, which work to abstract the database from the user/API. The new application has a definite API above an Entity Framework DAL.</p> <p>The application DB in the old database is large and the purpose of some of the tables will be changing to start containing binary data, in the form of files, etc. I'm keen to split these off into separate DBs to ease management at the client sites where disk space is at a premium.</p> <p>Is there any value in retaining relationship constraints between tables?</p> <p>Assumptions:</p> <ul> <li>Code is tested</li> <li>Where relations are important, execution is performed under a Transaction</li> <li>Access to the DB is via the API only, other access by third parties is unsupported.</li> </ul> <p>Reasons to keep constraints:</p> <ul> <li>Enforces the data structure</li> <li>JOINs are faster?</li> <li>Query Plan assistance?</li> </ul> <p>Reasons to remove constraints in new .NET version:</p> <ul> <li>One can assume that the API/BIZ logic would manage relations such as Parent/Child. </li> <li>Reduces opportunity to hive off sections of the DB into other catalogs (the system is built using a Plug-in architecture, most tables may operate in isolation)</li> <li>Am I correct in believing that SQL has to do additional checks during INSERT on constraints, which may be unnecassary when an API above the DB is managing this?</li> </ul> <p>I throw my question upon the community anyway in case I have missed something dumb or if this is just a nightmare waiting to happen ...</p> <p>Many thanks,</p> <p>Nathan</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload