Skip to content

Instantly share code, notes, and snippets.

@Noleli
Created June 8, 2012 20:23
Show Gist options
  • Save Noleli/2897965 to your computer and use it in GitHub Desktop.
Save Noleli/2897965 to your computer and use it in GitHub Desktop.
Untangld database schema
CREATE TABLE `entities` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`type` enum('PERSON','PLACE','BUSINESS','MUNICIPALITY') DEFAULT NULL,
`name` varchar(64) DEFAULT NULL,
`timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`url` varchar(256) DEFAULT NULL,
`prevurl` varchar(256) DEFAULT NULL,
`notes` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
CREATE TABLE `relationships` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`fromID` int(11) DEFAULT NULL,
`to` int(11) DEFAULT NULL,
`type` varchar(64) DEFAULT NULL,
`start` date DEFAULT NULL,
`end` date DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment