Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Function VS View

57957Sep 19 2007 — edited Sep 21 2007
Hello Discoverer OTN Community,

I am one year into playing around with Discoverer and now I have a best practices question. I know, I am a little late on the question but I still have to ask it. I am working with a product that delivers a Discoverer EUL; this company is new to Discoverer also and hasn’t made some of the best decisions on creating its EUL. I don’t mind adding features to what is delivered with the product but I tend to stay away from modifying what is delivered unless its that bad; modifications seem harder to keep up than additions. The existing views in the database, correlating to folders in Discoverer, for a person’s address does not quite follow my companies business practice; IE if they have defined 4 address types if you are missing one address you are to default to the next type in a specific order. I have worked out a function that can determine what this address is but I could also create a view that holds the address of choice in it. Since the function cannot return a ROWTYPE in Discoverer, I have created other functions to handle each part of an address you may want in a report. Here is a small picture

Main Address Function: get_persons_address (returns a ROWTYPE from the address view and uses companies business logic to determine which type of address is being returned.)

Street Line 1 Function: calls main function and parses out street line 1 from the address.
Street Line 2 Function: calls main function and parses out street line 2 from the address.
Street Line 3 Function: calls main function and parses out street line 3 from the address.
Street Line 4 Function: calls main function and parses out street line 4 from the address.
City Function: calls main function and parses out City
State Function: calls main function and parses out State
Zip Function: calls main function and parses out Zip Code

Knowing that the report might return at most 3000 – 5000 records is it better to use a function call (in this case it would be a call to Street Line 1, City, State and Zip) or created a new view in the database for a new folder in Discoverer for the users to use?

Appreciate any input people can give.

TTFN
Fletch
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 19 2007
Added on Sep 19 2007
3 comments
786 views