Jump to: navigation, search

Difference between revisions of "Designate/Blueprints/Records Table Redesign"

(Existing Tables)
(TXT_Records)
 
(70 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
! Gerrit Patch || []
 
! Gerrit Patch || []
 
|-
 
|-
! Launchpad Blueprint || [https://blueprints.launchpad.net/designate/+spec/records-table-redesign]
+
! Launchpad Blueprint || [https://blueprints.launchpad.net/designate/+spec/recordsets-records-tables-redesign]
 
|}
 
|}
  
This blueprint proposes to subdivide the Records table, which includes all record types, into a table per record type. For instance, an "a_records" table for A records, "mx_records" table for MX records, and so on.
+
Currently, there is only one RecordSets table and one Records table for all the different record types. This blueprint proposes to subdivide those tables into a RecordSet table and Record table per record type.
  
At this time, the migration of data from the existing Records table to the new separate tables is not included in this specification document.
+
Having one monolithic RecordSets table and Records table for all record types can become problematic as the size of the table grows. If any modifications need to be made, for example, adding a column, the entire table would have to be locked and it could take a long time to update a table with millions of records. In addition, if a table gets too large, it has to be sharded, which involves writing a lot of code to know which shard to call for which records. On the other hand, joins across tables are not a problem, as long as the indexing is done correctly. In addition, having a table per record type is a proven DNS database design as some companies have already implemented it in this fashion and have millions of records.
  
== Database Schema Changes - WIP ==
+
Most of the information that is currently in the Records table will be consolidated into the RecordSet table. The Records table for each type will only contain the record_id, the recordset_id and the unique data for that particular record type. For instance, the A_Record table will contain the recordset_id and the IPv4 address. The MX_Record table will contain the recordset_id and the FQDN for the mail server and its preference value. See the the tables below for more detail.
  
The existing Records table would become obsolete and be replaced with new tables for each record type.
+
== Database Schema Changes ==
 +
 
 +
The existing Recordset table and Records table will become obsolete and be replaced with new tables for each record type.
 
=== Existing Tables ===
 
=== Existing Tables ===
  
==== Recordsets Table ===
+
==== Recordsets Table ====
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 28: Line 30:
 
| updated_at || datetime || - || True || Time of last update
 
| updated_at || datetime || - || True || Time of last update
 
|-
 
|-
| version || INT || 11 || False ||  
+
| version || INT || 11 || False || Designate API version
 
|-
 
|-
| tenant_id || VARCHAR || 36 || True ||  
+
| tenant_id || VARCHAR || 36 || True || ID of recordset owner
 
|-
 
|-
 
| domain_id || CHAR || 32 || False || Non-unique Key
 
| domain_id || CHAR || 32 || False || Non-unique Key
Line 90: Line 92:
  
 
=== New Tables ===
 
=== New Tables ===
== Database Schema ==
 
 
There are several changes being done to the database. Even though these changes will be done by a separate blueprint, I'm describing them here so all the changes can be seen in one place. I think that will make it easier to understand them.
 
 
The RecordSet table will be divided up into a table per record type. The RecordSets table for each type will combine most of the data currently in the recordsets and records tables.  The Record table associated with a type will only contain the RecordSet id and data associated with that recordset.
 
  
'''Questions:'''
+
==== RecordSets ====
1. How does "version" get set?
 
2. In the current RecordSets and Records table is says that created_at can be null. Is that accurate?
 
 
 
==== A_RecordSet ====
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 114: Line 107:
 
| version || INTEGER || 11 || False || Designate API version
 
| version || INTEGER || 11 || False || Designate API version
 
|-
 
|-
| tenant_id || VARCHAR || 36 || True || The tenant_id to which the record belongs
+
| tenant_id || CHAR || 36 || True || The tenant_id to which the record belongs
 
|-
 
|-
| domain_id || VARCHAR || 32 || False || Non-Unique Key; the domain_id to which the record belongs
+
| domain_id || CHAR || 32 || False || Non-Unique Key; the domain_id to which the record belongs
 
|-
 
|-
 
| name || VARCHAR || 255 || False || The zone to which the A record belongs
 
| name || VARCHAR || 255 || False || The zone to which the A record belongs
Line 145: Line 138:
 
|}
 
