Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Dynamic Query tool

 
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have been breaking my head since one week to come up with a novel solution for the following problem:
Lets take a typical database schema. It contains number of tables, of which ,
... some have primary key/foreign key relation ship,
... there can be one or more tables which mediate to form a relation between two tables.
User has a requirement like this:
He should be given UI such that he will have the option to select some from a series of business attributes .These attributes which will map to database columns.
He can select attributes in such a fashion that
... some of the attributes may be columns of two tables which has primary/foreign key relationship
... some of the attributes from disjoint tables which will be linked indirectly through one or more tables
Taking all these into consideration,
if user submits the Search , we have to form a query based on above and give the user resultant records.
We have to avoid resulting cartesian product (It results when there is no join or filter)
How do you look at such kind of system ??
We proposed user to use Crystal Reports. But user doesnt want to get exposed/fall in the risk of understanding the database structure. He just wants a system where in he can select business fields (with out applying his domain knowledge as to whether these fields logically relate or not) and he wants to get results.
Any help/views are appreciated.
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
Sounds rather wierd to me. Especially this bit:

he can select business fields (with out applying his domain knowledge as to whether these fields logically relate or not) and he wants to get results


Your customer wants to be able to specify reports without knowing themselves whether these make sense? Next step they 'll be telling you your report is not 'correct'. Also 'with out applying his domain knowledge'? Wouldn't think so.
I 'd say it is either of two ways: or your customer applies his domain knowledge, or you 're free to combine data in sensible or senseless groups as you like.
Good riding,
Rudy.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic