HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Table view created with triggers, someone please explain why?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
whypleasecreatedwithsomeoneviewexplaintriggerstable

Problem

I'm part of a project that inherited a piece of software that has a unique MS SQL database design that I'm trying to understand why they designed it the way they did.

Basically for every table, for example table tab_user, there is a duplicate table that is called tab_user_view. The tab_user_view is populated with triggers placed on the tab_user table to populate the tab_user_view. All of our pages that list data retrieve data from the _view tables. I kind of understand this is to avoid locking and increase performance, but why wouldn't they just use traditional views? The original software was written in 2003 so is it possible some tech wasn't available that we now have? Thanks

UPDATE

-Yes, there is some data manipulation for the _view tables, but the same thing can be achieved with views, so why?

Solution

The reason is because the skills for evaluating competence in any discipline are the same skills for competence itself. They thought this design was a good idea because they weren't very skilled in database design, and thus were not skilled enough to recognize that it was a terrible idea.

Context

StackExchange Database Administrators Q#13709, answer score: 5

Revisions (0)

No revisions yet.