|}
  
==== A_Record ====
+
==== A_Records ====
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 151: Line 144:
 
! Name !! Data Type !! Length !! Nullable !! Details
 
! Name !! Data Type !! Length !! Nullable !! Details
 
|-
 
|-
| recordset_id || VARCHAR || 32 || False || UUID, Unique Key
+
|id || CHAR || 32 || False || UUID, Unique Key
 
|-
 
|-
| record || VARCHAR || 15 || False || iPv4
+
|recordset_id || CHAR || 32 || False || Non-unique Key
 +
|-
 +
| address || VARCHAR || 15 || False || iPv4
 
|}
 
|}
  
 
+
==== AAAA_Records ====
''''Question''''
 
 
 
1. Should it be VARCHAR 15 or INT 4 bytes?
 
 
 
==== And So On ====
 
There would be a recordset and record table for each record type. The record table would be customized for each record type's data.
 
 
 
 
 
==== A_Records Table ====
 
 
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
 
! Name !! Data Type !! Length !! Nullable !! Details
 
! Name !! Data Type !! Length !! Nullable !! Details
 
|-
 
|-
| id || CHAR || 32 || False || Primary Key, Generated UUID
+
|id || CHAR || 32 || False || UUID, Unique Key
 
|-
 
|-
| created_at || DATETIME || - || True || UTC time of creation
+
|recordset_id|| CHAR || 32 || False || Non-unique Key
 
|-
 
|-
| updated_at || DATETIME || - || True || UTC time of last update
+
| address || BINARY || 16|| False || iPv6 address
 +
|}
 +
 
 +
==== CNAME_Records ====
 +
{| class="wikitable"
 
|-
 
|-
| version || INTEGER || 11 || False || Designate API version
+
! Name !! Data Type !! Length !! Nullable !! Details
 
|-
 
|-
| data || MEDIUMTEXT || - || False || IPv4 address
+
|id || CHAR || 32 || False || UUID, Unique Key
 
|-
 
|-
| domain_id || CHAR || 32 || False || Non-unique Key, Domain ID
+
|recordset_id || CHAR || 32 || False || Non-unique Key
 
|-
 
|-
| managed || TINYINT || 1 || True || Boolean value indicates a managed resource
+
| cname || VARCHAR || 255|| False || CNAME
 +
|}
 +
 
 +
==== MX_Records ====
 +
{| class="wikitable"
 
|-
 
|-
| managed_resource_type || VARCHAR || 50 || True || Managed resource type
+
! Name !! Data Type !! Length !! Nullable !! Details
 
|-
 
|-
| managed_resource_id || CHAR || 32 || True || Managed resource id
+
||id || CHAR || 32 || False || UUID, Unique Key
 
|-
 
|-
| managed_plugin_name || VARCHAR || 50 || True || Managed plugin name
+
|recordset_id || CHAR || 32 || False || Non-unique Key
 
|-
 
|-
| managed_plugin_type || VARCHAR || 50 || True || Managed plugin type
+
| exchange || VARCHAR || 255|| False || Hostname
 
|-
 
|-
| hash || VARCHAR || 32 || False || Unique Key, Hash value of record
+
| preference || INT ||11 || False || Lowest number has highest priority
 +
|}
 +
 
 +
