On Github duybuivn / jmp
* Meta-Table
tableID | TableName
--------------------------------------
1 | LearningOpportunity
2 | JobVacancy
3 | LWCArticle
4 | author
5 | LFMArticle
6 | LearningInstitution
7 | Job
8 | Language
9 | Skill
10 | Tag
* Meta-Column
ColID | ColName | TableID
------------------------------------------------------
1 | JobID | 7
2 | JobTitle | 7
3 | JobDescription | 7
4 | LanguageID | 8
5 | Language_Name | 8
* Meta-Row
RowID | RowType | ColID | TableID | Row Content
---------|--------------|------------|--------------------------------------
1 | Varchar | 2 | 7 | Java Developer
2 | Varchar | 2 | 7 | Software Engineer
3 | Varchar | 5 | 8 | Khmer
*Meta-document
DocumentID | Documents Content | RowID
--------------------------------------------------------
1 | Java Developer at CSC Vietnam | 1
2 | Software Engineer in 3 year | 2
3 | Software Engineer and speak Khmer | 23
*Meta-store
DocunementID | ColID | TableID | RowID
-------------------------------------------------------
1 | 2 | 2 | 1
2 | 2 | 2 | 2
3 | 25 | 24 | 23
*Folder
FolderID | FolderName
_____________________
7 | Job
8 | Skill
9 | Language
CREATE TABLE `document` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(200) DEFAULT NULL,
`body` text,
PRIMARY KEY (`id`),
FULLTEXT KEY `title` (`title`,`body`)
) ENGINE=MyISAM;
INSERT INTO `document` VALUES
(1,'Database Admin','using MySQL query to manage System ...'),
(2,'Experience Database','Five years experience in ...'),
(3,'Description','I am admin of CSC Vietnam ...'),
(4,'Language','1. Mother tongue: Vietnamese, 2. Frequency in English ...'),
(5,'Database Tools','using MySQL Workbench, MySQL GUI Tools ...'),
(6,'Database Security','When configured properly, Database ...');
;
+----+--------------------+----------------------------------------------------------+
| id | title | body |
+----+--------------------+----------------------------------------------------------+
| 1 | Database Admin | using MySQL query to manage System ... |
| 2 | Experience Database| Five years experience in ... |
| 3 | Description | I am admin of CSC Vietnam ... |
| 4 | Language | 1. Mother tongue: Vietnamese, 2. Frequency in English ...|
| 5 | Database Tools | using MySQL Workbench, MySQL GUI Tools ... |
| 6 | Database Security | uWhen configured properly, Database ... |
+----+--------------------+----------------------------------------------------------+
mysql> select * from document WHERE MATCH(title,body) AGAINST ('MySQL');
+----+--------------------+-------------------------------------------------+
| id | title | body |
+----+--------------------+-------------------------------------------------+
| 5 | Database Tools | using MySQL Workbench, MySQL GUI Tools ... |
| 1 | Database Admin | using MySQL query to manage System ...' |
+----+--------------------+-------------------------------------------------+
2 rows in set (0.01 sec)
+----+--------------------+----------------------------------------------------------+
| id | title | body |
+----+--------------------+----------------------------------------------------------+
| 1 | Database Admin | using MySQL query to manage System ... |
| 2 | Experience Database| Five years experience in ... |
| 3 | Description | I am admin of CSC Vietnam ... |
| 4 | Language | 1. Mother tongue: Vietnamese, 2. Frequency in English ...|
| 5 | Database Tools | using MySQL Workbench, MySQL GUI Tools ... |
| 6 | Database Security | uWhen configured properly, Database ... |
+----+--------------------+----------------------------------------------------------+
mysql> select * from document WHERE MATCH(title,body) AGAINST ('MySQL admin');
+----+--------------------+-------------------------------------------------+
| id | title | body |
+----+--------------------+-------------------------------------------------+
| 1 | Database Admin | using MySQL query to manage System ...' |
| 5 | Database Tools | using MySQL Workbench, MySQL GUI Tools ... |
| 3 | Description | I am admin of CSC Vietnam ... |
+----+--------------------+-------------------------------------------------+
2 rows in set (0.01 sec)
mysql> select * from articles WHERE MATCH(title,body) AGAINST ('database');
Empty set (0.00 sec)
mysql> select * from articles WHERE MATCH(title,body) AGAINST ('database' IN BOOLEAN MODE);
+----+--------------------+----------------------------------------------------------+
| id | title | body |
+----+--------------------+----------------------------------------------------------+
| 1 | Database Admin | using MySQL query to manage System ... |
| 2 | Experience Database| Five years experience in ... |
| 5 | Database Tools | using MySQL Workbench, MySQL GUI Tools ... |
| 6 | Database Security | When configured properly, Database ... |
+----+--------------------+----------------------------------------------------------+
6 rows in set (0.00 sec)
mysql> select * from articles WHERE MATCH(title,body) AGAINST ('+database -admin' IN BOOLEAN MODE);
+----+---------------------+------------------------------------------+
| id | title | body |
+----+---------------------+------------------------------------------+
| 2 | Experience Database | Five years experience in ... |
| 5 | Database Tools | using MySQL Workbench, MySQL GUI Tools...|
| 6 | Database Security | uWhen configured properly, Database ... | |
+----+---------------------+------------------------------------------+
1 row in set (0.01 sec)