All Forums Database
johnsunnydew 43 posts Joined 09/14
10 Aug 2015
View creation.

In one of our project it is been told to create a view for a table even if we are not accessing the view.
It is just a simple view as "Relace view as Select *from Table"
Is creating this advisable just for the sake of process? What would be it cons?

CarlosAL 512 posts Joined 04/08
11 Aug 2015

It is advisable to implement a layer of views upon the tables layer, tables shouldn't be accessed directly by users by no means (other than users for loading processes plus some 'superuser' for administrator tasks). This is the Teradata advocated architecture.
BTW: 'CREATE VIEW AS SELECT * ' should be avoided, explicit column names is a much better approach.

TD_Raj 50 posts Joined 05/10
11 Aug 2015

Hi Sunny
Having a view layer on top of your base tables is always advisable for security purposes.
Just because you asked for the cons : It do add some work for the developer like refeshing view definition whenever table structure changes. This require more time for impact analysis if views are not properly documented. (but this is no disadvantage)
However directly pulling data from base table is not the preferred manner.

talk2soumya 28 posts Joined 11/11
11 Aug 2015

It is necessary to have a view layer in TD with locking row for access. Your code does not have that. It may create lock contention when more than one users want to access same table uisng the view.

You must sign in to leave a comment.