tag:blogger.com,1999:blog-4028216859586758336.post3166670028373757538..comments2008-12-22T00:58:46.884-08:00Comments on CSE 494/598 Fall 2008 Blog: Thinking Cap questions: The Lame-Duck editionSubbarao Kambhampatihttp://www.blogger.com/profile/08449853328445416609noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-4028216859586758336.post-19138955586050594102008-11-21T12:59:00.000-08:002008-11-21T12:59:00.000-08:001. RDF is the framework being used to create seman...1. RDF is the framework being used to create semantic web. If we look at a database we see that each relation in the DB can be reduced to an RDF triple as follows:<BR/><BR/>- each record in the DB is an RDF node<BR/>- the field (column) name is the RDF property Type<BR/>- the record field (table cell) is a value<BR/><BR/>Now RDF s serialization format is nothing but its syntax in XML, and hence XML seems to be a good way to represent relational DBs.<BR/><BR/>Check out the link: http://www.w3.org/DesignIssues/RDB-RDF.htmlMithilahttps://www.blogger.com/profile/09903563031512002234noreply@blogger.comtag:blogger.com,1999:blog-4028216859586758336.post-42125973829187727312008-11-20T10:13:00.000-08:002008-11-20T10:13:00.000-08:002. One problem of assuming XML is ordered is that ...2. One problem of assuming XML is ordered is that for an unordered DB, there could be multiple ordered XML representations of a table. When we try to compare two DBs using XML, that will be more complicated.Dejun Yanghttps://www.blogger.com/profile/00840690827518261062noreply@blogger.comtag:blogger.com,1999:blog-4028216859586758336.post-67643097021228578152008-11-20T08:14:00.000-08:002008-11-20T08:14:00.000-08:00This comment has been removed by the author.Radhika Nairhttps://www.blogger.com/profile/18011620982499179048noreply@blogger.comtag:blogger.com,1999:blog-4028216859586758336.post-51632334825268479672008-11-20T08:08:00.000-08:002008-11-20T08:08:00.000-08:00Relational databases can be thought of having sema...Relational databases can be thought of having semantics, but again it depends on how the user perceives it(as many have pointed out in the blog). If we do go ahead with the idea that relational databases have semantics. then semantics can be retained while converting to XML if we can determine some relation between XML schema and database schema, in the sense of the "world" that we are talking about.Radhika Nairhttps://www.blogger.com/profile/18011620982499179048noreply@blogger.comtag:blogger.com,1999:blog-4028216859586758336.post-11843937192317256332008-11-19T20:55:00.000-08:002008-11-19T20:55:00.000-08:00i made a typing error...i meant to say:A database ...i made a typing error...i meant to say:<BR/><BR/>A database schema (like XML DTD) just allows for syntax parsing, "BUT NO" semantic interpretation of the meaning (which involves model checking against the background knowledge)...Anupamhttps://www.blogger.com/profile/09754564159857937896noreply@blogger.comtag:blogger.com,1999:blog-4028216859586758336.post-68622934395755523442008-11-19T20:53:00.000-08:002008-11-19T20:53:00.000-08:00This comment has been removed by the author.Anupamhttps://www.blogger.com/profile/09754564159857937896noreply@blogger.comtag:blogger.com,1999:blog-4028216859586758336.post-62381707948330240762008-11-19T20:51:00.000-08:002008-11-19T20:51:00.000-08:00RDBMS have no semantics whatsoever. A database sch...RDBMS have no semantics whatsoever. A database schema (like XML DTD) just allows for syntax parsing, semantic interpretation of the meaning (which involves model checking against the background knowledge). For example, a tuple (make = Honda, model = Civic, price = $20000) is supposed to mean that "there exists a car manufactured by Honda, of model Civic, priced at $10000. The tuple and the schema do not imply this meaning anywhere. We can make sense of it because we know that Honda Civic is a car and $ is a currency etc.<BR/><BR/>the closest databases reach towards semantics are deductive databases, which are equipped with an inference mechanism.Anupamhttps://www.blogger.com/profile/09754564159857937896noreply@blogger.comtag:blogger.com,1999:blog-4028216859586758336.post-45719795278626247132008-11-19T19:53:00.000-08:002008-11-19T19:53:00.000-08:002. We considered "unordered" as not ordered by a s...2. We considered "unordered" as not ordered by a specific value (like object-id), but the data in an XML file is still ordered (in the way how we entered the data for instance). The same is true for a database. Furthermore, data in a DB is often stored in a tree (B+ tree). If a DB stores data in a tree and an XML-document is nothing else than a tree, what is the difference? "Unordered" doesn't exist in my opinion. It is more like "ordered, but we don't know how" or "ordered in a way that doesn't make any sense" (but still ordered).<BR/><BR/>Way more important is the way how the DBMS retrieves data from the underlying DB. If a relational database uses trees to store the data, we could use such a DBMS on an XML-file to retrieve the data in the same efficient way, especially, if we use techniques like indexing.<BR/><BR/>In consideration of the question, the IR perspective deals with the way how data is returned and ordered by the DBMS. The DB perspective deals with the way how data is stored (on the hard drive).<BR/><BR/>So, what is the disadvantage of the assumption that XML is always ordered? Based on my assumption that there is no real "unordered" and a DB doesn't necessarily want "unordered" data (why should it?): No disadvantage, since it depends on the DBMS how the data is retrieved (for IR).<BR/>And what is the loss from the DB side? No loss, since all data always has to be ordered in a specific way to make it retrievable. The question is, how efficient is the order of the data and how efficient is the retrieval.No blog namehttps://www.blogger.com/profile/05691974558898855382noreply@blogger.comtag:blogger.com,1999:blog-4028216859586758336.post-73876243433189496802008-11-19T12:35:00.000-08:002008-11-19T12:35:00.000-08:00the above was response to Q1the above was response to Q1Shruti Gaurhttps://www.blogger.com/profile/04731238451701067018noreply@blogger.comtag:blogger.com,1999:blog-4028216859586758336.post-13736018404012053862008-11-19T12:32:00.000-08:002008-11-19T12:32:00.000-08:00A relation in an RDBMS is essentially a mapping be...A relation in an RDBMS is essentially a mapping between the fields, like we have mapping between variables in functions. The same way as we have propositions in logic. Each tuple of a relation represents one such propositional rule eg.if we have a relation with the following attributes [father,son] and the tuples are [a,b],[b,c], [p,q]. Then given a query find x:x is father(father(c)). The database can find a as the correct answer. So, we do know the worlds that are possible and can tell whether a given statement is true or false. <BR/><BR/>As another illustration, let us say the attributes are [a1,a2,a3,a4] then if a tuple [x1,x2,x3,x4] is stored in the table, we have an idea that if a1=x1 and a2=x2 and a3=x3 then a4=x4.<BR/><BR/>We can do this even without knowing what the values of the attributes are and what they mean in the real world. <BR/><BR/>we can retain the data types and relationships(kind-of) among the data values in XML but there is no mechanism to (do joins and) make logical infernces. <BR/><BR/>One might argue that the semantics are in the eye of the beholder even in relational DBs because the E-R diagram is in our head. So, we might not know whether relationships are 1:1,m:1,1:m etc. but we can still do such basic inferences. Absurd inferences are also possible. If someone decides to join the age(int) column of table1 with serial no(int) column of table2, there is no way of stopping that without having any knowledge of the schema.If we have the schema, the number of worlds possible is even more constrained and inferences more accurate.Shruti Gaurhttps://www.blogger.com/profile/04731238451701067018noreply@blogger.comtag:blogger.com,1999:blog-4028216859586758336.post-90833045323021686062008-11-19T11:41:00.000-08:002008-11-19T11:41:00.000-08:002. When we convert XML document to a database mode...2. When we convert XML document to a database model, we generally store the data extracted from an XML document in the form of tables which follows a predefined schema. However, this structured representation of the DB doesn't preserve the XML document's original structure. i.e the tag ordering in XML may be lost. Therefore, considering that an XML is ordered may not help in preserving the structure of a database model. Or in other words, it is better to consider the XML as unordered.<BR/><BR/>1.Inorder to preserve the semantics while converting an RDBMS to an XML, we can convert it to an XML DTD where the columns in RDB can be represented as PCDATA or attributes. However, the CDATA sections in DTD might not be preserved.<BR/>I stand corrected though.Girishhttps://www.blogger.com/profile/05839095000692718935noreply@blogger.comtag:blogger.com,1999:blog-4028216859586758336.post-71454555228604067172008-11-19T11:34:00.000-08:002008-11-19T11:34:00.000-08:00This comment has been removed by the author.Girishhttps://www.blogger.com/profile/05839095000692718935noreply@blogger.comtag:blogger.com,1999:blog-4028216859586758336.post-80325412717581115022008-11-19T09:43:00.000-08:002008-11-19T09:43:00.000-08:001. I consider that the semantics of a relational d...1. I consider that the semantics of a relational database is in the eyes of the user. In other words, the understanding of the meaning of a given attribute, tuple, or table, depends on the knowledge the user has about the underlying structure. <BR/>Additionally , converting a relational database to XML will preserve the semantics if there is an adequate procedure to translate the meaning of each element from one schema into another schema.<BR/><BR/>2. If we decide that XML is ordered, the big loss in the database side is the loss of all the potential a DB has to express the stored (raw) data in multiple ways. Plus, assuming that XML is always ordered could create conflicts if the data is incomplete or completely absent.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4028216859586758336.post-86059315224015184842008-11-19T07:52:00.000-08:002008-11-19T07:52:00.000-08:001. Yeah, RDBMS do have semantics. The schema for e...1. Yeah, RDBMS do have semantics. The schema for each table forms the grammar used to check the validity of each table. So when we are converting a table to a XML, if we are throwing the schema and just converting the raw data to XML, we would loose the semantics. But if we convert the schema to XML's respective DTD and use it for the correctness verification, I think we can preserve the semantics.<BR/><BR/>2. Any ordering of the given tuples in a table will correspond to a single instance of table, but if we strictly consider XML as ordered file, the resulting XML matches to only one ordering of the tuples which is not true. So this is really useful, when we are trying to validate a given XML with a database table.Ravi Gummadihttps://www.blogger.com/profile/02454944246336983066noreply@blogger.com