Should I create relationships in my code? or on my SQL server?

  • Thread starter Thread starter michaaal
  • Start date Start date
M

michaaal

Should I create database relationships in my code (ASP)? Or in my SQL
server?

Thanks
 
Should I create database relationships in my code (ASP)? Or in my SQL
server?

Thanks

I'd say in the SQL server. That's what it's designed to do: no point
in reinventing the wheel. Besides, if the relational constraints are
in your code, there'd be nothing to prevent someone from opening the
tables using a different application and entering invalid data; your
code would be powerless to prevent it.
 
I'd say in the SQL server. That's what it's designed to do: no point
in reinventing the wheel. Besides, if the relational constraints are
in your code, there'd be nothing to prevent someone from opening the
tables using a different application and entering invalid data; your
code would be powerless to prevent it.

Good point, but on the other hand, if there was a problem with the way SQL
handled my data then I would be powerless in fixing the problem....not that
that's likely
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top