Solved

Database Symbols

Posted on 2011-02-25
7
2,167 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
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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 33

Accepted Solution

by:
ste5an earned 250 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 250 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
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…

910 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now