-
Notifications
You must be signed in to change notification settings - Fork 0
Database Standards
Justin Campo edited this page Oct 24, 2015
·
1 revision
`id` int(11) NOT NULL AUTO_INCREMENT,
`sort` int(11) DEFAULT NULL,
`edited` datetime DEFAULT NULL, //ON UPDATE CURRENT_TIMESTAMP
`created` datetime DEFAULT NULL,
PRIMARY UNIQUE KEY (`id`),
`table1_id` int(11) NOT NULL,
`table2_id` int(11) NOT NULL,
KEY `table1_id` (`table1_id`),
KEY `table2_id` (`table2_id`)
##Database
- All table names are singular
- All table names and fields are underscore case
- All Acronyms should be lower case
- All foreign indexes should be directly after native table id
- Link tables are indicated by two tables names joined appended by join offer_promo_join
- All temp tables should end with with _temp (and should be deleted as soon as they are not needed)
- All back up tables should end with _backup (and should be deleted as soon as they are not needed)
- All swap tables should end with _swap (and should be deleted as soon as they are not needed)
##Database Preferred Terminology
- Status (not Active etc.)
- Title (not Name, Label etc.)
- Sort (not Index etc.)