|
|
|
|
|
by oreglio
2451 days ago
|
|
I worked in a company that have been using a sql database for a really long time, like +20 years. In the original design of the database, they though it would be a great idea to use negative ID for system use (on the same tables that are being used for user data). No foreign key whatsoever. Forward 2018 when we have to build a system that have to work with this widedly used database (it's for a french ERP).
Because there is no index or foreign keys the queries are really slow which make our interface slow. Because the tables are accessible but belong to the ERP we cannot modify them because the ERP is under a licence so we don't have access to remodeling of the tables or how the data is processed before being saved in the database. So to work around the problem we had to create duplicates of the tables with proper index and foreign keys and start a cron job every minute to read from the original tables and fill the datas into our tables ... Mind boggling .. The software is being sold to a lot of companies which is kind of sad. |
|