Consider the following relational database:
employee(employee-name, street, city)
works(employee-name, company-name, salary)
company(company-name, city)
manages(employee-name, manager-name)For each of the following queries, give an expression in relational algebra, tuple relational calculus, and domain relational calculus: a. Find the names of all employees who work for First Bank Corporation. b. Find the names and cities of residence of all employees who work for First Bank Corporation. c. Find the names, street address, and cities of residence of all employees who work for First Bank Corporation and earn more than $10,000 per annum d. Find the names of all employees in this database who live in the same city as the company for which they work. e. Find the names of all employees who live in the same city and on the same street as do their managers. f. Find the names of all employees in this database who do not work for First Bank Corporation. g. Find the names of all employees who earn more than every employee of Small Bank Corporation. h. Assume the companies may be located in several cities. Find all companies located in every city in which Small Bank Corporation is located. Answer:

NOTE: If t is a tuple in a relation, we use the notation t[A] to indicate the value t has for attribute A. So t[A] is the same as t.A that we used in the lectures. a. Find the names of all employees who work for First Bank Corporation: i. employee-name(company-name = "First Bank Corporation"(works)) ii. { t | s works (t[employee-name] = s[employee-name] s[company-name] = "First Bank Corporation")} iii. { <p> | c, s (<p, c, s> works c = "First Bank Corporation") } b. Find the names and cities of residence of all employees who work for First Bank Corporation: i. employee-name, city(employee (company-name = "First Bank Corporation"(works))) ii. { t | r employee s works (t[employee-name] =...

YOU MAY ALSO FIND THESE DOCUMENTS HELPFUL

...RELATIONALALGEBRA
Query Language
It is a Language in which a user request information from the database. These languages are typically of a level higher than that of the standard programming language. It is divided into either procedural or non-procedural language. In the procedural Language, the user instructs the system to perform the sequence of operation on the database to compute a desired result. In a non-procedural Language, the user...

...Query Examples in RelationalAlgebra and SQL
Consider the relation schemas as follows. works(person name, company name, salary); lives(person name, street, city); located in(company name, city); managers(person name, manager name); where manager name refers to person name. a Find the names of the persons who work for company ’FBC’ (company name=’FBC’). Relationalalgebra: SQL: Select person_name From works Where company_name = ’FBC’ b...

...﻿Cami Petrides
Mrs. Babich
Algebra Period 4
April 1, 2014
Extra Credit Project
12. When you flip a light switch, the light seems to come on almost immediately, giving the impression that the electrons in the wiring move very rapidly.
Part A: In reality, the individual electrons in a wire move very slowly through wires. A typical speed for an electron in a battery circuit is 5.0x10 to the -4th meters per second. How long does it take an electron moving at that speed to...

...﻿Relational Counselling: History and Theories Essay One
Relational model of counselling is a synthesis of both humanistic and psychodynamic theories. A central defining assumption of this approach is the importance of relations in the development of self, especially childhood and infancy. Environmental factors also play a crucial part (Stephen Mitchell 1988, 1993: Greenberg & Mitchell 1993). The relational approach looks at the sum total of an...

...INTRODUCTION:
CorporationBank, founded in 1906 in Udupi, Karnataka state, India, is one of the Indian Banks in Public Sector Undertaking. The body was founded with an initial capital of Rs. 5000 (US$ 100), and first day’s canvassed resources of less than one US$ 1, has currently (31 march 2004) 11,325 full time employees, and operates from several branches in India.
The Bank is a public sector unit with 57.17% of share capital...

...﻿Animal Kingdom
The animal kingdom is a taxonomic kingdom composed of multicellular, eukaryotic organisms. Mostly, their body structures become fixed as they develop, yet still some organisms in this kingdom have the ability to undergo metamorphosis. The majority of these organisms are motile, which means they can move on their own and with spontaneity. All animals are heterotrophic, which implies that they depend on other organisms for food. Animals live in places that provide their...