Maverick

Maverick

  • NA
  • 7
  • 0

Factory Method

Feb 24 2010 11:39 AM

Hi everyone,
My issue is that my application supports Oracle,SQL Server and Sybase database. The problem is that when i have to execute some database script (lets say 15 table creation queries) but the syntax varies with respect to user backhand DBMS.
They solution strick in my mind is to have an abstract class as parent and inherits "OracleChildClass","SQLChildClass" and "SysbaseChildClass" from the parent class.But in this case
1. I have to write Full queries in all 3 child.If all are different then its fine but in my case 2 to 3 queries may be exactly the same.so i have to write the queries un necessarily again.
2. How can I make sure that all child will have equal no. of queries. So that in future if someone else enhance the application he wont miss out the logic.
Please advice
Thanks and Regards,

Answers (3)