Showing posts with label Database. Show all posts
Showing posts with label Database. Show all posts
Monday, January 24, 2011 by Andy Kurnia Prayoga Made
Description: This application uses PHP and MySQL for the database. This application is based website. Application is made to store student data in the database and display the data in the form of websites. This application was made on the local computer, so to run it have to use XAMPP as the server. For more details, we just headed to the practice of manufacture.
Create a database with MySQL. The following syntax from the application database

CREATE DATABASE mhsstikom

DROP TABLE IF EXISTS `mhsstikom`.`mahasiswa`;
CREATE TABLE IF NOT EXISTS `mhsstikom`.`mahasiswa` (
  `nim` VARCHAR(9) NOT NULL DEFAULT '' ,
  `nama` VARCHAR(30) NOT NULL DEFAULT '' ,
  `tgllahir` DATE NOT NULL DEFAULT '0000-00-00' ,
  `jenkel` ENUM('0','1') NOT NULL DEFAULT '0' ,
  `alamat` TEXT NOT NULL DEFAULT '' ,
  `namafoto` VARCHAR(50) NOT NULL DEFAULT '' ,
  PRIMARY KEY (`nim`),
  UNIQUE KEY nim (`nim`),
   KEY nim_2 (`nim`)
);

Here's the download link from the source code for this application

Student Information System - Click Here

After downloading it and then extract the file in the folder where you installed the htdocs in your XAMPP. You can use Dreamweaver to edit the look and configuration of this application.

Then run the application on your browser. I use Mozilla Firefox to view this website. Here's the view of this application


Good luck!
Comments
Tuesday, November 16, 2010 by Andy Kurnia Prayoga Made
One of the Transact SQL server 2000 which is very useful to us is the Transact join. It aims to combine several tables that have a primary key that refers to another table. There are 4 types of Transact join the most commonly used. Maybe many people are confused about the difference between inner join, left join, right joins and full join on writing Transact SQL server in query analyzer. To eliminate confusion, please try for yourself Transact-Transact below in your query analyzer. Please try and find their own conclusions.



create database andy

use andy

create table pegawai
(
noID int,
nama varchar(20),
tgllahir varchar(10),
alamat varchar(30),
kodepegawai varchar(5)
)

insert into pegawai values(1,'Munson','25-12-1989','denpasar 20','DR')
insert into pegawai values(2,'Steven','14-02-1989','gianyar 31','MGM')
insert into pegawai values(3,'Edward','13-11-1988','tabanan 25','CS')
insert into pegawai values(4,'Paul','12-06-1990','amlapura 16','MGP')
insert into pegawai values(5,'Gibson','07-07-1989','badung 11','CS')

select * from pegawai

create table job
(
kodepegawai varchar(5),
bidangpekerjaan varchar(20),
gaji varchar(20)
)

insert into job values('DR','direktur','Rp 5.000.000')
insert into job values('MGP','manager personalia','Rp 2.500.000')
insert into job values('MGM','manager marketing','Rp 3.000.000')
insert into job values('MGPD','manager produksi','Rp 3.200.000')
insert into job values('KR','karyawan','Rp 1.100.000')
insert into job values('CS','cleaning service','Rp 800.000')

select * from job


SELECT job.kodepegawai,job.bidangpekerjaan,job.gaji,pegawai.noID,pegawai.nama 
FROM job
INNER JOIN pegawai
ON pegawai.kodepegawai=job.kodepegawai
ORDER BY pegawai.noID

SELECT job.kodepegawai,job.bidangpekerjaan,job.gaji,pegawai.noID,pegawai.nama 
FROM job
LEFT JOIN pegawai
ON pegawai.kodepegawai=job.kodepegawai
ORDER BY pegawai.noID

SELECT job.kodepegawai,job.bidangpekerjaan,job.gaji,pegawai.noID,pegawai.nama 
FROM job
RIGHT JOIN pegawai
ON pegawai.kodepegawai=job.kodepegawai
ORDER BY pegawai.noID

SELECT job.kodepegawai,job.bidangpekerjaan,job.gaji,pegawai.noID,pegawai.nama 
FROM job
FULL JOIN pegawai
ON pegawai.kodepegawai=job.kodepegawai
ORDER BY pegawai.noID
Comments