==== NS_Records ====
 +
{| class="wikitable"
 
|-
 
|-
| description || VARCHAR || 160 || True || Description of record
+
! Name !! Data Type !! Length !! Nullable !! Details
|-
 
| status || ENUM("Active", "Pending", "Deleted") || - || False || Record status
 
|-
 
| tenant_id || VARCHAR || 36 || True || ID of record owner
 
|-
 
| recordset_id || CHAR || 32 || False || Non-unique Key, ID of recordset
 
 
|-
 
|-
| managed_tenant_id || CHAR || 32 || True || ID of managed owner
+
|id || CHAR || 32 || False || UUID, Unique Key
 
|-
 
|-
| managed_resource_region || VARCHAR || 100 || True || Region of managed
+
|recordset_id || CHAR || 32 || False || Non-unique Key
 
|-
 
|-
| managed_extra || VARCHAR || 100 || True || Extra field
+
| nsdname || VARCHAR || 255|| False || Hostname
 
|}
 
|}
  
==== AAAA_Records Table ====
+
==== PTR_Records ====
 
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
 
! Name !! Data Type !! Length !! Nullable !! Details
 
! Name !! Data Type !! Length !! Nullable !! Details
 
|-
 
|-
| id || CHAR || 32 || False || Primary Key, Generated UUID
+
|id || CHAR || 32 || False || UUID, Unique Key
 
|-
 
|-
| created_at || DATETIME || - || True || UTC time of creation
+
|recordset_id || CHAR || 32 || False || Non-unique Key
 
|-
 
|-
| updated_at || DATETIME || - || True || UTC time of last update
+
| ptrdname || VARCHAR || 255|| False || Hostname
 +
|}
 +
 
 +
==== SOA_Records ====
 +
{| class="wikitable"
 
|-
 
|-
| version || INTEGER || 11 || False || Designate API version
+
! Name !! Data Type !! Length !! Nullable !! Details
|-
 
| data || MEDIUMTEXT || - || False || IPv6 address
 
|-
 
| domain_id || CHAR || 32 || False || Non-unique Key, Domain ID
 
 
|-
 
|-
| managed || TINYINT || 1 || True || Boolean value indicates a managed resource
+
|id || CHAR || 32 || False || UUID, Unique Key
|-
 
| managed_resource_type || VARCHAR || 50 || True || Managed resource type
 
|-
 
| managed_resource_id || CHAR || 32 || True || Managed resource id
 
|-
 
| managed_plugin_name || VARCHAR || 50 || True || Managed plugin name
 
|-
 
| managed_plugin_type || VARCHAR || 50 || True || Managed plugin type
 
 
|-
 
|-
| hash || VARCHAR || 32 || False || Unique Key, Hash value of record
+
|recordset_id|| CHAR || 32 || False || Non-unique Key
 
|-
 
|-
| description || VARCHAR || 160 || True || Description of record
+
| mname || VARCHAR || 255 || False || Primary name server
 
|-
 
|-
| status || ENUM("Active", "Pending", "Deleted") || - || False || Record status
+
| rname || VARCHAR || 255 || False || Domain name that indicates the email address
 
|-
 
|-
| tenant_id || VARCHAR || 36 || True || ID of record owner
+
| serial || INT || 11 || False || Serial number
 
|-
 
|-
| recordset_id || CHAR || 32 || False || Non-unique Key, ID of recordset
+
| refresh || INT || 11 || False || Number of seconds between data refresh
 
|-
 
|-
| managed_tenant_id || CHAR || 32 || True || ID of managed owner
+
| retry || INT || 11 || False || Number of seconds between retries
 
|-
 
|-
| managed_resource_region || VARCHAR || 100 || True || Region of managed
+
| expire || INT || 11 || False || Number of seconds before information is no longer considered authoritative
 
|-
 
|-
| managed_extra || VARCHAR || 100 || True || Extra field
+
| minimum || INT || 11 || False || Number of seconds that the records in the zone are valid
 
|}
 
|}
==== MX_Records Table ====
 
  
 +
==== SPF_Records ====
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
 
! Name !! Data Type !! Length !! Nullable !! Details
 
! Name !! Data Type !! Length !! Nullable !! Details
 
|-
 
|-
| id || CHAR || 32 || False || Primary Key, Generated UUID
+
|id || CHAR || 32 || False || UUID, Unique Key
|-
 
