database - Relational algebra: selecting range (between numbers) -


i can't seem find on internet, find weird. question: how show range in relational algebra?

i being asked this:

find user numbers of users had points in range of 500-1700.

i checked this: http://www.marcoullis.com/knowledge/databases/marcoullisp_knowledge_databases_relational_algebra.html

and came with:

π user_numbers(σ points >= ‘500’ ^ points <= ’1700’ (user ⋈ point table)) 

is correct? if not, how should this?

ps: ^ symbol stands and.

if allowed use , in condition expression of restrict , tables how can guess question expression wrote correct.

you write like

    π number (σ points >= 500 (user ⋈ point)) ⋈  π number (σ points <= 1700 (user ⋈ point)) 

or use intersect instead of (natural) join there.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -