This is the master table for all entity types. All entities must have a unique entity_id stored in this table. All entity_* tables reference this table's ID numbers as foreign keys. Deleting an entity from this table cascades a delete from other entity_* tables as well.
...
Table CreationDROP TABLE IF EXISTS `entities`;
CREATE TABLE entities (
`entity_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`type` varchar(255) DEFAULT NULL,
`created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Fieldsfield type attributes notes example entity_id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT Provided by Pellucid 12345678901234567890 type varchar(255) DEFAULT NULL The type of hospital, found in hospital data 'hospital' created timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' The date and time the row was created '2010-05-18 09:15:36' modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' The date and time the row was last updated. Can be set to current using UPDATE CURRENT_TIMESTAMP '2010-05-18 09:15:36'
PRIMARY KEY (`entity_id`)
Links to entity_hospitals, entity_ascs, entity_geographies, entity_values, and entity_calculations
CREATE TABLE entities (
`entity_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`type` varchar(255) DEFAULT NULL,
`created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
field | type | attributes | notes | example |
---|---|---|---|---|
entity_id | bigint(20) | UNSIGNED NOT NULL AUTO_INCREMENT | Provided by Pellucid | 12345678901234567890 |
type | varchar(255) | DEFAULT NULL | The type of hospital, found in hospital data | 'hospital' |
created | timestamp | NOT NULL DEFAULT '0000-00-00 00:00:00' | The date and time the row was created | '2010-05-18 09:15:36' |
modified | timestamp | NOT NULL DEFAULT '0000-00-00 00:00:00' | The date and time the row was last updated. Can be set to current using UPDATE CURRENT_TIMESTAMP | '2010-05-18 09:15:36' |
PRIMARY KEY (`entity_id`)
Links to entity_hospitals, entity_ascs, entity_geographies, entity_values, and entity_calculations