I work currently in a DWH. A big part of my job is to move data from some OLTP Database to the DWH.
One practice that we do is:
-Create the new table that we need.
create table Mytable (Column1 date, Column2 varchar(8));
-Create a view for the new table (exactly the same)
create view Myview as select * from dummy alter view Myview ( Column1 ,Column2 ) as select Column1 column2 from Mytable
-Read from that View
here come one procedure that use Myview and not Mytable. why?
I understand of course the functionality of Views for reducing complexity in a save querys or that they are good to protect parts of the table to some final users.
But I can not see why is a good practice to read from the view and not direct from the Table.
I mean of course the case where the View is exactly the same as the Table.
Thanks for your answers , Enrique