| created_at || DATETIME || - || True || UTC time of creation
 
|-
 
| updated_at || DATETIME || - || True || UTC time of last update
 
|-
 
| version || INTEGER || 11 || False || Designate API version
 
|-
 
| data || MEDIUMTEXT || - || False || Mail Server
 
|-
 
| priority || INTEGER || 11 || False || Priority of MX record
 
|-
 
| domain_id || CHAR || 32 || False || Non-unique Key, Domain ID
 
|-
 
| managed || TINYINT || 1 || True || Boolean value indicates a managed resource
 
|-
 
| managed_resource_type || VARCHAR || 50 || True || Managed resource type
 
|-
 
| managed_resource_id || CHAR || 32 || True || Managed resource id
 
|-
 
| managed_plugin_name || VARCHAR || 50 || True || Managed plugin name
 
|-
 
| managed_plugin_type || VARCHAR || 50 || True || Managed plugin type
 
 
|-
 
|-
| hash || VARCHAR || 32 || False || Unique Key, Hash value of record
+
|recordset_id || CHAR || 32 || False || Non-unique Key
 
|-
 
|-
| description || VARCHAR || 160 || True || Description of record
+
| text || VARCHAR || 255|| False || Authorized computers to send mail
|-
 
| status || ENUM("Active", "Pending", "Deleted") || - || False || Record status
 
|-
 
| tenant_id || VARCHAR || 36 || True || ID of record owner
 
|-
 
| recordset_id || CHAR || 32 || False || Non-unique Key, ID of recordset
 
|-
 
| managed_tenant_id || CHAR || 32 || True || ID of managed owner
 
|-
 
| managed_resource_region || VARCHAR || 100 || True || Region of managed
 
|-
 
| managed_extra || VARCHAR || 100 || True || Extra field
 
 
|}
 
|}
==== CNAME_Records Table ====
 
  
 +
==== SRV_Records ====
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
 
! Name !! Data Type !! Length !! Nullable !! Details
 
! Name !! Data Type !! Length !! Nullable !! Details
 
|-
 
|-
| id || CHAR || 32 || False || Primary Key, Generated UUID
+
|id || CHAR || 32 || False || UUID, Unique Key
|-
 
| created_at || DATETIME || - || True || UTC time of creation
 
|-
 
| updated_at || DATETIME || - || True || UTC time of last update
 
|-
 
| version || INTEGER || 11 || False || Designate API version
 
|-
 
| data || MEDIUMTEXT || - || False || The Canonical Name
 
|-
 
| domain_id || CHAR || 32 || False || Non-unique Key, Domain ID
 
|-
 
| managed || TINYINT || 1 || True || Boolean value indicates a managed resource
 
|-
 
| managed_resource_type || VARCHAR || 50 || True || Managed resource type
 
|-
 
| managed_resource_id || CHAR || 32 || True || Managed resource id
 
|-
 
| managed_plugin_name || VARCHAR || 50 || True || Managed plugin name
 
|-
 
| managed_plugin_type || VARCHAR || 50 || True || Managed plugin type
 
|-
 
| hash || VARCHAR || 32 || False || Unique Key, Hash value of record
 
|-
 
| description || VARCHAR || 160 || True || Description of record
 
 
|-
 
|-
| status || ENUM("Active", "Pending", "Deleted") || - || False || Record status
+
|recordset_id || CHAR || 32 || False || Non-unique Key
 
|-
 
|-
| tenant_id || VARCHAR || 36 || True || ID of record owner
+
| target || VARCHAR || 255|| False || Name of the service
 
|-
 
|-
| recordset_id || CHAR || 32 || False || Non-unique Key, ID of recordset
+
| priority || INT || 11 || False || Priority of the service
 
|-
 
|-
| managed_tenant_id || CHAR || 32 || True || ID of managed owner
+
| weight || INT || 11 || False || Weight of the service
 
|-
 
|-
| managed_resource_region || VARCHAR || 100 || True || Region of managed
+
| port || INT || 11 || False || Port of the service
|-
 
