Skip to content

Commit

Permalink
Add missing information
Browse files Browse the repository at this point in the history
fix #92
  • Loading branch information
dhfelix committed May 14, 2019
1 parent edb380c commit 2351d32
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ RedDog's builtin schema is an ordinary relational database conceived in MySQL. U

The means through which the data is exported will depend on how the data is stored in the origin database, this documentation cannot fall into details on how to do it. Instead, this will serve as reference material for RedDog's schema.

RedDog's database contains 68 tables. Though the task of populating them might seem daunting, it is important to note that's likely to need only a fraction of them. The main ones are [autonomous_system_number]({{ page.scriptLink }}#L365), [domain]({{ page.scriptLink }}#L161), [entity]({{ page.scriptLink }}#L25), [ip_network]({{ page.scriptLink }}#L626) and [nameserver]({{ page.scriptLink }}#L423). Pick only the ones needed and branch from there.
RedDog's database contains 68 tables. Though the task of populating them might seem daunting, it is important to note that's likely to need only a fraction of them. The main ones are [autonomous_system_number]({{ page.scriptLink }}#L386), [domain]({{ page.scriptLink }}#L182), [entity]({{ page.scriptLink }}#L25), [ip_network]({{ page.scriptLink }}#L647) and [nameserver]({{ page.scriptLink }}#L444). Pick only the ones needed and branch from there.

## Full Schema definition

The script to generate the database is located [here]({{ page.rawScriptLink }} "SQL file with tables") and the ER diagram [here](img/diagram/db-er.png).
The script to generate the database is located [here]({{ page.rawScriptLink }} "SQL file with tables").

The following table shows the database tables, to see more detail of each table there's a link to its creation script:

Expand Down Expand Up @@ -90,5 +90,6 @@ The following table shows the database tables, to see more detail of each table
| variant_name | This table contains the variants names. | [View more]({{ page.scriptLink }}#L1091) |
| variant_relation | This table contains the type of relations of a Variant. | [View more]({{ page.scriptLink }}#L1279) |
| vcard | This table contains the entities VCards. | [View more]({{ page.scriptLink }}#L41) |
| vcard_contact_uri | This table contains the contact uri for vCard | [View more]({{ page.scriptLink }}#L62) |
| vcard_postal_info | This table contains the VCards postal information. | [View more]({{ page.scriptLink }}#L1110) |
| zone | This table contains the zones managed by the RDAP server owner. | [View more]({{ page.scriptLink }}#L167) |
8 changes: 6 additions & 2 deletions overriding-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ This file loads a DSData data object. The following table describes each alias a
|Alias name|Value Type|Allows Null|Description|Example|
|:---------|:--------:|:---------:|:----------|:-----:|
|dsd_id| Long| No| Ds data's id| 123|
|sdns_id| Long| No| Secure DNS's id (Refer to [SecureDNS.sql](#securednssql)| 123|
|sdns_id| Long| No| Secure DNS's id (Refer to [SecureDNS.sql](#securednssql))| 123|
|dsd_keytag| Integer| No| An integer as specified by the key tag field of a DNS DS record| 12345|
|dsd_algorithm| Integer| No| An integer as specified by the algorithm field of a DNS DS record| 3|
|dsd_digest| String| No| A string as specified by the digest field of a DNS DS record| 49FD46E6C4B45C55D4AC|
Expand Down Expand Up @@ -216,7 +216,7 @@ The following table describes each alias and value type that the queries must re
|Alias name|Value Type|Allows Null|Description|Example|
|:---------|:--------:|:---------:|:----------|:-----:|
|kd_id| Long| No| Key Data's id| 123|
|kd_kd_sdns_id| Long| No| Secure DNS id| 123|
|sdns_id| Long| No| Secure DNS's id (Refer to [SecureDNS.sql](#securednssql))| 123|
|kd_flags| Integer| Yes| Integer containing the flags| 256|
|kd_protocol| Integer| Yes| Integer containing the protocol value| 3|
|kd_public_key| String| Yes| Public Key Material| 105klfie05|
Expand Down Expand Up @@ -387,6 +387,9 @@ The following table describes each alias and value type that the queries must re
|vca_cellphone| String| Yes| Contact's cellphone| 81 8181818181|
|vca_fax| String| Yes| Contact's fax| 248.697.0908|
|vca_job_title| String| Yes| Contact's job title| Engineer|
|vcu_id| Long| No| Contact Uri's id| 123|
|vcu_order| Unsigned Int| yes| Prefered order of contact| 1|
|vcu_uri| String| No| Contact URI| https://contact.example.com|

The new SQL file must define the same queries and aliases as the RedDog's implementation do, so both RedDog's implementation and the own database columns coincide. The queries and aliases must be like [META-INF/sql/VCard.sql](https://github.com/NICMx/rdap-sql-provider/blob/master/src/main/resources/META-INF/sql/VCard.sql).

Expand All @@ -403,6 +406,7 @@ The following table describes each alias and value type that the queries must re
|vca_id| Long| No| Vcard's id (Refer to [VCard.sql](#vcardsql))| 123|
|vpi_type| String| Yes| Postal info's type| local|
|vpi_country| String| Yes| Country| Mexico|
|vpi_country_code| String| Yes| ISO 3166 2-char Code| MX|
|vpi_city| String| Yes| City| Juarez|
|vpi_street1| String| Yes| Street (first part)| Luis Elizondo|
|vpi_street2| String| Yes| Street (second part)| Altavista|
Expand Down

0 comments on commit 2351d32

Please sign in to comment.