Database Reference
In-Depth Information
This allows your customer service employees to see the data they are
meant to see.
In addition, what if you need to add a sensitive piece of information to
a table that not everyone needs to see? For example, suppose you need to
start storing all your customers' social security numbers; you add a new col-
umn to tbl_customer called SSN. Any users who currently have read ac-
cess to the table can now see this new SSN column, whether or not you
want them to have that access. Extra steps need to be taken to prevent
them from seeing the new data.
But when you use an abstraction layer, this problem ceases to exist.
Adding a column to a table does not automatically add it to your view, pro-
vided you didn't create your view using the SELECT * syntax. Now the
extra steps would be required to expose the data, and not to hide it. To ex-
pose the information, you would need to modify any views you want this
new column to appear in, or create new views.
Extensibility and Flexibility
Extensibility refers to the ease with which you can modify your data
model as your future needs change. By “change,” we mean adding columns
to hold new pieces of information, modifying existing columns to change
the way data is stored, or even adding or removing whole tables. It's hard
to predict what our future needs will be, so it is our job to make the data-
base as extensible as possible so that we can react to future needs as they
arise.
We also want our models to be flexible. Although it's similar to exten-
sibility, flexibility refers to how much of your model you can change with-
out causing significant or any impact. It is true that flexible models will
likely also be extensible, but this isn't always the case. In either event, an
abstraction layer is your best friend when it comes to extensibility.
Your abstraction layer allows you to make almost any change you can
imagine to the physical tables and not affect a single piece of application
code. If all your applications and users are reading data from views and ma-
nipulating data using stored procedures, you simply need to update these
items as appropriate to prevent problems. How many times have you
wanted to make a change to a database, such as splitting one table into two
tables, but have not been able to because it would require code to be re-
viewed, changed, and recompiled? We have been in this boat more times
than we care to remember. The problem stems from the lack of an ab-
Search WWH ::




Custom Search