db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kim Haase (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6462) Provide more information about database name and path syntax
Date Wed, 26 Mar 2014 15:31:26 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13948001#comment-13948001
] 

Kim Haase commented on DERBY-6462:
----------------------------------

Dag has noticed the following URLs that provide some insight into the database name/path terminology:

http://en.wikipedia.org/wiki/Path_%28computing%29
http://stackoverflow.com/questions/2235173/file-name-path-name-base-name-naming-standard-for-pieces-of-a-path

He has also made a proposal for a nomenclature, just to get the discussion going.

{noformat}
-----------------------------------------------------------
Naming scheme for naming files, directories and paths.

<file> ::= /* The logical entity. Prefer <file name> */

<directory> ::= /* Special file that can hold other files.
                   Prefer <directory name> (or <file name>") */

<path> ::= /* A string sufficient to locate the file given the context.
              Prefer <path name> */

/* The name of a file or directory without any directory
 * or volume (Drive) information. Any extension is included.
 */
<file name> ::= <base name> [ <extension> ]
                | "."
                | ".."
    /* Note that "/" is an absolute path name, not a file name
       in this nomenclature */

Example:
        .bashrc     // empty base name
        foo.bar.txt // base name is foo.bar, extension is .txt
        ..          // also a directory name

/* The last part of a file name, containing an initial period ".",
 * but no other periods.
 */
<extension> ::= "." [ <extension name> ]

<extension name> ::= <name>

Example:
        .txt   // extension is ".txt", extension name is "txt"
        .      // empty extension name

/* The file name without the extension.  */
<base name> ::= "" | <name>


<name> ::= // OS dependent, but a string not containing ":" or the
           // path delimiter


/* A logical chain of volumes, directories and subdirectory in which a
 * file is placed, included the name of the file itself. May be
 * relative or absolute. Enough to access a file
 */
<path name> ::= <relative path name> | <absolute path name>

/* Note that a file name is technically a special form of a relative
 * path name.  A file so named can be accessed given the current
 * directory context.
 */
<relative path name> ::= [<UNC name>] [<drive name>]
                         <file name> [ <path delimiter> <file name> ]*

Example:
    foo/bar/myfile.txt
        foo/bar             // NOTE: "foo/bar/" doesn't have a name,
                            // it's a (relative) path name with a
                            // trailing path delimiter
    myfile.txt
        c:foo/bar/myfile.txt

<absolute path name> ::= [<UNC name>] [<drive name>]
                         <path delimiter> <relative path name>

<UNC name> ::= // Not broken down by this nomenclature. E.g. "\\server"

<Drive name> ::= <Drive letter> ":"

<Drive letter> ::= // Not broken down by this nomenclature. E.g. C

Example:
        c:
        Z:

Derived names (syntactic sugar):

<directory name>  ::= <file name>  // usually without extension

<relative directory name> ::= <directory name> // A directory name is always
                                               // relative.

<absolute file name> ::= <absolute path name> /* Of a file */

<path component> ::= <file name> | <drive name> | < UNC name>

/*
 * Now, given this we are in a position to define a data base name.
 */
<data base name> ::= <path name> // Of a directory

<resolved path> ::= <absolute path name>

<fully qualified path> ::= <absolute path name>
{noformat}

> Provide more information about database name and path syntax
> ------------------------------------------------------------
>
>                 Key: DERBY-6462
>                 URL: https://issues.apache.org/jira/browse/DERBY-6462
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.11.0.0
>            Reporter: Dag H. Wanvik
>            Assignee: Kim Haase
>         Attachments: DERBY-6462-2.diff, DERBY-6462-2.stat, DERBY-6462-2.zip, DERBY-6462-3.diff,
DERBY-6462-3.zip, DERBY-6462.diff, DERBY-6462.stat, DERBY-6462.zip
>
>
> Except for initial Windows drive letters (e.g. K:/derby), colons break Derby.
> Windows can't have colons in directory of file names, so this is a Unix issue.
> [http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx#file_and_directory_names]



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message