?
Solved

Database Symbols

Posted on 2011-02-25
7
Medium Priority
?
2,189 Views
Last Modified: 2012-06-27
How do I solve this problem?

6.16) Specify the following queries on the COMPANY relational database schema shown in Figure 5.5 using the relational operators discussed in this chapter. Also show the result of each query as it would apply to the database state in Figure 3.6.

a. Retrieve the names of all employees in department 5 who work more than 10 hours per week on the ProductX project.


The relational operators noted refer to sigma, pi, Intersect, U, and Join.

Figure 5.5 wasn't in the book; Figure 6.5 looked relevant.

The related figures are:
Fig-3.6.png
Fig-6.5.png
0
Comment
Question by:JCW2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 33

Expert Comment

by:knightEknight
ID: 34984943
We are not allowed to do your homework for you.
0
 

Author Comment

by:JCW2
ID: 34985025
No you're not.

I'm looking to understand my problem better (That's what I tried to say with my first sentence).
0
 

Author Comment

by:JCW2
ID: 34985053
(There are other possible operators)
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 15

Expert Comment

by:derekkromm
ID: 34985255
can you be more detailed in what you're actually looking for help with here? i can't understand what type of question you're really asking
0
 
LVL 35

Accepted Solution

by:
ste5an earned 1000 total points
ID: 34986885
hi,

This kind of exercises must be precise otherwise they are worthless. Question a) is not solvable, if your given data is complete.

This is quite trival: You don't have the information about workhours per week. You have a PROJECT table which has no reference to weeks and you have the WORKS_ON table, which has a reference to the PROJECT table, but also not reference to weeks. While you can make an educated guess that the hours in WORKS_ON sum up to a weekly work shift, it is not mentioned anywhere. Thus you cannot solve it. You can guess it, but this not the question, as database modeling and data retrieval is about correct answers, not guessed ones.


mfG
--> stefan <--
0
 
LVL 20

Assisted Solution

by:virmaior
virmaior earned 1000 total points
ID: 34987354
The operators are from set theory in mathematics.  The U means "Union" and in SQL is written by UNION (or UNION ALL) placed between two queries.  This means include all data from both.  (UNION ALL will include duplicates if the entries come from the separate halves).

---

The upside U means intersect and includes only data common to both sets.  In this case A intersect B and B intersect A might yield different data.  In SQL you express this by doing a JOIN and a WHERE

(A intersect B)
SELECT * FROM a LEFT JOIN b ON b.field = a.field WHERE b.field IS NOT NULL

(b intersect a)
SELECT * FROM b LEFT JOIN a ON a.field = b.field WHERE a.field IS NOT NULL

---
JOIN is a way of relating tables in SQL where you can combine them on a common field.  So if you had an order table with an id for the customer, you could retrieve all the orders for a customer and the customer's information in a single query.

----
I am not sure what Sigma and Pi mean in a SQL context.
0
 

Author Closing Comment

by:JCW2
ID: 34988572
Tank you for your help.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question