{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Tutorial2-sol - Tutorial 2 Solution Problem 1 Relational...

This preview shows pages 1–2. Sign up to view the full content.

Tutorial 2 Solution Problem 1: Relational Algebra Consider the following relations: Server(realm_id, realmName, physical_location, ip_address) Account(account_id, username, password_enc) Characters(char_id, character_name, character_class, level, account_id, realm_id) Each character can belong only to 1 account and 1 server. Each account can have many characters, on many servers. Give the queries in relational algebra to answer the following questions. You should use only the basic operators plus join (set union, set difference, selection, projection, renaming, and join). You should use proper notation (e.g. σ for a selection operator, π for a projection operator, x for a Cartesian product, ρ for a renaming operator, and | ><| for a join operator.) 1. Find the char_id of all characters that belong to the account with username "Beowulf" 2. Find the account_id of accounts that only have a character on the "Thor" realmName.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 4

Tutorial2-sol - Tutorial 2 Solution Problem 1 Relational...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online