MEMBER (memberID (PK), profession, name, address, telNo, areaCode (FK) VOLUNTEER (volunteerID (PK), typeVolunteer, description) MEMBER_VOLUNTEER (memberID (PK), volunteerID (PK), dateJoin, dateDisjoin, allowance) This query is to select the names, address, and telephone number of member, type and description of volunteer, dateJoin, dateDisjoin, and allowance of the volunteer. SELECT m.name, m.address, m.telNo, v.typeVolunteer, v.description, mv.dateJoin, mv.dateDisjoin, mv, allowance FROM MEMBER m, MEMBER_VOLUNTEER mv, VOLUNTEER v WHERE m.memberID=mv.memberID AND v.volunteerID=mv.volunteerID AND mv.dateJoin > “1/1/2010” AND mv.dateDisjoin <
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
The following tables are used to answer the question
MEMBER (memberID (PK), profession, name, address, telNo, areaCode (FK)
VOLUNTEER (volunteerID (PK), typeVolunteer, description)
MEMBER_VOLUNTEER (memberID (PK), volunteerID (PK), dateJoin, dateDisjoin, allowance)
This query is to select the names, address, and telephone number of member, type and description of volunteer, dateJoin, dateDisjoin, and allowance of the volunteer.
SELECT m.name, m.address, m.telNo, v.typeVolunteer, v.description, mv.dateJoin, mv.dateDisjoin, mv, allowance FROM MEMBER m, MEMBER_VOLUNTEER mv, VOLUNTEER v WHERE m.memberID=mv.memberID AND v.volunteerID=mv.volunteerID AND mv.dateJoin > “1/1/2010” AND mv.dateDisjoin < “31/12/2020” AND mv.allowance = NULL AND m.profession = “Teacher” |
The Question
Draw a relational algebra tree (RAT) for the queries and use the heuristic rules to
transform the queries into a more efficient form. State each step and any transformation rules used in the process. Assume the member was joined the volunteer more than one time, and different type of volunteer organization.
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781285196145/9781285196145_smallCoverImage.gif)
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781285196145/9781285196145_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781305627482/9781305627482_smallCoverImage.gif)
![A Guide to SQL](https://www.bartleby.com/isbn_cover_images/9781111527273/9781111527273_smallCoverImage.gif)
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)