mardi 12 mai 2015

Approach for designing a program that generates a flat file from dozens of queries

There's a federal program called COBRA that provides the option of continuation benefits to employees who lose coverage based on several lost coverage reasons. We pay a vendor to send out the communications to employees when they have a COBRA qualifying event, so we have to generate a file every week that gets sent to the vendor, based on the vendors required format, that contains several fields about the employee and/or dependents.

Our existing approach is to use a stored procedure (pl/sql) and create a cursor that contains all this information in many different subqueries. We have no automated testing framework in place for pl/sql and it just seems like it would be a nightmare to maintain when something changes.

I'm just wondering if there is a typical best practice for structuring a program that does nothing but query a ton of different information based on a lot of complicated business rules. Also was a stored procedure the wrong way to go with something like this? The procedure does everything, performs all the queries and generates the file.

Aucun commentaire:

Enregistrer un commentaire