| managed_extra || VARCHAR || 100 || True || Extra field
 
 
|}
 
|}
==== TXT_Records Table ====
 
  
 +
==== SSHFP_Records ====
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
 
! Name !! Data Type !! Length !! Nullable !! Details
 
! Name !! Data Type !! Length !! Nullable !! Details
 
|-
 
|-
| id || CHAR || 32 || False || Primary Key, Generated UUID
+
| id || CHAR || 32 || False || UUID, Unique Key
|-
 
| created_at || DATETIME || - || True || UTC time of creation
 
|-
 
| updated_at || DATETIME || - || True || UTC time of last update
 
 
|-
 
|-
| version || INTEGER || 11 || False || Designate API version
+
|recordset_id|| CHAR || 32 || False || Non-unique Key
 
|-
 
|-
| data || MEDIUMTEXT || - || False || Text associated with record
+
| algorithm || TINYINT || 1|| False || 0 reserved; 1 RSA; 2 DSS
 
|-
 
|-
| domain_id || CHAR || 32 || False || Non-unique Key, Domain ID
+
| type ||TINYINT || 1 || False || 0 reserved; 1 SHA-1
 
|-
 
|-
| managed || TINYINT || 1 || True || Boolean value indicates a managed resource
+
| fingerprint || VARCHAR || 255 || False || Fingerprint of the server public key
|-
 
| managed_resource_type || VARCHAR || 50 || True || Managed resource type
 
|-
 
| managed_resource_id || CHAR || 32 || True || Managed resource id
 
|-
 
| managed_plugin_name || VARCHAR || 50 || True || Managed plugin name
 
|-
 
| managed_plugin_type || VARCHAR || 50 || True || Managed plugin type
 
|-
 
| hash || VARCHAR || 32 || False || Unique Key, Hash value of record
 
|-
 
| description || VARCHAR || 160 || True || Description of record
 
|-
 
| status || ENUM("Active", "Pending", "Deleted") || - || False || Record status
 
|-
 
| tenant_id || VARCHAR || 36 || True || ID of record owner
 
|-
 
| recordset_id || CHAR || 32 || False || Non-unique Key, ID of recordset
 
|-
 
| managed_tenant_id || CHAR || 32 || True || ID of managed owner
 
|-
 
| managed_resource_region || VARCHAR || 100 || True || Region of managed
 
|-
 
| managed_extra || VARCHAR || 100 || True || Extra field
 
 
|}
 
|}
==== SRV_Records Table ====
 
  
 +
==== TXT_Records ====
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
 
! Name !! Data Type !! Length !! Nullable !! Details
 
! Name !! Data Type !! Length !! Nullable !! Details
 
|-
 
|-
| id || CHAR || 32 || False || Primary Key, Generated UUID
+
|id || CHAR || 32 || False || UUID, Unique Key
 
|-
 
|-
| created_at || DATETIME || - || True || UTC time of creation
+
|recordset_id || CHAR || 32 || False || Non-unique Key
 
|-
 
|-
| updated_at || DATETIME || - || True || UTC time of last update
+
| text || VARCHAR || 255|| False || Text
|-
 
| version || INTEGER || 11 || False || Designate API version
 
|-
 
| data || MEDIUMTEXT || - || False || Weight, Port, Target
 
|-
 
| priority || INTEGER || 11 || False || Priority of SRV record
 
|-
 
| domain_id || CHAR || 32 || False || Non-unique Key, Domain ID
 
|-
 
| managed || TINYINT || 1 || True || Boolean value indicates a managed resource
 
|-
 
| managed_resource_type || VARCHAR || 50 || True || Managed resource type
 
|-
 
| managed_resource_id || CHAR || 32 || True || Managed resource id
 
|-
 
| managed_plugin_name || VARCHAR || 50 || True || Managed plugin name
 
|-
 
| managed_plugin_type || VARCHAR || 50 || True || Managed plugin type
 
