A couple of summers ago I worked for company that needed an Access DB designed for their sales and record keeping. One thing that bugged me during that summer was sometimes not being able to change the datatype of a column, delete a column, or delete a row (entry). And, if memory serves me (this was five years ago), I think I sometimes copied entire tables of data out, recreated the table with the change I wanted, and then copied it back in. Honestly, probably most of the problems I had had to do with my extreme lack of DB design knowledge at the time, and I was probably trying to change things that you obviously shouldn't. However, I'm trying to avoid the same problems this time around.
This summer, I'm now working in MS SQL Server 2008 Developer, and once again am setting out to design a significant DB system. So as I go about this, my question is, what will I not be able to go back and change later? Specifically, I know that most of the restrictions happen regarding primary/foreign keys, so what should I look out for as I go about designing?
For instance:
- Can I change the datatype of a primary key? What if it's referenced in another table?
- Can I change the primary key? And if it's referenced in another table?
What other obvious restrictions might I run into that I should be aware of? Sorry if this seems like a obvious/stupid question, but I think many beginners need to know the answer to this - and I'm one of them!
Thanks!