Does anyone know if there is a master reset for our Oracle spaces to completely claer out EVERYTHING that we added in? The drop tables command doesn't seem to be cutting it and our database hates us.
Does anyone know if there is a master reset for our Oracle spaces to completely claer out EVERYTHING that we added in? The drop tables command doesn't seem to be cutting it and our database hates us.
December 02, 2004 in Class Issues | Permalink | Comments (2) | TrackBack (1)
Well, I’ve done some quality bonding with my XSLT book over the past few days, and I think that it may have scarred me for life. As we were putting up the Christmas tree today, I couldn’t help but see it as a great, big, XSLT metaphor… trunk = document element, roots = root element, branches = nodes with more branches and leaves, needles = nodes without children. Needless to say, my family now officially thinks that I’m nuts…not that they hadn’t already figured that out.
In any event, while I was in the process attempting to play catch-up and working through the book, a few things came up that I have questions about…
1) My first question is probably very basic, but nevertheless I continue to struggle with grasping the notion. Repeatedly, the book refers to the current node, but, I am confused as to what determines it? Is it just whatever element that you’re telling the template to match on? It also seems that there is a second current node when dealing with XPath expressions. On page 74, the book comments “the current node of these select patterns is not the same as the current node of the template rule’s match pattern.” Is the main idea that the current node, in whatever context it is being used, is just a starting point for the processor to begin reading the tree?
2) My second question has to do with XPath. I understand that the general formula for a location step is axis::nodetest[predicate]. Is it a correct assumption to make that you must understand what the entire tree looks like in order to know what axis to list in the formula? Or, should I be thinking of this in terms of the axis relative to the current node, in which case the only thing I would need to know is the relationship of the selected nodes relative to the current node?
3) Thirdly, as I was reading the section about template rules, I started wondering what purpose the xsl:copy template serves in real life. I understand that its primary function is to carry over the element tags, but what practical use does this ever serve in a business sense? Can someone supply me with an example when you would not want the content information and just the tags?
November 27, 2004 in Class Issues | Permalink | Comments (3) | TrackBack (3)
I know that everyone has been attempting to draw connections between xml, xsql, html, and XSLT, but until I read the webpage that Maulin suggested, I didn’t really get it. I think that I do now, and here is my attempt to justify it to myself. Please correct me if I am wrong at any point:
- XML is a simplified form of SGML. SGML is a universal standard for defining electronic documents, but it is very complex and cumbersome to use, therefore, we use XML instead.
- XML is and isn’t a mark-up language
o it is a mark-up language in the sense that if describes, organizes, and stores data but doesn’t process it.
o It is not a mark-up language in the sense that it’s a meta-language, which is flexible so that you can customize it to fit differing needs.
- XML is useful in the sense that data stored in XML format can be easily queried via XSQL. XML can also be transferred between information systems.
- HTML is a form of XML.
- HTML is very fixed and does not allow much flexibility. The structure and naming conventions are very rigid, which has a lot to do with why XML is replacing it.
- HTML tells browsers how to display a page where as XML does not. You need a style sheet such as CSS to complement XML in order to tell the browser how to display a page.
- Another alternative is to utilize XSLT to turn XML into html, either in the server or the client side. This is effective since all web browsers know how to display HTML.
November 13, 2004 in Class Issues | Permalink | Comments (0) | TrackBack (0)
I’m a bit confused with xml, and my understanding of it is very primitive at this point, so I am going to track back to the very beginning in efforts to make sense of what we have talked about thus far…
Let’s start with the structure of xml. Based on the O’Reilly article, I understand that there are two primary components… the document prolog and the document element. I gather that the document element is more important than the document prolog based on the fact that all of the fields in the document prolog are optional. Therefore, focusing on the document element, the article gives the following example:
<telegram pri=“important”>
<to>Sarah Bellum</to>
<from>Colonel Timeslip</from>
<subject>Robot-sitting instructions</subject>
<graphic fileref=”figs/me.jpg”/>
<message>Thanks for watching my robot pal<name>Zonkey</name>
…
</telegram>
I’m assuming that each tag indicates the beginning of a new section. So the following document contains the sections: to, from, subject, graphic, and message. From a past Information Studies class that I took, I remember learning that xml doesn’t really define how a document is displayed. Therefore, are the tags just this intuitive sense of organization to give the parser a sense that this document has 5 sections, and therefore it doesn’t really matter what you name them? If this is the case, is your only incentive for choosing logical tag names to provide clarity for anyone reading the xml script? Or, do the name of tags actually matter? I know that you can have a blank tag, but does the name actually appear someplace within the document text? For example, would the first line of the above document display “to Sarah Bellum” or just “Sarah Bellum”? I am also confused about attributes. From the article, I gather that you can have multiple elements with the same name, but every attribute of an element must have a unique name. Can attributes of different elements have the same name? For example, if you had the elements “cake” and “ice-cream,” could you use the same attribute name “chocolate” for each? In the above example, I know that “figs/me.ipg” is an attribute of graphic fileref, but I am confused as to what purpose this attribute is serving. The article says that you use attributes to specify categories of elements so that you do not have to create a new element for every situation. Is it a bad thing if you create a document with 500 different elements? In the above example, this does not seem to be the reason that they defines “figs/me.jpg” as an attribute due to the fact that there is only one graphic fileref element listed.
Also, I am confused about the concept of the root element. Is it correct to think of it in the same sense as the title of a document? Just like a document can only have one title, the elements of an xml script can only have one root element?
November 06, 2004 in Class Issues | Permalink | Comments (0) | TrackBack (1)
I was just wondering if we are going to have a debriefing session re: the exam. It would be nice to go over the questions and discuss them in class. I was also wondering if Prof. Gibson could post the answers online. I'd really be interested in taking a look at them.
I share in everyone's opinion that the exam was difficult - I envisioned it being totally different.
It got me thinking though... in real life, how often you come across an ER diagram in isolation with no background explanation attached (such as the examples on the exam)? I understand that ER diagrams allow you to visually map relationships and see cardinality, so in that sense I think that they're good. But I'd argue that their value is partially negated when you don't have any prior background knowledge about the actaul situation that they are attempting to depict. Although the diagrams in themselves are not ambiguous, the questions that we ask diagram to answer can sometimes produce ambiguous results.
October 23, 2004 in Class Issues | Permalink | Comments (0) | TrackBack (1)
In terms of qualifying the columns in a query, if you are doing a join with two tables, does it really matter which table you use to qulaify the recurring column with? I tried switching it up on a few exercises, and it seems to produce the same results. Is there an official rule to use for figuring out which table to point a recurring column towards? If two tables are joined, doesn't that limit the recurring column to the same set of rows anyways?
Also, if a question asks "at least" such as "List the names of customers with credit limits of at least $10,000" shouldn't you use >= in your query vs. just the > operator? If you just used the > operator, wouldn't this factor out everyone with a credit limit of $10,000 on the nose? (i.e. ch3ex3)
October 17, 2004 in Class Issues | Permalink | Comments (0) | TrackBack (1)
I have a JOIN vs. IN question...
The Premier Products exercise for Chpater 4, question #6 asks us to "Find the number and name of each customer that did not place an order on October 20, 2003. My initial query was as follows...
SELECT orders.customer_num, customer_name
FROM orders, customer
WHERE orders.customer_num = customer.customer_num
AND order_date <> '20-OCT-2003';
Upon running it and comparing it to the correct query which is....
SELECT customer_num, customer_name
FROM customer
WHERE customer_num not in
(SELECT customer_num
FROM orders
WHERE order_date = '20-OCT-2003');
I found that these two queries produced different results. The first query resulted in fewer rows displayed than the second, and I am curious as to why. Does it have something to do with the fact that my first query places too harsh a limit on the results because it filters out all the customers who placed an order on the 20th, irrespective of the fact that they might have placed an order on another date also? Is this what the second query is taking into consideration... that the same customer who placed an order on the 20th may have also placed an order on another day, and b/c they placed an order on another day, they should be displayed? Or, is my first query and this entire logic just totally flawed???
October 15, 2004 in Class Issues | Permalink | Comments (0) | TrackBack (1)
Out of curiosity, what is the difference between the drop table command and the delete command? Does it have something to do with the fact that if you use the drop command, it deletes the entire table, and if you use the delete command, it deletes just the data in the table?
I’m also a bit confused about the whole notion of a “buffer.” Based on the notes online for Chapter 2 (specifically point #5), it looks like we can avoid most of the sections where the book talks about using the command buffer due to the fact that we are using jedit. But, if we weren’t using jedit, what is the role of the buffer and what does it do?
October 09, 2004 in Class Issues | Permalink | Comments (0) | TrackBack (1)
In class the other day, the issue of ambiguity arose in regards the way that questions are worded… specifically questions 8, 9, and 10 of ER Exercise #3 (see agenda for 9/30/04 class) . In looking at question 8, is there a foolproof way to look at the structure of the wording in order to figure out whether to start at professor and trace down or to start at college and trace up? The diagram totally contradicts itself.
Tracing downwards from professor says that a professor must have at least one position and that one position has to be in at least one department. Likewise, the department has to be within one college. Using this logic, if you have a professor, the professor must belong to a college.
However, if you trace upwards through the diagram starting college, it shows that a college doesn’t necessarily have to have a department. In other words, the college can exist without departments, positions, and professors.
So we are left with the following: professors must belong to colleges but colleges don’t necessarily need professors.
In completing this, I began to wonder if the underlying issue was really existence… and whether or not knowing which one existed first clarifies which way to go through the chart? Or, is this question just hopeless in terms of finding one right answer?
October 02, 2004 in Class Issues | Permalink | Comments (0) | TrackBack (1)
I just wanted to clarify my question regarding the 4NF car example we were discussing in class the other day. In the table, there were 3 fields: car type, color, and engine. Looking at the data given, you would need all three of these characteristics in order to uniquely identify a car. Since keeping everything together in one table poses some problems in regards to deletion, insertion, and update anomalies, we determined in class that you would break the table up into two parts, with car type as the recurring key in both tables: [car type] => [color] and [car type] => [engine]. I understand that color and engine are both attributes of car type and that is why it is the primary key. But, hypothetically speaking, if you were running a paint shop and paint color was your primary concern, couldn’t you structure the tables so as to make color the recurring/primary key? [color] => [car type] and [color] => [engine]
This probably isn’t the best example unless there is some crazy rule that states cars with certain engines can only be painted certain colors. But, the real question I was trying to drive at is whether or not there will be situations when there will be multiple field options that can be chosen as the primary or recurring key. For example, if the three fields were car type, paint color, and trim color, couldn’t you structure it either as [car type] => [paint color]; [car type] => [trim color] OR as [paint color] => [car type]; [paint color] => [trim color]? (assuming that certain trim colors only go with certain paint colors and certain car types only allow certain trim colors… i.e. Eddie Bauer vs. Regular Explorers?)
September 23, 2004 in Class Issues | Permalink | Comments (0)