I've seen this too, and know the reason. It's not a good reason, but it's a reason. I'd designed and built a database with full referential integrity. A team of programmers started to build a system around it. Every time their code violated the rules, guess what? An exception was triggered! As intended. Imagine that. It came to time to roll out the project. This meant deploying a fresh copy of the database to a production server. I used the same scripts that I'd written to deploy the development copy. This resulted in a herd of coders arriving at my desk, all red in the face, and demanding that I use the copy on the development machine. It seems that between them, their understanding of error handling consisted of "on error goto", and they'd been so overwhelmed by the exceptions that the RI in the database caused, they'd removed all of it from the database. Seems my idiot boss saw no harm in giving them admin rights on the database server. Thankfully, he took my side when I explained to him why the project was going to be delayed! So, if you're surrounded by idiots, then there's a reason why the RI was removed. It's not a good reason, but it's certainly a reason. Namely, you're surrounded by idiots.
Out of Memory
Posts
-
What use are foreign keys anyway? -
Hello IT, I need some technical information...Sounds familiar: Me : I notice that the backups for our new system only consists of daily incremental backups for the past two weeks. Can you please implement full weekly backups on a 4 week cycle, and full monthly backups on a 12 month cycle. I'd also like a full annual backup which is to be kept for 7 years. (This was a major finance system!!!) Them : Wow, that's a lot of backups. You do realise that we're backing up to the cloud, and we have to pay for all that space? I don't think we can justify the expense. We have budgets to think of. Me : We also have a legal obligation to our clients to keep their information safe. Two weeks of incremental backups isn't going to do it. Just picture what happens if there's a problem in mid December, then half the company goes on holiday, and the problem isn't noticed until mid January? We would not be able to recover. Them : Oh, that'll never happen. You're just paranoid. Two weeks is more than we kept in the last place I worked! Me : "Dear Board of Directors, I know you would like to avoid lawsuits if at all possible..." Cue arrival of external consulting firm, who actually knew their stuff for once, and implemented the most robust disaster recovery system I have ever set eyes on. It's amazing how quickly people react when you tell them about a threat to their annual bonuses.
-
How to decide between mysql and SQL server?Nothing that you have described depends on a specific database. The question of SQL Server or MySQL therefore becomes a personal choice. And, in this setting, that's all it is - personal choice, normally shaped by personal experience. For the very common functionality that you describe, you will not see much advantage either way. In a real life business situation, the scenario changes. You would probably have the resources to do large-scale performance testing for your specific scenario, and could come to a factual conclusion that way. Or, more likely, your employer would dictate which database you were to use. But you're not in that environment. And it really does not matter. Here, it's on the same level as "Do you like blue cars or red ones?" Code your solution in such a way that the database logic remains in the database - stored procedures, functions, etc. That way, assuming that you are connecting by way of something like Entity Framework or even ADO.net, your C# code should be talking to your database's interface - calling specific procedures or function names, rather than relying on database-specific functionality. That way, it really does not matter which database provider you choose. So long as the entities you create within the database present themselves the same way, you can switch (for example) from SQL Server to MySQL to Oracle to Access easily. Make your application configurable, if you like. That way, a simple change to a config file can allow your application to switch databases. You'll rarely find a real life case that calls for that, but it might get you a few more points when you hand in your assignment! Good luck!