======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Depends how you access the database.
If it's always via SPs then you can use those to maintain integrity - but why not put on the foreign keys? You can always drop tyhem temporarily if you need to do some admin work.
They will save you a lot of trouble in invalid data when someone messes up an update.
======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Still better to have the FK's unless you find they impact performance.
They will protect against someone doing something silly.
Why are you reluctant to implement them?
======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
They will also help new people to understand the database structure and also give something for diagramming tools to work on in the future.
======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
IMO makes some sense... assuming several things: a) you have absolute control over data changes, b) everything goes through SP, c) stored procedures are well written.
Personally I often cannot fullfill requirement a), so I use foreign keys whenever necessary.
>> since I write good SQL anyway
If I had a penny for every time I've heard that.
The important question is whether anyone else is ever going to work on this system. If you think you are going to be the sole developer involved with this system for it's lifetime then that's fine - if you want to move on then you should consider the affect of your actions and code so that the system is easy to understand and maintain.
I'm wondering if you have been building unnormalised schemas and this is being normalised properly which is why this is comming up.
======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
I wouldn't be without FK constraints. I have never found the overhead to be much of a burden, and it keeps you from having to write a lot of RI (referential integrity) code in your SPs. Trust me, the database can enforce the RI with less overhead via constraints than you can with custom code in SPs.
Furthermore, though from an application standpoint your database will be accessed through SPs, I doubt that is the case for administration. DBAs will use Ent Mgr and Query Analyzer, etc. and you will save yourself tons of headaches by having the constraints in place. And, if you are the DBA, you will be GLAD you have them there.
Lastly, might I lobby for ErWin. Find a copy...go to Ebay...ask on newsgroups, but get a legal copy of the software, even if an older version. The last couple of versions have supported SQL 2K, SQL 7, etc. and haven't changed that much. With ErWin you diagram and IT generates all the schema, with options for including FK constraints, FK indexes, etc.
How does ErWin stack up to Visio? We have msdn licenses and so its hard for me to get them to spend money on other software without a DAMN good reason...
I have used ErWin for years, and tried Visio when it first got ER diagram capabilities and at that time didn't find Visio as powerful or as easy to use. However, that could be because it wasn't "what I knew" and it may have gotten better since then.
ErWin is meant specifically for this task and has been around (and developing) for years.
For Visio it's more of an add-on.
Saying that ErWin is a lot more complicated and has more of a learning curve.
For large projects I use ErWin for small things (which I suspect this is) Visio or word or whatever.
======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.