Showing posts with label Database. Show all posts
Showing posts with label Database. Show all posts

Cara Install dan Membuat Tabel di Database Oracle Step by Step

Ohapagiii~ (^O^)/ Masih semangat belajar?
Kalau kemarin-kemarin kita udah belajar cara bikin tabel di database MySQL, PostgreSQL, SQL Server, sekarang kita belajar gimana caranya bikin tabel di Oracle.

Pertama kita download dulu database nya di sini.
Oh ya sebelum bisa download, temen-temen harus udah punya akun Oracle dulu, tinggal daftar aja, gratis.


Abis itu temen-temen pilih database Oracle nya mau download yang mana, sesuaikan dengan PC temen-temen apakah Windows 32bit, 64bit, atau Linux.



Kalau udah didownload, jalankan file setup.exe.

Akan muncul prompt yang menandakan bahwa Installer sedang melakukan preparing. 


Klik next.




Pilih "I accept the terms in the license agreement", lalu Next.


Ini menunjukkan di direktori mana database Oracle akan diinstall, pilih Next.


Masukkan password yang nantinya akan temen-temen pakai buat koneksi ke database.
Password ini digunakan untuk user: SYSTEM


Pilih Install.


Tunggu sampai proses install selesai. Proses ini akan 'memakan' waktu agak lama. Jadi mohon bersabar. (^_^)/


Jika sudah selesai, pilih Finish.



Okeee, tahap installasi sudah selesai, sekarang mikirin gimana caranya bikin tabel.
Biar gampang, kita pakai aplikasi SQL Developer.
Temen-temen bisa download di sini.
Sebelum bisa pakai aplikasi ini, PC temen-temen harus udah terinstall JDK dulu.
Kalau JDKnya udah terinstall di PC temen-temen, pilih SQL Developer yang "Windows 32-bit/64-bit", terus Download.

Abis didownload, pilih sqldeveloper.exe






Nah begini interfacenya.


Pertama kita buat databasenya dulu, di kolom Connections, pilih New Connection.


Connection Name adalah nama database yang mau kita buat.
Aku namain "perpustakaan". 
Username nya secara default adalah "system".
Passwordnya adalah password yang kita bikin waktu proses installasi.
Lalu pilih button "Connect".


Sekarang kita cek di Connection, database perpustakaan udah created.


Kalau kita klik tables, maka di sana udah created tables bawaan Oracle nya sendiri.


Tahap selanjutnya adalah bikin table bikinan kita sendiri, klik kanan Tables, lalu pilih New Table.



Name adalah nama table nya. Isikan sesuai yang di gambar ya.
Oh ya sekedar informasi, kalau di Oracle tuh gak ada Varchar, adanya Varchar2.
Soal ini kapan-kapan kita bahas ya. :)


Oke, kita dah selesai bikin table, dan ini hasilnya.

Sekarang kita mau isi table nya. Klik tab "Data", lalu Insert Row.




Sekarang kita udah berhasil masukkin data. Selamat mencoba dan semangat belajar. (^O^)/

Displaying Crystal Report in Visual Studio using C# and SQL Server Express Step by Step

Displaying Crystal Report in Visual Studio using C# and SQL Server Express Step by Step, it works!



Video Link

Installing SQL Server 2008 Express Tutorial Step by Step with Pictures

How's your effort for learning right now? (^O^)/
We are going to take a 'class' how to install SQL Server 2008 Express in our PC.

As always, we must have an installer, it can be found here and downloaded based on your PC's specifications.

After downloading it, execute the.exe file.
Just following the pictures below... ^_^


In some of OS, you will find such following dialog box:


Just select "Run the program without getting help".



I assume this is our first installation. Select "New SQL Server  stand-alone installation or add features to an existing installation".



It doesn't need product key due to free edition






Select all the features


Select Default Instance, then Next







Select Mixed Mode, then you must create your password then "Add Current User"






Happy learning and practicing!!! (^O^)/

Comparing Two Rows in One Table Postgresql

 This article explain about SQL query which will compare two rows in one table PostgreSQL.
I wonder if the query can be implemented in another database, but it's just usual query I think, so it's possible to be implemented in another database such as MySQL, Oracle, SQL Server, and many more.

I assume you have had ability for installing Postgresql Database, creating database and table, and inserting the values.
Let us assume we have database named "comparing" (without quotes).

Create table named "table1" with the following columns.


Insert record as below:









We want to select single record of two duplicate value in "col1" column.
The single record which will be selected is the record which has the highest value in "col2" column for each duplicate "col1" column.
Below is query how to compare two rows in one table.

SELECT * FROM table1 t1 WHERE t1.col2 = (SELECT MAX(t2.col2) FROM table1 t2 WHERE t1.col1 = t2.col1 GROUP BY col1);

The result:





Query explanation:

SELECT * FROM table1 t1
Select all column with record in table1 {col1, col2, col3, col4) then we assign alias table name called "t1" (without quotes).

WHERE t1.col2=
Limit the record displayed based on rule on "col2' column (without quotes) which will be created afterward.

(SELECT MAX(t2.col2) FROM table1 t2 WHERE t1.col1 = t2.col1 GROUP BY col1);

This is the rules affected from "col2" column (without quotes).
We will select all columns in table1 which have maximum value in "col2" column (without quotes) from table1.
We assign alias table name called "t2" (without quotes).

Jurnal Implementasi Basis Data untuk Diagnosa Pecandu Narkoba.pdf

How to Create MySQL Password


I used to use MySQL that integrated in PHP5 package. When there are database systems course in college, they used MySQL that integrated in XAMPP package.
There are many differences in both syntax, and of course it's a bit inconvenient.
eg syntax for open MySQL and create a table in databases.

here for example:

C:\Users\dewi>cd C:\xampp\mysql\bin

C:\xampp\mysql\bin>mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 31
Server version: 5.1.37 Source distribution

mysql> show databases;

mysql> create database ball tournament;

mysql> use ball tournament;
Database changed


mysql> create table goal(kd_goal varchar(2) primary key,no int(2), name
 varchar(30) not null,total int(3)not null,constraint fkno foreign key
(no) references players(no) on update cascade on delete cascade
) type=innodb;

when I used MySQL in php5 package, when installing I was required to create a password.
but not with this XAMPP package. I had to make a manual.
Here the syntax:

mysql>grant all on *.* to root@localhost identified by 'your password';

Hope this useful for u. See ya!

Semester 2

kelasA 14-05-2012.rar

Contoh proyek Microsoft Access 2007

Ini adalah proyek database dengan menggunakan Microsoft Access 2007. silahkan didownload untuk bahan belajar, maaf jika banyak kekurangannya ^^

Ini link downloadnya:

http://www.ziddu.com/download/19576705/UASDATABASEZIP.rar.html