4 ms·
Is that different from adding such columns in a view enriching the table?
by uhoh-itsmaciek 7y ago
Is that different from adding such columns in a view enriching the table?
- Mister_Snuggles 7y agoFor most things no, but there are some things you can do that are difficult or impossible to do in an SQL view. I-Descriptors can call subroutines, which opens them up to doing anything that the underlying UniVerse BASIC runtime can do. I once made an I-Descriptor which called a subroutine to feed the postal code into a web service that returned the geographic location of that postal code. It also implemented caching so it would only call the service for a postal code once. You could simply list out the file and find customers in a particular geographic region just using the query language. I'm sure this is do-able using something like PL/Python, but I suspect it would be much more difficult to do it all in-database than how I did it in UniVerse. Whether doing it this way is a good idea is, of course, up for debate. In a modern application I wouldn't dream of doing this on the fly in a view. Just because I could build it the way I did doesn't mean it was a good idea.