-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<h1>ASCII Schema Structure</h1> | ||
|
||
To load database schema with additional information, such as units or ucds, you'd first need to create an ASCII file containing the schema with additional information as described below. | ||
|
||
Each DBMS stores stores information about all databases it maintains. The structure of such information is typically fixed, and additional information (for example units) is hard to capture. To overcome this, our DDL loader recognizes special special tags. The tags need to be inserted in appropriate places inside comments. They are optional. | ||
|
||
Currently supported tags: | ||
<ul> | ||
<li><b><descr></b>: the contents between <descr> and </descr> will contain description (of a table or a column), | ||
<li><b><unit></b>: the contents between <unit> and </unit> will contain definition of a unit, | ||
<li><b><ucd></b>: the contents between <ucd> and </ucd> will contain ucd value. | ||
</ul> | ||
|
||
Multi-lines are allowed for <descr> Examples of a valid multi-line entries: | ||
|
||
-- <descr>This is a valid entry. | ||
-- </descr> | ||
|
||
-- <descr>This is a | ||
-- valid entry | ||
-- as well.</descr> | ||
|
||
-- <descr> | ||
-- So is this. | ||
-- </descr> | ||
|
||
|
||
<h2>Table Description</h2> | ||
|
||
To add a table description, use <descr></descr> right after table name, before the opening bracket. Example: | ||
|
||
CREATE TABLE MyTable | ||
-- <descr>This is my table.</descr> | ||
( | ||
|
||
|
||
<h2>Column Description, ucd, units</h2> | ||
|
||
To add a column description, use <descr></descr> | ||
|
||
To add a unit for a given column, use <unit></unit> | ||
|
||
To add a ucd definition for a given column , use <ucd></ucd> | ||
|
||
These values should appear right after the column definition, in any order. Example: | ||
|
||
ra DOUBLE NOT NULL, | ||
-- <descr>RA-coordinate of the center of this diaObject.</descr> | ||
-- <ucd>stat.error;pos.eq.ra</ucd> | ||
-- <unit>deg</unit> |