aboutsummaryrefslogtreecommitdiff
path: root/data/db.struct
diff options
context:
space:
mode:
Diffstat (limited to 'data/db.struct')
-rw-r--r--data/db.struct283
1 files changed, 249 insertions, 34 deletions
diff --git a/data/db.struct b/data/db.struct
index 7db7828..c4d6460 100644
--- a/data/db.struct
+++ b/data/db.struct
@@ -1,19 +1,19 @@
-# This file is part of Ellinika
-# Copyright (C) 2004, 2005, 2007 Sergey Poznyakoff
-#
-# Ellinika is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ellinika is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
+-- This file is part of Ellinika
+-- Copyright (C) 2004, 2005, 2007 Sergey Poznyakoff
+--
+-- Ellinika is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- Ellinika is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+--
set names utf8;
CREATE DATABASE ellinika CHARACTER SET utf8 COLLATE utf8_bin;
@@ -21,7 +21,7 @@ CREATE DATABASE ellinika CHARACTER SET utf8 COLLATE utf8_bin;
use ellinika;
CREATE TABLE pos(
- id bigint not null, # REL 0
+ id bigint not null, -- REL 0
name char(64) not null ,
abbr char(12) not null,
abbr_lat char(12) not null,
@@ -66,17 +66,17 @@ INSERT INTO pos VALUES(conv("1000000",16,10), "πρόθεση", "πρόθ.
INSERT INTO pos VALUES(conv("2000000",16,10), "σύνδεσμος", "σύνδ.", "conj", 'Y');
CREATE TABLE dict(
- ident int(32), # REL 1,3,4
- word varchar(128), # REL 6
+ ident int(32), -- REL 1,3,4
+ word varchar(128), -- REL 6
sound varchar(128),
- pos int(4), # REL 0
+ pos int(4), -- REL 0
forms blob,
INDEX (ident),
INDEX (word)
);
CREATE TABLE locus(
- ident int(32), # REL 4
+ ident int(32), -- REL 4
lang varchar(8) not null,
file varchar(128) binary,
line int(32),
@@ -85,7 +85,7 @@ CREATE TABLE locus(
);
CREATE TABLE articles(
- ident int(32) not null, # REL 1
+ ident int(32) not null, -- REL 1
subindex int(32) not null,
lang varchar(8),
meaning blob,
@@ -95,10 +95,10 @@ CREATE TABLE articles(
);
CREATE TABLE topic(
- ident int(32) not null auto_increment, # REL 2
+ ident int(32) not null auto_increment, -- REL 2
lang varchar(8) not null,
title varchar(128) not null,
- category int(32) not null, # REL 5
+ category int(32) not null, -- REL 5
UNIQUE (ident),
INDEX (title),
INDEX (title,category),
@@ -106,14 +106,14 @@ CREATE TABLE topic(
);
CREATE TABLE topic_tab (
- topic_ident int(32) not null, # REL 2
- word_ident int(32) not null, # REL 1
+ topic_ident int(32) not null, -- REL 2
+ word_ident int(32) not null, -- REL 1
INDEX (topic_ident),
INDEX (word_ident)
);
CREATE TABLE category (
- category int(32) not null auto_increment, # REL 5
+ category int(32) not null auto_increment, -- REL 5
lang varchar(8) not null,
title varchar(128) not null,
description blob,
@@ -123,8 +123,8 @@ CREATE TABLE category (
CREATE TABLE links(
type enum('XREF','ANT') not null,
- ident int(32) not null, # REL 1
- xref int(32) not null, # REL 1
+ ident int(32) not null, -- REL 1
+ xref int(32) not null, -- REL 1
INDEX (ident),
UNIQUE (ident,xref)
);
@@ -138,23 +138,238 @@ CREATE TABLE stat(
CREATE TABLE pending_links(
type enum('CLOSED','XREF','ANT') not null,
- originator int(32) not null, # REL 3
- word varchar(128) # REL 6
+ originator int(32) not null, -- REL 3
+ word varchar(128) -- REL 6
);
CREATE TABLE news(
- ident int(32) not null auto_increment, # REL 7
+ ident int(32) not null auto_increment, -- REL 7
date datetime not null,
UNIQUE(ident),
INDEX(date)
);
CREATE TABLE newsart(
- ident int(32) not null, # REL 7
+ ident int(32) not null, -- REL 7
lang varchar(8),
header varchar(255),
text blob,
UNIQUE(ident),
INDEX(lang)
);
-
+
+----
+
+CREATE TABLE verbflect(
+ ident int(32) not null, -- REL 8
+ sing1 varchar(32),
+ sing2 varchar(32),
+ sing3 varchar(32),
+ plur1 varchar(32),
+ plur2 varchar(32),
+ plur3 varchar(32),
+ UNIQUE(ident)
+);
+
+CREATE TABLE conjugation(
+ conj char(2), -- REL 9
+ voice enum('act','pas'), -- Ενεργητηκή/Μεσοπαθητική
+ mode enum('ind','sub','imp'),
+ tense varchar(128),
+ thema enum('pres','aor','pass','synt'), -- Ενεστώτα, Αόριστου, Αόριστου μεσοπαθητικής, syntethic
+ suffix char(32),
+ flect int(32), -- REL 8
+ accmap char(7), -- accent map
+ particle char(2), -- NULL/θα/να
+ aux varchar(128), -- REL 10
+ auxtense char(32),
+ KEY (conj),
+ KEY (voice),
+ KEY (mode)
+);
+
+CREATE TABLE participle (
+ conj char(2), -- REL 9
+ voice enum('act','pas'), -- Ενεργητηκή/Μεσοπαθητική
+ tense char(32),
+ thema enum('pres','aor','pass'), -- Ενεστώτα, Αόριστου, Αόριστου μεσοπαθητικής
+ suffix char(32),
+ flect char(32),
+ aux varchar(128)
+);
+
+INSERT INTO verbflect VALUES
+-- Συζυγία Α'
+(1, "ω", "εις", "ει", "ουμε", "ετε", "ουν(ε)"),
+(2, "α", "ες", "ε", "αμε", "ατε", "αν"),
+(8, NULL, "ε", NULL, NULL, "ετε", NULL),
+(9, NULL, "ε", NULL, NULL, "τε", NULL),
+(11, "ομαι", "εσαι", "εται", "όμαστε", "εστε", "ονται"),
+(12, "όμουν", "όσουν", "όταν", "όμαστε", "όμαστε", "ονταν"),
+(15, "ώ", "είς", "εί", "ούμε", "είτε", "ούν(ε)"),
+(17, NULL, "ου", NULL, NULL, NULL, NULL),
+(18, NULL, NULL, NULL, NULL, "είτε", NULL),
+-- Συζυγία Β΄ - α΄ τάξη
+(20, "ώ,άω", "άς", "ά,άει","άμε,ούμε","άτε","ούν(ε)"),
+(25, NULL, "α", NULL, NULL, "άτε", NULL),
+(28, "ιέμαι", "ιέσαι", "ιέται", "ιόμαστε", "ιέστε", "ιούνται"),
+(29, "ιόμουν", "ιόσουν", "ιόταν", "ιόμαστε", "ιόσαστε", "ιόνταν"),
+(30, NULL, "ιέσαι", NULL, NULL, "ιέσται", NULL),
+(31, NULL, "ου", NULL, NULL, NULL, NULL),
+(32, NULL, NULL, NULL, NULL, "είτε", NULL),
+-- Συζυγία Β΄ - β΄ τάξη
+(33, NULL, "είς", NULL, NULL, "είτε", NULL),
+(34, "ούμαι", "είσαι", "είται", "ούμαστε", "είστε", "ούνται"),
+(35, "ούμουν", "ούσουν", "ούvταν", "ούμαστε", "ούσαστε", "ούνταν"),
+(36, NULL, "είσαι", NULL, NULL, "είστε", NULL);
+
+
+INSERT INTO conjugation VALUES
+-- Συζυγία Α'
+-- Ενεργητηκή φωνή
+-- Οριστική
+("A", "act", "ind", "Ενεστώτας", 'pres', NULL, 1, "000000", NULL, NULL, NULL),
+("A", "act", "ind", "Παρατατικός", 'pres', NULL, 2, "333333+", NULL, NULL, NULL),
+("A", "act", "ind", "Μέλλοντας διαρκείας", 'pres', NULL, 1, "000000", "θα", NULL, NULL),
+("A", "act", "ind", "Αόριστος", 'aor', NULL, 2, "333333+", NULL, NULL, NULL),
+("A", "act", "ind", "Παρακείμενος", 'synt', NULL, 0, NULL, NULL, "έχω", "Ενεστώτας"),
+("A", "act", "ind", "Υπερσυντέλικος", 'synt', NULL, 0, NULL, NULL, "έχω", "Παρατατικός"),
+("A", "act", "ind", "Συντελεσμένος μέλλοντας", 'synt', NULL, 0, NULL, "θα", "έχω", "Ενεστώτας"),
+("A", "act", "ind", "Μέλλοντας στιγμιαίος", 'aor', NULL, 1, "000000", "θα", NULL, NULL),
+-- Υποτακτική
+("A", "act", "sub", "Ενεστώτας", 'pres', NULL, 1, "000000", "να", NULL, NULL),
+("A", "act", "sub", "Αόριστος", 'aor', NULL, 1, "000000", "να", NULL, NULL),
+("A", "act", "sub", "Παρακείμενος", 'synt', NULL, 0, NULL, "να", "έχω", "Ενεστώτας"),
+-- Προστακτική
+("A", "act", "imp", "Ενεστώτας", 'pres', NULL, 8, "-3--3-", NULL, NULL, NULL),
+("A", "act", "imp", "Αόριστος", 'aor', NULL, 9, "-0--0-", NULL, NULL, NULL),
+("A", "act", "imp", "Παρακείμενος", 'synt', NULL, 0, NULL, "να", "έχω", "Ενεστώτας"),
+-- Μεσοπαθητική φωνή
+-- Οριστική
+("A", "pas", "ind", "Ενεστώτας", 'pres', NULL, 11, "000300", NULL, NULL, NULL),
+("A", "pas", "ind", "Παρατατικός", 'pres', NULL, 12, "222333", NULL, NULL, NULL),
+("A", "pas", "ind", "Μέλλοντας διαρκείας", 'pres', NULL, 11, "333333", "θα", NULL, NULL),
+("A", "pas", "ind", "Αόριστος", 'pass', "ηκ", 2, "333333", NULL, NULL, NULL),
+("A", "pas", "ind", "Παρακείμενος", 'synt', NULL, 0, NULL, NULL, "έχω", "Ενεστώτας"),
+("A", "pas", "ind", "Υπερσυντέλικος", 'synt', NULL, 0, NULL, NULL, "έχω", "Παρατατικός"),
+("A", "pas", "ind", "Συντελεσμένος μέλλοντας", 'synt', NULL, 0, NULL, "θα", "έχω", "Ενεστώτας"),
+("A", "pas", "ind", "Μέλλοντας στιγμιαίος", 'pass', NULL, 15, "111111", "θα", NULL, NULL),
+-- Υποτακτική
+("A", "pas", "sub", "Ενεστώτας", 'pres', NULL, 11, "333333", "να", NULL, NULL),
+("A", "pas", "sub", "Αόριστος", 'pass', NULL, 15, "111221", "να", NULL, NULL),
+("A", "pas", "sub", "Παρακείμενος", 'synt', NULL, 0, NULL, "να", "έχω", "Παρατατικός"),
+-- Προστακτική
+("A", "pas", "imp", "Ενεστώτας", 'pres', NULL, 11, "-3--3-", "να", NULL, NULL),
+("A", "pas", "imp", "Αόριστος", 'aor', NULL, 17, "-0----", NULL, NULL, NULL),
+("A", "pas", "imp", "Αόριστος", 'pass', NULL, 18, "----2-", NULL, NULL, NULL),
+("A", "pas", "imp", "Παρακείμενος", 'synt', NULL, 0, NULL, "να", "έχω", "Παρατατικός"),
+-- Συζυγία Β΄ - α΄ τάξη
+-- Ενεργητηκή φωνή
+-- Οριστική
+("B1", "act", "ind", "Ενεστώτας", 'pres', NULL, 20, "ffffff", NULL, NULL, NULL),
+("B1", "act", "ind", "Παρατατικός", 'pres', "ούς", 2, "ssssss", NULL, NULL, NULL),
+("B1", "act", "ind", "Μέλλοντας διαρκείας", 'pres', NULL, 20, "ffffff", "θα", NULL, NULL),
+("B1", "act", "ind", "Αόριστος", 'aor', "ησ", 2, "333333", NULL, NULL, NULL),
+("B1", "act", "ind", "Παρακείμενος", 'synt', NULL, 0, NULL, NULL, "έχω", "Ενεστώτας"),
+("B1", "act", "ind", "Υπερσυντέλικος", 'synt', NULL, 0, NULL, NULL, "έχω", "Παρατατικός"),
+("B1", "act", "ind", "Συντελεσμένος μέλλοντας", 'synt', NULL, 0, NULL, "θα", "έχω", "Ενεστώτας"),
+("B1", "act", "ind", "Μέλλοντας στιγμιαίος", 'aor', "ήσ", 1, "ssssss", "θα", NULL, NULL),
+-- Υποτακτική
+("B1", "act", "sub", "Ενεστώτας", 'pres', NULL, 20, "ffffff", "να", NULL, NULL),
+("B1", "act", "sub", "Αόριστος", 'aor', "ήσ", 1, "ssssss", "να", NULL, NULL),
+("B1", "act", "sub", "Παρακείμενος", 'synt', NULL, 0, NULL, "να", "έχω", "Ενεστώτας"),
+-- Προστακτική
+("B1", "act", "imp", "Ενεστώτας", 'pres', NULL, 25, "-0--2-", NULL, NULL, NULL),
+("B1", "act", "imp", "Αόριστος", 'aor', "ησ", 9, "-3--3-", NULL, NULL, NULL),
+("B1", "act", "imp", "Παρακείμενος", 'synt', NULL, 0, NULL, "να", "έχω", "Ενεστώτας"),
+-- Μεσοπαθητική φωνή
+-- Οριστική
+("B1", "pas", "ind", "Ενεστώτας", 'pres', NULL, 28, "ffffff", NULL, NULL, NULL),
+("B1", "pas", "ind", "Παρατατικός", 'pres', NULL, 29, "ffffff", NULL, NULL, NULL),
+("B1", "pas", "ind", "Μέλλοντας διαρκείας", 'pres', NULL, 28, "ffffff", "θα", NULL, NULL),
+("B1", "pas", "ind", "Αόριστος", 'pass', "ηκ", 2, "333333", NULL, NULL, NULL),
+("B1", "pas", "ind", "Παρακείμενος", 'synt', NULL, 0, NULL, NULL, "έχω", "Ενεστώτας"),
+("B1", "pas", "ind", "Υπερσυντέλικος", 'synt', NULL, 0, NULL, NULL, "έχω", "Παρατατικός"),
+("B1", "pas", "ind", "Συντελεσμένος μέλλοντας", 'synt', NULL, 0, NULL, "θα", "έχω", "Ενεστώτας"),
+("B1", "pas", "ind", "Μέλλοντας στιγμιαίος", 'pass', NULL, 15, "ffffff", "θα", NULL, NULL),
+-- Υποτακτική
+("B1", "pas", "sub", "Ενεστώτας", 'pres', NULL, 28, "ffffff", "να", NULL, NULL),
+("B1", "pas", "sub", "Αόριστος", 'pass', NULL, 15, "ffffff", "να", NULL, NULL),
+("B1", "pas", "sub", "Παρακείμενος", 'synt', NULL, 0, NULL, "να", "έχω", "Παρατατικός"),
+-- Προστακτική
+("B1", "pas", "imp", "Ενεστώτας", 'pres', NULL, 30, "-f--f-", "να", NULL, NULL),
+
+("B1", "pas", "imp", "Αόριστος", 'aor', NULL, 31, "-2----", NULL, NULL, NULL),
+("B1", "pas", "imp", "Αόριστος", 'pass', NULL, 32, "----2-", NULL, NULL, NULL),
+
+("B1", "pas", "imp", "Παρακείμενος", 'synt', NULL, 0, NULL, "να", "έχω", "Παρατατικός"),
+-- Συζυγία Β΄ - β΄ τάξη
+-- Ενεργητηκή φωνή
+-- Οριστική
+("B2", "act", "ind", "Ενεστώτας", 'pres', NULL, 15, "ffffff", NULL, NULL, NULL),
+("B2", "act", "ind", "Παρατατικός", 'pres', "ούσ", 2, "ssssss", NULL, NULL, NULL),
+("B2", "act", "ind", "Μέλλοντας διαρκείας", 'pres', NULL, 15, "ffffff", "θα", NULL, NULL),
+("B2", "act", "ind", "Αόριστος", 'aor', "ησ", 2, "333333", NULL, NULL, NULL),
+("B2", "act", "ind", "Παρακείμενος", 'synt', NULL, 0, NULL, NULL, "έχω", "Ενεστώτας"),
+("B2", "act", "ind", "Υπερσυντέλικος", 'synt', NULL, 0, NULL, NULL, "έχω", "Παρατατικός"),
+("B2", "act", "ind", "Συντελεσμένος μέλλοντας", 'synt', NULL, 0, NULL, "θα", "έχω", "Ενεστώτας"),
+("B2", "act", "ind", "Μέλλοντας στιγμιαίος", 'aor', "ήσ", 1, "ssssss", "θα", NULL, NULL),
+-- Υποτακτική
+("B2", "act", "sub", "Ενεστώτας", 'pres', NULL, 15, "ffffff", "να", NULL, NULL),
+("B2", "act", "sub", "Αόριστος", 'aor', "ήσ", 1, "ssssss", "να", NULL, NULL),
+("B2", "act", "sub", "Παρακείμενος", 'synt', NULL, 0, NULL, "να", "έχω", "Ενεστώτας"),
+-- Προστακτική
+("B2", "act", "imp", "Ενεστώτας", 'pres', NULL, 15, "-f----", "να", NULL, NULL),
+("B2", "act", "imp", "Ενεστώτας", 'pres', NULL, 15, "----f-", NULL, NULL, NULL),
+
+("B2", "act", "imp", "Αόριστος", 'aor', "ησ", 9, "-3--3-", NULL, NULL, NULL),
+("B2", "act", "imp", "Παρακείμενος", 'synt', NULL, 0, NULL, "να", "έχω", "Ενεστώτας"),
+-- Μεσοπαθητική φωνή
+-- Οριστική
+("B2", "pas", "ind", "Ενεστώτας", 'pres', NULL, 34, "ffffff", NULL, NULL, NULL),
+("B2", "pas", "ind", "Παρατατικός", 'pres', NULL, 35, "ffffff", NULL, NULL, NULL),
+("B2", "pas", "ind", "Μέλλοντας διαρκείας", 'pres', NULL, 34, "ffffff", "θα", NULL, NULL),
+("B2", "pas", "ind", "Αόριστος", 'pass', "ηκ", 2, "333333", NULL, NULL, NULL),
+("B2", "pas", "ind", "Παρακείμενος", 'synt', NULL, 0, NULL, NULL, "έχω", "Ενεστώτας"),
+("B2", "pas", "ind", "Υπερσυντέλικος", 'synt', NULL, 0, NULL, NULL, "έχω", "Παρατατικός"),
+("B2", "pas", "ind", "Συντελεσμένος μέλλοντας", 'synt', NULL, 0, NULL, "θα", "έχω", "Ενεστώτας"),
+("B2", "pas", "ind", "Μέλλοντας στιγμιαίος", 'pass', NULL, 15, "ffffff", "θα", NULL, NULL),
+-- Υποτακτική
+("B2", "pas", "sub", "Ενεστώτας", 'pres', NULL, 34, "ffffff", "να", NULL, NULL),
+("B2", "pas", "sub", "Αόριστος", 'pass', NULL, 15, "ffffff", "να", NULL, NULL),
+("B2", "pas", "sub", "Παρακείμενος", 'synt', NULL, 0, NULL, "να", "έχω", "Παρατατικός"),
+-- Προστακτική
+("B2", "pas", "imp", "Ενεστώτας", 'pres', NULL, 36, "-f--f-", "να", NULL, NULL),
+
+("B2", "pas", "imp", "Αόριστος", 'aor', NULL, 31, "-2----", NULL, NULL, NULL),
+("B2", "pas", "imp", "Αόριστος", 'pass', NULL, 32, "----2-", NULL, NULL, NULL),
+
+("B2", "pas", "imp", "Παρακείμενος", 'synt', NULL, 0, NULL, "να", "έχω", "Παρατατικός");
+
+INSERT INTO participle VALUES
+-- Συζυγία Α'
+-- Ενεργητηκή φωνή
+("A", "act", "Ενεστώτας", 'pres', NULL, "οντας", NULL),
+("A", "act", "Παρακείμενος", 'aor', NULL, "ει", "εχοντας"),
+-- Μεσοπαθητική φωνή
+("A", "pas", "Παρακείμενος", 'root', NULL, "μένος", NULL),
+-- Συζυγία Β΄ - α΄ τάξη
+-- Ενεργητηκή φωνή
+("B1", "act", "Ενεστώτας", 'pres', NULL, "ώντας", NULL),
+("B1", "act", "Παρακείμενος", 'aor', NULL, "ήσει", "εχοντας"),
+-- Μεσοπαθητική φωνή
+("B1", "pass", "Παρακείμενος", 'pres', "η", "μένος", NULL),
+-- Συζυγία Β΄ - β΄ τάξη
+-- Ενεργητηκή φωνή
+("B2", "act", "Ενεστώτας", 'pres', NULL, "ώντας", NULL),
+("B2", "act", "Παρακείμενος", 'aor', NULL, "ει", "εχοντας"),
+-- Μεσοπαθητική φωνή
+("B1", "pass", "Παρακείμενος", 'pres', "η", "μένος", NULL);
+
+CREATE TABLE verb(
+ word varchar(128), -- REL 10
+ conj char(2), -- REL 9
+ present varchar(128), -- θέμα ενεστώτα
+ aorist varchar(128), -- θέμα αόριστου
+ pass varchar(128) -- θέμα αόριστου μεσοπαθητικής
+); \ No newline at end of file

Return to:

Send suggestions and report system problems to the System administrator.