@@ -135,7 +135,7 @@ Project ("Name") in
135135===>
136136
137137|(Name, NameType)|
138−|-|
138+|----------------|
139139|Steve|
140140|Bob|
141141
@@ -149,7 +149,7 @@ Examples:
149149Restrict (tuples where attribute "Fruit" is true) in
150150
151151|(Product Name, Product Name Type)|(Is Fruit, Fruit Boolean Flag)|(Price, Price Type)|
152−|-|-|-|
152+|---------------------------------|------------------------------|-------------------|
153153|Orange|True|$2.50|
154154|Pineapple|True|$5.00|
155155|Cucumber|False|$3.00|
@@ -157,7 +157,7 @@ Restrict (tuples where attribute "Fruit" is true) in
157157===>
158158
159159|(Product Name, Product Name Type)|(Is Fruit, Fruit Boolean Flag)|(Price, Price Type)|
160−|-|-|-|
160+|---------------------------------|------------------------------|-------------------|
161161|Orange|True|$2.50|
162162|Pineapple|True|$5.00|
163163
@@ -171,14 +171,14 @@ Examples:
171171* Rename the "Age" attribute to be "Years Old".
172172
173173|(Name, Name Type)|(Age, Age Type)|
174−|-|-|
174+|-----------------|---------------|
175175|Bob|42|
176176|Jen|55|
177177
178178===>
179179
180180|(Name, Name Type)|(Years Old, Age Type)|
181−|-|-|
181+|-----------------|---------------------|
182182|Jen|55|
183183|Bob|42|
184184
@@ -196,14 +196,14 @@ Examples:
196196Join (Instructor relation)
197197
198198|(Instructor Name, Instructor Name Type)|(Office Number, Office Number Type)|
199−|-|-|-|
199+|----------------------------------------|----------------------------------|
200200|Steve|Office 45|
201201|Bob|Office 30|
202202
203203(Course Relation)
204204
205205|(Course Name, Course Name Type)|(Instructor, Instructor Name Type)|(Course Room Number, Room Number Type)|
206−|-|-|-|
206+|-------------------------------|----------------------------------|--------------------------------------|
207207|English 1|Steve|Room 104|
208208|French 2|Bob|Room 103|
209209|English 2|Steve|Room 104|
@@ -212,7 +212,7 @@ Join (Instructor relation)
212212===>
213213
214214|(Instructor Name, Instructor Name Type)|(Office Number, Office Number Type)|(Course Name, Course Name Type)|(Course Room Number, Room Number Type)|
215−|-|-|-|-|
215+|---------------------------------------|-----------------------------------|-------------------------------|--------------------------------------|
216216|Steve|Office 45|English 1|Room 104|
217217|Steve|Office 45|English 2|Room 104|
218218|Bob|Office 30|French 2|Room 103|
@@ -229,21 +229,21 @@ Examples:
229229union (Parents relation)
230230
231231|(Name, Name Type)|(Age, Age Type)|
232−|-|-|
232+|-----------------|---------------|
233233|Bob|45|
234234|Cindy|32|
235235
236236(Children relation)
237237
238238|(Name, Name Type)|(Age, Age Type)|
239−|-|-|
239+|-----------------|---------------|
240240|Steve|12|
241241|Tom|11|
242242
243243===>
244244
245245|(Name, Name Type)|(Age, Age Type)|
246−|-|-|
246+|-----------------|---------------|
247247|Steve|12|
248248|Cindy|32|
249249|Bob|45|
@@ -258,7 +258,7 @@ union (Parents relation)
258258Note that in the above operator examples, the order of the tuples appears to shift around. Since a relation body is a set of tuples, any ordering, such as required to represent a relation in two-dimenstional space as a table, is completely arbitrary. Note that the following two relations are two representations of *same* relation:
259259
260260|(Name, Name Type)|(Age, Age Type)|
261−|-|-|
261+|-----------------|---------------|
262262|Bob|40|
263263|Sam|41|
264264|Cindy|42|
@@ -266,7 +266,7 @@ Note that in the above operator examples, the order of the tuples appears to shi
266266and
267267
268268|(Name, Name Type)|(Age, Age Type)|
269−|-|-|
269+|-----------------|---------------|
270270|Sam|41|
271271|Cindy|42|
272272|Bob|40|
@@ -274,7 +274,7 @@ and
274274The relation header is a set of attributes, so the attributes also have no ordering. Here is a third representation of the above relation:
275275
276276|(Age, Age Type)|(Name, Name Type)|
277−|-|-|
277+|---------------|-----------------|
278278|42|Cindy|
279279|40|Bob|
280280|41|Sam|
@@ -308,7 +308,7 @@ Example:
308308(Employees relation)
309309
310310|(Name, Name Type)|(Salary, Salary Type)|(Department, Department Type)|
311−|-|-|-|
311+|-----------------|---------------------|-----------------------------|
312312|Steve|$32000|Marketing|
313313|Bob|$40000|Marketing|
314314|Sam|$41000|Sales|
@@ -318,7 +318,7 @@ Example:
318318====>
319319
320320|(Department, Department Type)|(Average Salary, Salary Type)|(Employees, (Name, Name Type))|
321−|-|-|-|
321+|-----------------------------|-----------------------------|------------------------------|
322322|Marketing|$36000|<table><tr><th>(Name, Name Type)</th></tr><tr><td>Steve</td></tr><tr><td>Bob</td></tr></table>|
323323|Sales|$41000|<table><tr><th>(Name, Name Type)</th></tr><tr><td>Sam</td></tr></table>|
324324