ER della Consultazione Certificata




SQL delle tabelle:

POLLS

CREATE TABLE IF NOT EXISTS `polls` (
`id` int(10) unsigned NOT NULL auto_increment,
`title` varchar(255) collate latin1_general_ci NOT NULL,
`description` text collate latin1_general_ci NOT NULL,
`status` tinyint(3) unsigned NOT NULL,
`start` datetime NOT NULL,
`end` datetime NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
`registrar` varchar(255) collate latin1_general_ci NOT NULL,
`forwarder` varchar(255) collate latin1_general_ci NOT NULL,
`collector` varchar(255) collate latin1_general_ci NOT NULL,
`manifest_url` varchar(255) collate latin1_general_ci NOT NULL,
`repository_id` int(10) unsigned NOT NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;


QUESTIONS - Raccoglie l'insieme delle domande e il riferimento allo specifico strumento a cui appartengono.

CREATE TABLE IF NOT EXISTS `questions` (
`id` int(10) unsigned NOT NULL auto_increment,
`title` varchar(255) collate latin1_general_ci NOT NULL,
`description` text collate latin1_general_ci NOT NULL,
`type` varchar(45) collate latin1_general_ci NOT NULL,
`data` text collate latin1_general_ci NOT NULL,
`weight` tinyint(3) unsigned NOT NULL,
`poll_id` int(10) unsigned NOT NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;


QUESTION ITEMS

CREATE TABLE IF NOT EXISTS `question_items` (
`id` int(10) unsigned NOT NULL auto_increment,
`title` varchar(255) collate latin1_general_ci NOT NULL,
`weight` tinyint(3) unsigned NOT NULL,
`question_id` int(10) unsigned NOT NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;


USERS vedi modello generale



indietro - avanti