Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is UNION acceptable in a View?
Message
From
17/03/2001 01:23:19
 
 
To
16/03/2001 08:53:54
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00485727
Message ID:
00486220
Views:
10
>>It's legal to use UNIONs in a view, as long as it's defined with CREATE SQL VIEW and you don't later attempt to modify it with the VFP View Designer.
>>
>>However...
>>
>>Is it good practice to use UNION clause(s) in a view? Or, is that usually a sign that the database should be refactored?
>
>I think using UNION may be a (good) sign that the database is successuflly normalized. Usually views are used to denormalize data for particular uses, such as querying or reporting.

Hmmm... in my experience having to use UNIONs (whether in a view, or straight SQL) is a sign of DB design problems. Usually along the lines of the designer believing entities were apples, oranges, bananas, and kiwi fruits, when really they were Fuji, Spartan, Granny Smith and McIntosh apples.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform