VMware Horizon Community
vcpguy
Expert
Expert

View Events Database prefix

Hi, could someone please tell me why do we create a table prefix when we define the view events database?

Thanks

----------------------------------------------------------------------------- Please don't forget to reward Points for helpful hints; answers; suggestions. My blog: http://vmwaredevotee.com
0 Kudos
5 Replies
ymagalif
Enthusiast
Enthusiast

vcpguy,

I believe we create a table prefix because if you were to use SQL queries and search the actual database, you would be able to search for the prefix and find all Event Log entries.

However, most people won't search the database by using SQL queries. So an alternate reason could exist.

Sincerely,

Yury Magalif

0 Kudos
vcpguy
Expert
Expert

Yury,

Could you please give some examples to back your logic.

Thanks

----------------------------------------------------------------------------- Please don't forget to reward Points for helpful hints; answers; suggestions. My blog: http://vmwaredevotee.com
0 Kudos
ymagalif
Enthusiast
Enthusiast

vcpguy,

Here is a standard on SQL (Page 3):

http://www.isbe.state.il.us/ILDS/pdf/SQL_server_standards.pdf

"it is sometimes a good idea to prefix your table names with some

characters that group your tables together. For example, for a

healthcare application you might give your tables an "Hc" prefix so

that all of the tables for that application would appear in alphabetized

lists together. The last kind of prefix that is  acceptable is one that

allows you to group logical units of tables. A plausible example could

entail a large application (30 to 40+ tables)

that handled both Payroll and Benefits data. You could prefix the

tables dealing with payroll with a "Pay" or "Prl" prefix and give the

tables dealing with benefits data a "Ben" or "Bfts" prefix. The goal of

both this prefix and the aforementioned shared schema/database

prefix is to allow you to group specific tables together alphabetically in

lists and distinguish them from unrelated tables."

My theory was just a theory, but due to the above there is some concrete usage of SQL table prefixes in the real world.

Sincerely,

Yury Magalif

seanmassey
Enthusiast
Enthusiast

I believe the table prefixes are added to allow multiple View environments to use the same database for reporting in very large environments.

0 Kudos
srodenburg
Expert
Expert

"I believe the table prefixes are added to allow multiple View environments to use the same database for reporting in very large environments."

Bingo.

0 Kudos