![]() |
.. (לתיקייה המכילה) | |
Now you explicitly allowed use of views - so can I | |
No, please stick to the course material. |
When printing the Table of persons in check_remove what should we print when we reach a NULL entry? | |
'null' |
Can we assume that when we add new tuples to a table they are being added at the end ( which means as the last tupples after adding) ? | |
No, there's no order in tuples (table) only in queries. |
In "check_remove": consider the following DB content:
<pre>
pid | pname | pcity | edept | mdept
--------+----------------+------------+-------+-------
456789 | Sagi Elbaz | Haifa | 10 | 20
456789 | Sagi Elbaz | Haifa | 30 | 10
456789 | Sagi Elbaz | Haifa | 30 | 20
456789 | Sagi Elbaz | Haifa | 10 | null
</pre>
Now we run the following test:
| |
First of all, notice that the given DB is legal, since all the requirements are OK. When we run "check_remove 10", the output should be: pid | pname | pcity | edept | mdept --------+----------------+------------+-------+------- 456789 | Sagi Elbaz | Haifa | 30 | 20 456789 | Sagi Elbaz | Haifa | 30 | null 456789 | Sagi Elbaz | Haifa | null | 20 The general guideline is to leave tuples that are not affected by the operation as they were before. You should not merge or separate tuples in check_remove. Just make sure that the obtained content answers the requirements (no identical tuples, no null-null unless no other tuples with same pid, etc.). The meta-algorithm could be: (1) replace all instances of Y by 'null' (2) make sure that the obtained DB content is legal (remove tuples if needed). Of course, the table itself shouldn't be changed, as explained in the assignment. |
if we get a command with wrong id number | |
ILLEGAL_EMP_MNG |
What should we do in the following case: | |
Print 123123 |
What happens if you work in employee mode and get 3 arguments | |
ILLEGAL_MODE |
What should be the result of the command: | |
Only 123456 |