Skip to main content
Tweeted twitter.com/StackSoftEng/status/1207858446260944899
Became Hot Network Question
Removed subjective remarks and a prejudice against people using some specific kind of technology
Source Link
Christophe
  • 82.2k
  • 11
  • 136
  • 202

I have about 15 years software engineering experience, and I've spent the whole time writing business software againstwith relational databases. Mainly SQL Server and Oracle. I've always been of the opinion that you should define relations in your database and let your database handle the relational integrity. And in my case, 99.9% of the time I utilize a unique identity column as a primary key.

Now that my opinion is out of the way, I'd like some advice on an application we have at work. It's a third party application that my application has to interface with. Both applications use SQL Server as a database. They have no interface for sending and retrieving data. Because of that, they've given me portions of their database schema and descriptions on how to save the data with SQL queries.

It was clear from the schema sent to me that they were not using relations nor were they using identity values for primary keys in most cases. In following communications with them, they pretty much said that identity columns are the exception, not the norm. They also said they handle all referential integrity in their code. It should be no surprise when I mention that they are former AS400 developers writing an ASP.NET web app.

I'm pretty much convinced they have made a horrendous mistake. For instance, I have to save data to this database and I don't have any of their "referential integrity code" in my app. And if someone had to run some queries directly in the database, that also poses a problem. I think this is a maintenance nightmare.

Can someone make any reasonable arguments to objectively support the decision this vendor made? I'm having a hard time coming up with any good reason.

As a side note, I had intended to see whether StackExchange sites allowed polls, but apparently not as polls are completely based on opinion. It's unfortunate because I'd like to be able to show how many professionals think this is acceptable practice.

I have about 15 years software engineering experience, and I've spent the whole time writing business software against relational databases. Mainly SQL Server and Oracle. I've always been of the opinion that you should define relations in your database and let your database handle the relational integrity. And in my case, 99.9% of the time I utilize a unique identity column as a primary key.

Now that my opinion is out of the way, I'd like some advice on an application we have at work. It's a third party application that my application has to interface with. Both applications use SQL Server as a database. They have no interface for sending and retrieving data. Because of that, they've given me portions of their database schema and descriptions on how to save the data with SQL queries.

It was clear from the schema sent to me that they were not using relations nor were they using identity values for primary keys in most cases. In following communications with them, they pretty much said that identity columns are the exception, not the norm. They also said they handle all referential integrity in their code. It should be no surprise when I mention that they are former AS400 developers writing an ASP.NET web app.

I'm pretty much convinced they have made a horrendous mistake. For instance, I have to save data to this database and I don't have any of their "referential integrity code" in my app. And if someone had to run some queries directly in the database, that also poses a problem. I think this is a maintenance nightmare.

Can someone make any reasonable arguments to support the decision this vendor made? I'm having a hard time coming up with any good reason.

As a side note, I had intended to see whether StackExchange sites allowed polls, but apparently not as polls are completely based on opinion. It's unfortunate because I'd like to be able to show how many professionals think this is acceptable practice.

I have about 15 years software engineering experience, writing business software with relational databases. Mainly SQL Server and Oracle. I've always been of the opinion that you should define relations in your database and let your database handle the relational integrity. And in my case, 99.9% of the time I utilize a unique identity column as a primary key.

Now that my opinion is out of the way, I'd like some advice on an application we have at work. It's a third party application that my application has to interface with. Both applications use SQL Server as a database. They have no interface for sending and retrieving data. Because of that, they've given me portions of their database schema and descriptions on how to save the data with SQL queries.

It was clear from the schema sent to me that they were not using relations nor were they using identity values for primary keys in most cases. In following communications with them, they pretty much said that identity columns are the exception, not the norm. They also said they handle all referential integrity in their code.

I'm pretty much convinced they have made a horrendous mistake. For instance, I have to save data to this database and I don't have any of their "referential integrity code" in my app. And if someone had to run some queries directly in the database, that also poses a problem. I think this is a maintenance nightmare.

Can someone make any reasonable arguments to objectively support the decision this vendor made? I'm having a hard time coming up with any good reason.

Source Link
Dan
  • 301
  • 2
  • 7

Relational integrity without relations

I have about 15 years software engineering experience, and I've spent the whole time writing business software against relational databases. Mainly SQL Server and Oracle. I've always been of the opinion that you should define relations in your database and let your database handle the relational integrity. And in my case, 99.9% of the time I utilize a unique identity column as a primary key.

Now that my opinion is out of the way, I'd like some advice on an application we have at work. It's a third party application that my application has to interface with. Both applications use SQL Server as a database. They have no interface for sending and retrieving data. Because of that, they've given me portions of their database schema and descriptions on how to save the data with SQL queries.

It was clear from the schema sent to me that they were not using relations nor were they using identity values for primary keys in most cases. In following communications with them, they pretty much said that identity columns are the exception, not the norm. They also said they handle all referential integrity in their code. It should be no surprise when I mention that they are former AS400 developers writing an ASP.NET web app.

I'm pretty much convinced they have made a horrendous mistake. For instance, I have to save data to this database and I don't have any of their "referential integrity code" in my app. And if someone had to run some queries directly in the database, that also poses a problem. I think this is a maintenance nightmare.

Can someone make any reasonable arguments to support the decision this vendor made? I'm having a hard time coming up with any good reason.

As a side note, I had intended to see whether StackExchange sites allowed polls, but apparently not as polls are completely based on opinion. It's unfortunate because I'd like to be able to show how many professionals think this is acceptable practice.