Skip navigation


Didedikasikan buat rekan-rekan IF ITB 2006.

Ada sedikit permintaaan dari beberapa junior supaya saya sedikit mengupas tentang aplikasi medis sederhana di Java EE. Aplikasi ini cuman aplikasi pengaturan dokter, pasien, dan pemeriksaan. Aplikasi ini akan dibangun dengan menggunakan basis data MySQL dan IDE Netbeans.classdiagram

Pemetaan kelas ke basis data dapat dilihat pada SQL di bawah. Jangan lupa melakukan konfigurasi InnoDB di MySQL pada XAMPP (kalau pakai)

-- phpMyAdmin SQL Dump
-- version 2.10.1
-- http://www.phpmyadmin.net
-- 
-- Host: localhost
-- Generation Time: Aug 31, 2009 at 02:36 PM
-- Server version: 5.0.41
-- PHP Version: 5.2.2

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

-- 
-- Database: `medic`
-- 

-- --------------------------------------------------------

-- 
-- Table structure for table `doctors`
-- 

CREATE TABLE `doctors` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` text collate latin1_general_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=5 ;

-- 
-- Dumping data for table `doctors`
-- 

INSERT INTO `doctors` VALUES (1, 'Cheng Lu');
INSERT INTO `doctors` VALUES (2, 'Kyle N. Leonard');
INSERT INTO `doctors` VALUES (3, 'Alisha S. Carter');
INSERT INTO `doctors` VALUES (4, 'Vanya Vanegas Mejía');

-- --------------------------------------------------------

-- 
-- Table structure for table `examinations`
-- 

CREATE TABLE `examinations` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `doctor_id` int(10) unsigned NOT NULL,
  `patient_id` int(10) unsigned NOT NULL,
  `date` timestamp NOT NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`id`),
  KEY `doctor_id` (`doctor_id`),
  KEY `patient_id` (`patient_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;

-- 
-- Dumping data for table `examinations`
-- 


-- --------------------------------------------------------

-- 
-- Table structure for table `patients`
-- 

CREATE TABLE `patients` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` text collate latin1_general_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=5 ;

-- 
-- Dumping data for table `patients`
-- 

INSERT INTO `patients` VALUES (1, 'Debra G. Banks');
INSERT INTO `patients` VALUES (2, 'Susana T. Vandergriff');
INSERT INTO `patients` VALUES (3, 'Vanessa J. Mcphee');
INSERT INTO `patients` VALUES (4, 'Justin L. Cowan');

-- 
-- Constraints for dumped tables
-- 

-- 
-- Constraints for table `examinations`
-- 
ALTER TABLE `examinations`
  ADD CONSTRAINT `examinations_ibfk_2` FOREIGN KEY (`patient_id`) REFERENCES `patients` (`id`),
  ADD CONSTRAINT `examinations_ibfk_1` FOREIGN KEY (`doctor_id`) REFERENCES `doctors` (`id`);

Cara mengintegrasikan database di atas dengan Netbeans dapat dilihat pada link ini.

One Trackback/Pingback

  1. […] Older » […]

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: