Views vs Tables
-
Jörgen Andersson wrote:
f you want to filter the contents of a table for a certain group of users
Sure but that is one of the uses of a view - a very old fashioned use, but still valid. Who puts authorisation logic at that level these days. Apps no longer have to rely on the database for authorisation, very 80s :laugh:
Never underestimate the power of human stupidity RAH
:sigh: I know, see my answer to jschell.
"The ones who care enough to do it right care too much to compromise." Matthew Faithfull
-
:sigh: I know, see my answer to jschell.
"The ones who care enough to do it right care too much to compromise." Matthew Faithfull
Yeah I read that and thought poor bastard, I just hope you are not working with one of those old EIS systems as well!
Never underestimate the power of human stupidity RAH
-
Yeah I read that and thought poor bastard, I just hope you are not working with one of those old EIS systems as well!
Never underestimate the power of human stupidity RAH
I'm at a different place now, with a different set of pains.
Mycroft Holmes wrote:
I just hope you are not working with one of those old EIS systems as well!
Depends on what EIS stands for. If it is Executive Information System, then yes kind of. It's my own design though. It's the users that's the main pain now.
"The ones who care enough to do it right care too much to compromise." Matthew Faithfull
-
There is a database layer - the control is populated via a query from this layer. Any updates to this view are then passed through this layer via update commands. So we can lock down particular columns and perform verification on the values before update so that we both have a business and database layer. So I am still not getting what is wrong with using the results of a view in a GUI.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
GuyThiebaut wrote:
Any updates to this view are then passed through this layer via update commands.
Either you are expressing it incorrectly or there is no layer. You said you used the "view" in the "control". If instead you are using a DTO in the "control" then that is not the same as what you said. If however you are using a language specific layer to access the a view in the control then there is no database layer.
GuyThiebaut wrote:
So I am still not getting what is wrong with using the results of a view in a GUI.
First, the question, per the OP, is why someone would insist that only views be used. It isn't whether views might or might not be used. Second, as I already said your terminology/phrasing is not precise. If you have a database layer then you are not using the view in the GUI. What you are using is the results of the database layer or even business layer in the GUI. The fact that they originated from a view in another layer is irrelevant and expressing it that way should be avoided because data model entity might not originate in a one to one mapping with the database. And the user (GUI) should not concern itself with how it did originate from he database.
-
Because some companies are quite divided. The right place to do it is in the application, but I've been working for companies where the database department were responsible for that one department couldn't see the same columns as another department. It's a lot easier to keep track on this with a view than with column permissions. When it comes to licensing it doesn't matter. It's the number of actual users that counts, not the number of users you setup in the database. It's a common misconception.
"The ones who care enough to do it right care too much to compromise." Matthew Faithfull
Jörgen Andersson wrote:
Because some companies are quite divided.
Certainly. And some companies need to create their own database. But in the general case neither of those are true.
Jörgen Andersson wrote:
It's the number of actual users that counts, not the number of users you setup in the database. It's a common misconception.
I know how it works. The fact that user licensing exists at all specifically indicates that support in the database per user is something that is in fact significant. Unless you are claiming that only a single user connects at a time, then my comment about user licensing stands. And if you are claiming that then it is far from what any normal business would use.