User loginNavigation |
Q: Modularizing SQL?(Sorry, this may be a bit off-topic. But I think it's related to PL design.) Something has been bugging me for quite some time. SQL is powerful. It's declarative. Complex data-access algorithms can be expressed very concisely. But its syntax is monolithic. A SQL statement cuts across multiple tables (or domain objects as in OOA&D). When I examine many SQL statements at work, many of them share similar patterns: Certain inner joins or where clauses are repeated in many places to achieve the same filtering rules. I can't see an easy way to abstract these patterns out, to reuse snipplets of the statements. (like mixins or traits?) I can't see an easy way to discompose complex SQLs or to compose complex SQL statements out of smaller building blocks in manageable ways. From the OOP point of view, data access should be hidden in an OR layer and everything should be done via methods on the domain objects. But that's not feasible in many applications. Many of the business processes implemented by the software my company develops are batch-oriented and they already take hours to run. If I insist on having everything going through the OR layer and take away the power of optimized SQLs, the software is simply not usable. What other alternatives are there? And, is there any research on modularizing SQL or on a modularizable data-access language which is as powerful as SQL? (I couldn't find much from Google.) By sciomako at 2007-09-05 23:16 | LtU Forum | previous forum topic | next forum topic | other blogs | 41007 reads
|
Browse archives
Active forum topics |
Recent comments
23 weeks 22 hours ago
23 weeks 1 day ago
23 weeks 1 day ago
45 weeks 2 days ago
49 weeks 4 days ago
51 weeks 1 day ago
51 weeks 1 day ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago