Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is relvar - relational variable?

I am reading an introductory book on database systems and the authour introdiced the term: relational variable - relvar.

It says that the relvar is a container for the actual relation.

What is it meant by container? Is this a pysical concept, like a place on disk? Is this more of an logical concept, so that container is just an umbrella term for metadata and relation?

like image 217
sanjihan Avatar asked Apr 14 '26 23:04

sanjihan


1 Answers

A relation variable can be contrasted with a relation value. These concepts are analogous to simple algebraic variables like x, and values like 5.

A relation variable is a symbol that can reference different values at different times - hence the term variable, since its value can vary. For example, I might have a relation Employee which holds information about the people working for me at any given time.

A relation value is a particular state. Values don't vary. When we say the value of a variable changes, we actually mean that the variable is assigned a new value, which may be derived from the old value.

These are logical concepts. Container is an informal term which is accessible to a lay audience. However, it shouldn't be taken too literally. Variables and values can be implemented or represented in a variety of ways in physical systems.

like image 78
reaanb Avatar answered Apr 17 '26 13:04

reaanb