The Table Schemas of DDBC Time Authority Database
As specified by the Entity Relations, the table schemas for the DDBC Time Authority Database are as follows:
Table : dynasty
Field Name |
Data Type |
Description |
id |
char(4) |
Primary key |
name |
char(15) |
Name of dynasty |
Table : emperor
Field Name |
Data Type |
Description |
id |
int(5) |
Primary key |
name |
char(18) |
Name of emperor |
dynasty_id |
char(4) |
Foreign key points to id in dynasty table |
Table : era
Field Name |
Data Type |
Description |
id |
int(5) |
Primary key |
name |
char(21) |
Name of the reign |
emperor_id |
int(5) |
Foreign key points to id in emperor table |
Table : lunar_month
Field Name |
Data Type |
Description |
id |
int(5) |
Primary key |
year |
int(3) |
Ordinal number designating year of the era |
name |
char(6) |
Name of the month in Chinese |
era_id |
int(5) |
Foreign key points to id in era table |
first |
int(8) |
First day of the month (Julian Day format) |
last |
int(8) |
Last day of the month (Julian Day format) |
ganzhi |
Char(6) |
Sexagenary number of the solar year in which the month falls |
start_from |
int(3) |
The ordinal day of the lunar month from which this record is valid. In the event that an era begins in the middle of a month, this value will be greater than 1. Also used when dealing with prolepsis. |
status |
enum('S','P') |
This field records the status of the month. Currently it is used in dealing with prolepsis, but it is conceivable that further uses will be entertained in the future. Currently only allows two values: 'S', for standard; and 'P' for proleptic. |
eclipse |
int(1) (boolean) |
Boolean (true/false) value indicating whether a solar eclipse occurs on the first day of this month. Please note that this field is not exhaustively populated. |