|-
 
| hash || VARCHAR || 32 || False || Unique Key, Hash value of record
 
|-
 
| description || VARCHAR || 160 || True || Description of record
 
|-
 
| status || ENUM("Active", "Pending", "Deleted") || - || False || Record status
 
|-
 
| tenant_id || VARCHAR || 36 || True || ID of record owner
 
|-
 
| recordset_id || CHAR || 32 || False || Non-unique Key, ID of recordset
 
|-
 
| managed_tenant_id || CHAR || 32 || True || ID of managed owner
 
|-
 
| managed_resource_region || VARCHAR || 100 || True || Region of managed
 
|-
 
| managed_extra || VARCHAR || 100 || True || Extra field
 
 
|}
 
|}
 +
 +
== Comments & Discussion ==
 +
# Could someone else verify that the Data Type, Length and Nullable fields are correct in the various records tables?

Latest revision as of 20:19, 24 June 2014

Overview

Gerrit Patch []
Launchpad Blueprint [1]

Currently, there is only one RecordSets table and one Records table for all the different record types. This blueprint proposes to subdivide those tables into a RecordSet table and Record table per record type.

Having one monolithic RecordSets table and Records table for all record types can become problematic as the size of the table grows. If any modifications need to be made, for example, adding a column, the entire table would have to be locked and it could take a long time to update a table with millions of records. In addition, if a table gets too large, it has to be sharded, which involves writing a lot of code to know which shard to call for which records. On the other hand, joins across tables are not a problem, as long as the indexing is done correctly. In addition, having a table per record type is a proven DNS database design as some companies have already implemented it in this fashion and have millions of records.

Most of the information that is currently in the Records table will be consolidated into the RecordSet table. The Records table for each type will only contain the record_id, the recordset_id and the unique data for that particular record type. For instance, the A_Record table will contain the recordset_id and the IPv4 address. The MX_Record table will contain the recordset_id and the FQDN for the mail server and its preference value. See the the tables below for more detail.

Database Schema Changes

The existing Recordset table and Records table will become obsolete and be replaced with new tables for each record type.

Existing Tables

Recordsets Table

Name Data Type Length Nullable Details
id CHAR 32 False UUID, Primary Key
created_at datetime - True Time of creation
updated_at datetime - True Time of last update
version INT 11 False Designate API version
tenant_id VARCHAR 36 True ID of recordset owner
domain_id CHAR 32 False Non-unique Key
name VARCHAR 255 False Recordset name
type ENUM - False A, AAAA, CNAME, MX, SRV, TXT, SPF, NS, PTR, SSHFP
ttl INT 11 True time to live
description VARCHAR 160 True Description of Recordset

Records Table

Name Data Type Length Nullable Details
id CHAR 32 False Primary Key, Generated UUID
created_at DATETIME - True UTC time of creation
updated_at DATETIME - True UTC time of last update
version INTEGER 11 False Designate API version
data MEDIUMTEXT - False Data unique to a specific record
priority INTEGER 11 True Priority value for certain types of records
domain_id CHAR 32 False Non-unique Key, Domain ID
managed TINYINT 1 True Boolean value indicates a managed resource
managed_resource_type VARCHAR 50 True Managed resource type
managed_resource_id CHAR 32 True Managed resource id
managed_plugin_name VARCHAR 50 True Managed plugin name
managed_plugin_type VARCHAR 50 True Managed plugin type
hash VARCHAR 32 False Unique Key, Hash value of record
description VARCHAR 160 True Description of record
status ENUM("Active", "Pending", "Deleted") - False Record status
tenant_id VARCHAR 36 True ID of record owner
recordset_id CHAR 32 False Non-unique Key, ID of recordset
managed_tenant_id CHAR 32 True ID of managed owner
managed_resource_region VARCHAR 100 True Region of managed
managed_extra VARCHAR 100 True Extra field

New Tables

RecordSets

