Solved

Database Symbols

Posted on 2011-02-25
7
2,176 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
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…

733 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