Is there a generic term for tables and views?
Bogopo last edited by
I am looking for a generic term, e.g. for a database abstraction, that includes all tabular data structures like database tables, views, tabular query results aso.
As far as I understand, 'entity' is not the proper term since this would correspond to a table but not a view or even a query. 'Result' would be counterintuitive on modifiable data structures.
Which would be the proper term in the professional environment?
Postgres (and also https://en.wikipedia.org/wiki/Relational_algebra ) calls them https://en.wikipedia.org/wiki/Relation_(database) - tabular things of rows and columns that you can query from. This includes tables, views, materialised views, temporary tables, or even temporary query results.
I would avoid the term "database object" if you really mean relations only, since "database objects" would also include schemas, indexes, users, sequences, policies, column definitions, types, functions, and many more. Database objects are the objects that are manipulated with https://en.wikipedia.org/wiki/Data_definition_language , whereas (the data within) relations are manipulated with https://en.wikipedia.org/wiki/Data_manipulation_language .