Databases Reference
In-Depth Information
'author_id' int(11) NOT NULL,
'author_name' varchar(30) NOT NULL,
'phone' varchar(30) default NULL,
PRIMARY KEY ('author_id')
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table 'authors'
--
INSERT INTO 'authors' ('author_id', 'author_name', 'phone') VALUES (1,
'John Smith', '+01 445-789-1234');
INSERT INTO 'authors' ('author_id', 'author_name', 'phone') VALUES (2,
'Maria Sunshine', '333-3333');
-- --------------------------------------------------------
--
-- Table structure for table 'topics'
--
CREATE TABLE 'topics' (
'isbn' varchar(25) NOT NULL,
'title' varchar(100) NOT NULL,
'page_count' int(11) NOT NULL,
'author_id' int(11) NOT NULL,
'language' char(2) NOT NULL default 'en',
'description' text NOT NULL,
'cover_photo' blob NOT NULL,
'genre' set('Fantasy','Child','Novel') NOT NULL default 'Fantasy',
'date_published' datetime NOT NULL,
'stamp' timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_
TIMESTAMP,
PRIMARY KEY ('isbn'),
KEY 'by_title' ('title'(30)),
KEY 'author_id' ('author_id','language'),
FULLTEXT KEY 'description' ('description')
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table 'topics'
--
INSERT INTO 'books' ('isbn', 'title', 'page_count', 'author_id',
'language', 'description', 'cover_photo', 'genre', 'date_published',
'stamp') VALUES ('1-234567-89-0', 'A hundred years of cinema (volume 1)',
600, 1, 'en', '', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
 
Search WWH ::




Custom Search