Homework #6 FAQ
What's the difference between a ROW type and a COLUMN type in Oracle?
Well, Oracle really doesn't provide the type of encapsulation that the
book talks about with ADT's, and both types are declared in the same way
in Oracle, so think of the difference lying in the intended use of a
type. If a type is created with the intent that it represent an entire
tuple inside a table, it is a ROW type. If a type is created with the
intent that it will be used as one attribute inside a tuple, it is a
COLUMN type. So there is a fine line between the two, but there is an
important distinction between the two, even if it is only in "intent" and
not in actual implementation. You should be able to find cases in your PDA
where you will use both ROW and COLUMN types in very different ways...
PDA Question 3
What is the difference between "Access of data within a table type" and
"Use of a table type's value in a FROM clause"?
The intention was that for "Access of data within a table type", you
should not need to use the THE keyword, whereas for the "FROM clause" part
you should. For an example, look at the
ORACLE objects page, and look at the following queries:
This would be without using THE to access a table (the table type being
accessed here is lines2, and you are accessing the end1 and end2 pointers
inside that table):
SELECT ll.end1.x, ll.end2.x
FROM Lines2 ll;
This would be with using THE to access a table:
FROM THE(SELECT points
WHERE name = 'square'
WHERE ss.x = ss.y;
How do I know when a set of FD's is minimal? Is there a short cut?
There really is no short cut. In order to decide that a set of FDs is
minimal you need to
1) Try to delete an FD.
2) Try to delete elements from the left side of an FD.
If these 2 steps fail (i.e., you cannot preform one of these steps and still
end up with an equivalent set of FDs), then you know you have a minimal
set. If not, then
you don't -- you can delete something from the set and start all over
again. It's a brute force algorithm. However, just like there were
certain techniques to determine which attributes were in keys to help speed
up the process of finding a minimal key, you can apply similar techniques
here to figure out which FD's you definitely cannot delete...
Last modified: Tue Nov 16 00:40:37 PST 1999