Name Data Type Length Nullable Details
id CHAR 32 False Primary Key, Generated UUID
created_at DATETIME - False UTC time of creation
updated_at DATETIME - True UTC time of last update
version INTEGER 11 False Designate API version
tenant_id CHAR 36 True The tenant_id to which the record belongs
domain_id CHAR 32 False Non-Unique Key; the domain_id to which the record belongs
name VARCHAR 255 False The zone to which the A record belongs
ttl INTEGER 11 True The time-to-live assigned to the record
description VARCHAR 160 True A description of the record
status ENUM 'Active', 'Pending', 'Deleted' False Current status of RecordSet
hash VARCHAR 32 False Unique Key
managed TINYINT 1 True Indicates whether it is managed or not
managed_resource_type VARCHAR 50 True
managed_resource_id CHAR 32 True
managed_plugin_name VARCHAR 50 True
managed_plugin_type VARCHAR 50 True
managed_tenant_id VARCHAR 36 True
managed_resource_region VARCHAR 100 True
managed_extra VARCHAR 100 True

A_Records

Name Data Type Length Nullable Details
id CHAR 32 False UUID, Unique Key
recordset_id CHAR 32 False Non-unique Key
address VARCHAR 15 False iPv4

AAAA_Records

Name Data Type Length Nullable Details
id CHAR 32 False UUID, Unique Key
recordset_id CHAR 32 False Non-unique Key
address BINARY 16 False iPv6 address

CNAME_Records

Name Data Type Length Nullable Details
id CHAR 32 False UUID, Unique Key
recordset_id CHAR 32 False Non-unique Key
cname VARCHAR 255 False CNAME

MX_Records

Name Data Type Length Nullable Details
id CHAR 32 False UUID, Unique Key
recordset_id CHAR 32 False Non-unique Key
exchange VARCHAR 255 False Hostname
preference INT 11 False Lowest number has highest priority

NS_Records

Name Data Type Length Nullable Details
id CHAR 32 False UUID, Unique Key
recordset_id CHAR 32 False Non-unique Key
nsdname VARCHAR 255 False Hostname

PTR_Records

Name Data Type Length Nullable Details
id CHAR 32 False UUID, Unique Key
recordset_id CHAR 32 False Non-unique Key
ptrdname VARCHAR 255 False Hostname

SOA_Records

Name Data Type Length Nullable Details
id CHAR 32 False UUID, Unique Key
recordset_id CHAR 32 False Non-unique Key
mname VARCHAR 255 False Primary name server
rname VARCHAR 255 False Domain name that indicates the email address
serial INT 11 False Serial number
refresh INT 11 False Number of seconds between data refresh
retry INT 11 False Number of seconds between retries
expire INT 11 False Number of seconds before information is no longer considered authoritative
minimum INT 11 False Number of seconds that the records in the zone are valid

SPF_Records

Name Data Type Length Nullable Details
id CHAR 32 False UUID, Unique Key
recordset_id CHAR 32 False Non-unique Key
text VARCHAR 255 False Authorized computers to send mail

SRV_Records

Name Data Type Length Nullable Details
id CHAR 32 False UUID, Unique Key
recordset_id CHAR 32 False Non-unique Key
target VARCHAR 255 False Name of the service
priority INT 11 False Priority of the service
weight INT 11 False Weight of the service
port INT 11 False Port of the service

SSHFP_Records

Name Data Type Length Nullable Details
id CHAR 32 False UUID, Unique Key
recordset_id CHAR 32 False Non-unique Key
algorithm TINYINT 1 False 0 reserved; 1 RSA; 2 DSS
type TINYINT 1 False 0 reserved; 1 SHA-1
fingerprint VARCHAR 255 False Fingerprint of the server public key

TXT_Records

Name Data Type Length Nullable Details
id CHAR 32 False UUID, Unique Key
recordset_id CHAR 32 False Non-unique Key
text VARCHAR 255 False Text

Comments & Discussion

  1. Could someone else verify that the Data Type, Length and Nullable fields are correct in the various records tables?