- From: Ivan Herman <ivan@w3.org>
- Date: Tue, 24 Jan 2012 18:01:20 +0100
- To: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
- Cc: Juan Sequeda <juanfederico@gmail.com>, Eric Prud'hommeaux <eric@w3.org>, Alexandre Bertails <bertails@w3.org>, W3C RDB2RDF <public-rdb2rdf-wg@w3.org>
- Message-Id: <A75B5835-6577-43C9-8D18-C70474B03525@w3.org>
Thanks Ted. This makes it pretty clear and changes should be done. Juan? Ivan On Jan 24, 2012, at 17:45 , Ted Thibodeau Jr wrote: > Juan, Ivan, all -- > > On Jan 24, 2012, at 11:11 AM, Juan Sequeda wrote: >> On Sun, Jan 22, 2012 at 6:27 AM, Ivan Herman <ivan@w3.org> wrote: >> >>> Again my SQL knowledge... at the last telco we decided to put a quote around identifier to get around the character casing problem. Shouldn't ID be in quotes in the argument of PRIMARY KEY(ID) as well (note that the same statement is quoted in the text after the SQL portion where ID is in quotes)? The same question for the INSERT statements. >> >> >> Also added missing quotes in another example. >> >> Not sure about the INSERT statements... somebody? > > Generally speaking, if any relational identifiers are wrapped > in double-quotes, all should be. > > More specifically to a given scenario (such as this document), > if a given identifier is wrapped (and thus made case-sensitive) > once, it must be so wrapped every time. > > So, yes, e.g. from 2.1 -- > > CREATE TABLE "Addresses" ( > "ID" INT, PRIMARY KEY("ID"), > "city" CHAR(10), > "state" CHAR(2) > ) > > CREATE TABLE "People" ( > "ID" INT, PRIMARY KEY("ID"), > "fname" CHAR(10), > "addr" INT, > FOREIGN KEY("addr") REFERENCES "Addresses"("ID") > ) > > INSERT INTO Addresses (ID, city, state) VALUES (18, > 'Cambridge', 'MA') > INSERT INTO People (ID, fname, addr) VALUES (7, 'Bob', 18) > INSERT INTO People (ID, fname, addr) VALUES (8, 'Sue', NULL) > > -- the last three lines should become -- > > INSERT INTO Addresses ("ID", "city", "state") VALUES (18, > 'Cambridge', 'MA') > INSERT INTO People ("ID", "fname", "addr") VALUES (7, 'Bob', 18) > INSERT INTO People ("ID", "fname", "addr") VALUES (8, 'Sue', NULL) > > > >>> Also, is it intentional that sometimes single and sometimes double quotes are used? If the two are interchangeable, I would propose to be consistent within the examples > > They are not interchangeable in SQL. Single-quotes wrap string > values. Double-quotes wrap identifiers (table, column, etc.). > > But we must be consistent with use of each. > > Regards, > > Ted > > > > -- > A: Yes. http://www.guckes.net/faq/attribution.html > | Q: Are you sure? > | | A: Because it reverses the logical flow of conversation. > | | | Q: Why is top posting frowned upon? > > Ted Thibodeau, Jr. // voice +1-781-273-0900 x32 > Evangelism & Support // mailto:tthibodeau@openlinksw.com > // http://twitter.com/TallTed > OpenLink Software, Inc. // http://www.openlinksw.com/ > 10 Burlington Mall Road, Suite 265, Burlington MA 01803 > Weblog -- http://www.openlinksw.com/blogs/ > LinkedIn -- http://www.linkedin.com/company/openlink-software/ > Twitter -- http://twitter.com/OpenLink > Google+ -- http://plus.google.com/100570109519069333827/ > Facebook -- http://www.facebook.com/OpenLinkSoftware > Universal Data Access, Integration, and Management Technology Providers > > > > > ---- Ivan Herman, W3C Semantic Web Activity Lead Home: http://www.w3.org/People/Ivan/ mobile: +31-641044153 FOAF: http://www.ivan-herman.net/foaf.rdf
Attachments
- application/pkcs7-signature attachment: smime.p7s
Received on Tuesday, 24 January 2012 17:00:01 UTC