This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 104227 - schema and table names created as quoted
Summary: schema and table names created as quoted
Status: RESOLVED DUPLICATE of bug 87920
Alias: None
Product: db
Classification: Unclassified
Component: Derby (show other bugs)
Version: 6.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-18 00:11 UTC by John Baker
Modified: 2007-05-18 10:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Baker 2007-05-18 00:11:36 UTC
Creating a new table, creates a table name that is enclosed in quotes:

This is the SQL used to create the table:

create table "TRAVEL"."test"
(
        "a" VARCHAR        
)

Users complained that when accessing the table from Java code, the quotes have
to be escaped.
Comment 1 David Vancouvering 2007-05-18 01:23:36 UTC
I'd like to understand in more detail why we use quotes everywhere when working
with databases.  Why can't we just create tables and columns without quotes? 
You can find out from DatabaseMetaData whether or not a database converts
identifiers to lower case or upper case (most use lower case).

See
http://java.sun.com/j2se/1.5.0/docs/api/java/sql/DatabaseMetaData.html#storesLowerCaseIdentifiers()

also storesUpperCaseIdentifiers(), supportsMixedCaseQuotedIdentifiers(), etc.

Let's get over this quote madness.  Trying to write queries in the SQL query
editor is frustrating because you're always having to quote things.  This is
actually a real usability issue.
Comment 2 Andrei Badea 2007-05-18 10:53:14 UTC

*** This issue has been marked as a duplicate of 87920 ***