Synonyms database

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
spamyboy
Forum Contributor
Posts: 266
Joined: Sun Nov 06, 2005 11:29 am
Location: Lithuania, vilnius

Synonyms database

Post by spamyboy »

I am creating online synonyms dictionary, something like synonyms.net just in my language, and before starting to gather data into database, I would like to ensure my self that I haven't left any not logical mistakes in database structure, that could possibly harm project in anyway latter.

If anyone has ever done anything like that, any tips or advices would be appreciated.

Here is preview how does the structure of the database looks now.

Code: Select all

CREATE TABLE IF NOT EXISTS `dictionary` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `word` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `word` (`word`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
CREATE TABLE IF NOT EXISTS `synonyms` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `word` int(10) NOT NULL,
  `synonym` varchar(50) NOT NULL,
  `meaning` int(10) NOT NULL DEFAULT '1',
  `quodvide` enum('0','1') NOT NULL DEFAULT '0',
  `rarity` enum('0','1') NOT NULL DEFAULT '0',
  `spokenlanguage` enum('0','1') NOT NULL DEFAULT '0',
  `vernacularism` enum('0','1') NOT NULL DEFAULT '0',
  `normally` enum('0','1') NOT NULL DEFAULT '0',
  `obsolete` enum('0','1') NOT NULL DEFAULT '0',
  `barbarism` enum('0','1') NOT NULL DEFAULT '0',
  `special` enum('0','1') NOT NULL DEFAULT '0',
  `figuratively` enum('0','1') NOT NULL DEFAULT '0',
  `pejorative` enum('0','1') NOT NULL DEFAULT '0',
  `opprobrious` enum('0','1') NOT NULL DEFAULT '0',
  `abbreviation` enum('0','1') NOT NULL DEFAULT '0',
  `bookish` enum('0','1') NOT NULL DEFAULT '0',
  `simile` enum('0','1') NOT NULL DEFAULT '0',
  `childishly` enum('0','1') NOT NULL DEFAULT '0',
  `vulgarism` enum('0','1') NOT NULL DEFAULT '0',
  `momentary` enum('0','1') NOT NULL DEFAULT '0',
  `hypocoristic` enum('0','1') NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `word` (`word`,`synonym`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Post Reply