When to use a view and table?
Is it an art? I doubt it. Only when you cannot explain it and depends on feeling, it is an art.
Recently we are revising our codes and this question of giving guidance.on when to use table and view come to me. I consider the following questions:
1. when does it justify a table/view?
Having worked in a team setting on modeling and reporting works, the key to me is readability. leveraging my programming learning on object oriented concept, every object exists for a purpose, with set of inputs, preconditions, processes and output. When you feel that the same processes can be reused for other reports or analysis, I created a view or table for it. For those of you from the database admin, put down your judgement adhereing to normalization, listen: the cost of screwing the model or analysis leading to wrong business decision outweights the cost of harddisk.
2. View or table?
To choose between, view is always preferred as it takes less disk space and one less program that creates the table. (now we are talking admin :)). Only when the same data is queried very often or very big in size, when performance in speed is needed,I use a table.
I believe that our task is to define as clearly as possible our programming style for data analysis, even now it is empty in the programming literature.
You need to be a member of AnalyticBridge to add comments!
Join AnalyticBridge