LAMPIRAN
1.1. Implementasi Basis Data 1.1.1. Tabel Cluster
1. CREATE TABLE `cluster` 2. `id_cluster` int11 NOT NULL AUTO_INCREMENT,
3. `uuid` varchar100 NOT NULL, 4. PRIMARY KEY `id_cluster`,
5. UNIQUE KEY `uuid_UNIQUE` `uuid` 6. ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
1.1.2. Tabel Centroid
1. CREATE TABLE `centroid` 2. `id_centroid` int11 NOT NULL AUTO_INCREMENT,
3. `id_cluster` int11 NOT NULL, 4. `id_term` int11 NOT NULL,
5. `value` double NOT NULL DEFAULT 0, 6. PRIMARY KEY `id_centroid`,
7. KEY `fk_centroid_1_idx` `id_cluster`, 8. KEY `fk_centroid_2_idx` `id_term`
9. ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
1.1.3. Tabel Document
1. CREATE TABLE `document` 2. `id_document` int11 NOT NULL AUTO_INCREMENT,
3. `id_cluster` int11 NOT NULL, 4. `record_id` varchar1000 NOT NULL,
5. PRIMARY KEY `id_document`, 6. KEY `fk_document_1_idx` `id_cluster`
7. ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
1.1.4. Tabel Term
1. CREATE TABLE `term` 2. `id_term` int11 NOT NULL AUTO_INCREMENT,
3. `term` varchar512 NOT NULL, 4. PRIMARY KEY `id_term`,
5. UNIQUE KEY `term_UNIQUE` `term` 6. ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
1.1.5. Tabel Term_Document
1. CREATE TABLE `term_document` 2. `id_term_document` int11 NOT NULL AUTO_INCREMENT,
3. `id_document` int11 NOT NULL, 4. `id_term` int11 NOT NULL,
5. `tf` int11 NOT NULL DEFAULT 0, 6. `w` double NOT NULL DEFAULT 0,
7. PRIMARY KEY `id_term_document`, 8. KEY `fk_term_document_1_idx` `id_document`,
9. KEY `fk_term_document_2_idx` `id_term` 10. ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
1.1.6. Tabel Stopword
1. CREATE TABLE `stop_word` 2. `id_stop_word` int11 NOT NULL AUTO_INCREMENT,
3. `stop_word` varchar45 DEFAULT NULL, 4. PRIMARY KEY `id_stop_word`
5. ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
1.1.7. Tabel Rootword
1. CREATE TABLE `root_word` 2. `word` varchar25 NOT NULL,
3. `wordtype` varchar20 NOT NULL, 4. `definition` text NOT NULL
5. ENGINE=MyISAM DEFAULT CHARSET=latin1;
1.2. Implementasi Sistem Pemerolehan Informasi Berbasis Cluster 1.2.1. Source Code
1.2.1.1. Package database 1.2.1.1.1. Kelas Connection.java
1. 2. To change this license header, choose License Headers in Project Properties.
3. To change this template file, choose Tools | Templates 4. and open the template in the editor.
5. 6. package database;
7. 8. import com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource;
9. import com.mysql.jdbc.jdbc2.optional.MysqlDataSource; 10. import java.sql.SQLException;
11. import java.util.logging.Level;