views:

87

answers:

5

Is there a database term for "table or view"?
In my app, the table name I'm pulling data from is configurable using the configuration setting UserTableName Now the DBA went and renamed the table but created a view using the original name.
So nothing changed on my side but now I feel that UserTableName is misleading and I would like to change it to User*Whatever*Name where Whatever is a term for a table or view.
Is there such a thing or am I just being an idiot?

+1  A: 

How about "Database Object" or "DBObject"?

Graeme Perrow
A: 

"UserDataSource" ?

M4N
thanks, but that won't work - UserDataSource is already a name of my class.
vitule
+1  A: 

Logical models use the terms entity/attribute; physical models use table/column. I don't know if a modeler would object, but maybe you can call it "UserEntity".

Here's a question: Why should it matter? When you write a query in SQL, you don't know or care that it's a table or view. Why should your schema?

duffymo
You're right, I don't care -- that's why I realized that naming the configuration field "UserTableName" is not abstract enough. Thanks for your answer.
vitule
+2  A: 

The term "relation" applies to a table or a view. In fact, relation also applies to the result of a query.

Bill Karwin
If it's done right - no duplicates permitted in the result set. :D
Jonathan Leffler
A: 

I would stick with what you have got. That's what the folk at Oracle did for their data dictionary (view names appear in a column called table_name sometimes).

WW