#Post Title #Post Title #Post Title #Post Title #Post Title #Post Title #Post Title
Friday, 1 November 2013

Query pada Database



Membuat sebuah query untuk menampilkan suatu data dari database merupakan kesenangan saya, ntah kenapa merancang sebuah query dengan panjang dan dibutuhkan JOIN , INNER JOIN dll. sangat menyenangkan, layaknya sebuah mysteri ketika kita membuatnya kemudian terjadi kesalahan demi kesalahan yang banyak, tetapi akhirnya Itu loh Bisa mas brooh :D. Kebanyakan dari kita ada yang menggunakan suatu manajemen database yang disana menyediakan fitur untuk membentuk/menghasilkan sebuah query.

menurut saya AAAAAhhhhh kagak keyennn. (terlebih saya ngk tau ngoperasiinya juga sih Hahaha!).


Okeh untuk lebih jelasnya mari kita bersama-sama mempelajari Query ini. Maaf jika masih kurang ngerti, tergantung kapasitas HD,  RAM anda dan proccesor Otak anda masing-masing haha.

Kita mulai dari DML.

DML adalah kelompok perintah yang berfungsi untuk memanipulasi data dalam basis data, misalnya untuk pengambilan, penyisipan, pengubahan, dan penghapusan data. Perintah yang masuk kategori DML adalah :
  1.   Insert
Perintah Insert digunakan untuk menyisipkan data baru ke dalam sebuah tabel database. Ada dua macam perintah Insert, yaitu yang digunakan untuk menyisipkan data satu persatu dan yang menyisipkan banyak data sekaligus. Sintaksnya adalah sebagai berikut :
Untuk menyisipkan banyak record :
Untuk menyisipkan satu record :

INSERT INTO tujuan [(t_field1[, t_field2[, …]])] VALUES (nilai1[, nilai2[, … ] ])

Arti parameter-parameter yang disertakan:
Tujuan adalah nama tabel yang akan disisipi data.
Sumber adalah nama tabel sumber data.
T_field1, t_field2 adalah nama field yang akan disisipi data.
s_field1, s_field2 adalah nama field sumber data.
Nilai1, nilai2 adalah nilai data yang akan disisipkan.
Sebagai latihan, akan ditambahkan kedalam tabel buku beberapa data.

mysql> insert into buku values(1,'KD-OD9-HW-EMK-1',1,1);

Perintah di atas bertujuan menambahkan/menyisipkan tabel kedalam tabel buku dengan data sesuai urutan field ketika membuat tabel (bisa ditampilkan dengan perintah describe).

Bisa juga menggunakan cara:

mysql> INSERT INTO buku(id_buku,id_judul,no_urut,referensi)
    -> VALUES (2,'AF-HMA-MA-MDK-5',1,1);

Ataupun

mysql> INSERT INTO buku (id_judul,referensi, no_urut)
    -> VALUES ('KP-PDM-RS-AOF,3',1,1);

Tampilkan semua data yang ada di dalam tabel  buku

mysql> select * from buku;
+---------+-----------------+---------+-----------+
| id_buku | id_judul        | no_urut | referensi |
+---------+-----------------+---------+-----------+
|       1 | KD-OD9-HW-EMK-1 |       1 |         1 |
|       2 | AF-HMA-MA-MDK-5 |       1 |         1 |
|       3 | KP-PDM-RS-AOF,3 |       1 |         1 |
+---------+-----------------+---------+-----------+

mysql> INSERT INTO buku
    -> SET id_judul='KP-PWP-IFB-4',
    -> no_urut=1,
    -> referensi=1;
  1.   Select
Perintah Select digunakan untuk memilih data-data yang diperlukan dari sebuah database ke dalam sebuah database sementara. Ada beberapa istilah dalam menyebut database sementara ini, misalnya query, recordset, view. Sintaks selengkapnya adalah sebagai berikut: 

SELECT { * | namafield } FROM namatabel [INTO tujuan] [WHERE  kriteria] [GROUP BY grup] [HAVING kriteria] [ORDER BY namafield] [{ASC|DESC}]

Tanda * berarti menetapkan bahwa semua field pada tabel akan dipilih.
NamaField adalah nama field yang akan dipilih.
NamaTabel adalah nama tabel yang akan dipilih.
Kriteria merupakan suatu ekspresi logika yang mjd syarat pemilihan data.
Tujuan merupakan nama dari tabel baru yang dibentuk.
Grup merupakan pengelompokan data berdasarkan nama field.
ASC atau DESC adalah pengurutan data berdasarkan abjad atau angka.

Jalankan perintah-perintah berikut:

select * from buku;

select * from buku where referensi=2;

select id_judul,judul,id_penerbit,thn_terbit from judul_buku;

select nama_anggota,tmp_lahir,sekolah from anggota

select nama_anggota,tmp_lahir from anggota where sekolah='STMIK El Rahma';

select nama_anggota,tmp_lahir from anggota where tmp_lahir='Yogyakarta';

select nama_anggota,tmp_lahir from anggota where nama_anggota like 'Untung%';

select nama_anggota,tmp_lahir from anggota where nama_anggota like '%ma%';

  1. Delete
Perintah Delete digunakan untuk menghapus record pada suatu tabel. Sintaks dari perintah Delete adalah sebagai berikut :

            DELETE FROM nama_tabel [WHERE kriteria]

hati-hati dalam memberikan perintah delete ini, karena jika terlupa memberikan pernyataan kondisi , perintah ini akan menyebabkan terhapusnya seluruh isi tabel.
Sebagai contoh kita hapus dari tabel anggota, anggota dengan id_anggota='0520002', maka perintahnya:

DELETE FROM anggota WHERE id_anggota='0520002'

  1. Update
Perintah Update digunakan untuk memodifikasi atau memperbaharui nilai-nilai  record pada sebuah tabel. Sintaksnya adalah sebagai berikut :
UPDATE nama_tabel
SET field1 = nilai1 [,field2 = nilai2 [,...]]
[WHERE kondisi]
wah..., ternyata data anggota yang kita masukan tadi ada yang salah. Coba tampilkan nama_anggota, beserta sekolahnya, kalau pingin tahu, boleh juga dengan tgl_lahirnya :), untuk anggota yang tempat lahirnya di Kebumen. (masih ingat caranya? Tentu dong.....).
Nah, ternyata kita menginputkan sekolah yang salah. Coba jalankan perintah berikut:
UPDATE anggota SET sekolah='STMIK El Rahma' WHERE tmp_lahir LIKE '%bumen';

Hati-hati juga dalam menjalankan perintah update ini, jangan sampai lupa untuk menuliskan kondisi data dalam tabel yang akan diperbaiki. Maksud hati ingin merubah data yang tempat lahirnya di 'bumen' saja, apa daya karena lupa menuliskan kondisi, jadi berubah semua datanya.



Menggabungkan Dua Tabel atau Lebih
Jika kita memperhatikan tabel buku, maka disitu hanya ada field id_buku, id_judul, no_urut, dan referensi. Bagaimana untuk mengetahui judul bukunya? Sedangkan judul ada di tabel yang lain. Terkadang atau bahkan sering, kita memang akan bekerja dengan dua tabel atau lebih. Kalau kita menggabungkan dua tabel atau lebih, seperti permasalahan di atas hanya menyebut field beserta tabel-tabel yang digunakan, misalnya perintah berikut:

select id_judul,judul,no_urut from buku,judul_buku;

maka akan ditampilkan kesalahan

ERROR 1052: Column: 'id_judul' in field list is ambiguous

Jika kebetulan nama field id-nya berbeda, atau perintah yang digunakan adalah:
select buku.id_judul,judul,no_urut from buku,judul_buku;
maka akan ditampilkan data sebanyak jumlah data buku * jumlah data judul buku, yaitu dengan menghubungkan tiap id_judul di tabel buku dengan judul yang ada di tabel judul_buku.
Jika yang diinginkan adalah data yang bertepatan, yaitu data id_judul yang ada di tabel buku dihubungkan dengan id_judul yang sama yang ada di tabel judul buku, maka perintahnya:

SELECT buku.id_judul,judul,no_urut FROM buku,judul_buku
    -> WHERE buku.id_judul=judul_buku.id_judul;

atau

SELECT buku.id_judul,judul,no_urut
    -> FROM buku INNER JOIN judul_buku
    -> ON buku.id_judul=judul_buku.id_judul;

Menampilkan data judul, nama penerbit dan nama pengarangnya

SELECT judul, penerbit, nama
FROM judul_buku
INNER JOIN penerbit ON judul_buku.id_penerbit = penerbit.id_penerbit
INNER JOIN pengarang ON judul_buku.kd_pengarang = pengarang.id_pengarang;

SELECT judul, penerbit
FROM judul_buku
INNER JOIN penerbit ON judul_buku.id_penerbit = penerbit.id_penerbit;

SELECT judul, penerbit
FROM judul_buku
LEFT JOIN penerbit ON judul_buku.id_penerbit = penerbit.id_penerbit;

SELECT judul, penerbit
FROM judul_buku
RIGHT JOIN penerbit ON judul_buku.id_penerbit = penerbit.id_penerbit;

Perhatikan perbedaan ketiga perintah terakhir di atas beserta hasilnya, dan simpulkan.
Cobalah untuk menghapus data penerbit 'Andi offset' yang ada di tabel penerbit
Kemudian ulangi ketiga perintah di atas
Perhatikan perbedaan perubahan hasil ketiga perintah terakhir di atas beserta hasilnya, dan simpulkan.



Source : Pelajaran D3 saya dahulu yang diajarkan bapak gatot satryo.

 

[ Read More ]
Tuesday, 29 October 2013

Contoh Tugas Persamaan Dasar Akuntansi

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzAiodI_Aq9pnvy_lAnYq8VyD6ToIe2QTrgzoMYads770hPHDJsyOM8Jr_e9_ZUTqKia5WidB39IW6YCNFiBVkPdOKSFP5NnSVJaxHIB1lr_sIfkmcoqVkGX2X9jFg9GFcpgIhv3Muo-m-/s1600/Skripsi+Akuntansi.jpg 

Diantara kalian netizen ada yang pernah mengalami masalah Suram dengan Akuntansi, ada ?..
Tidak ??.
.
Yah itu jawaban anda masing-masing, tapi ini baru HOOOT banget, dimana saya dulu pernah Gagal Mendapatkan biji/nilai A dalam matakuliah akuntansi yang SKSny 3. Dan sekarang di matkul yang sama saat Baru UTS saya terjebak di Problema (due ile problema :D ) Persamaan dasar dan Jurnal. Sebenarnya tuh dua pencatatan, gue udah Khatam (katanya gue :D), tapi ibarat Pribahasa dgn setetes nira rusak susu sebelanga (Mbuh bener apa kagak itu tulisanya), gara-gara 1 transaksi Brooh, 1 brooh , gila 1 broooh , hasilnya beda 5 juta. Loh bayangin dah tu, mikir dah tu, gue tilep kemanaaa tu duit hahahahaaaaahahaaa. Haaa ya sutra lah, semoga nilainya dari setiap transaksi ya, bukan mengacu ke hasil akhir.
Ya auwwuoh semoga bu Hetin baik sama hamba mu ini J.
OK netizen semua Ayok Kita CEKIBROOT ke Contoh Tugas Persamaan dasar dengan 6 transaksi.
 


     A.     Transaksi.
Pada tanggal 10 juni 2013 Tn. Farisan membuka jasa sevice komputer “GoodCom”.
1.  Tn. Farisan menyerahkan uang tunai sebesar Rp. 10.000.000,-, Kendaraan senilai Rp. 30.000.000,-.
2.   Dibeli Meja, Kursi dan Almari dari Toko “LENGKAP” untuk kantor Rp.1.500.000,-
3.  Di serahkan 12 unit komputer milik PT ABC yang telah selesai di service dengan total biaya Rp.650.000,- dan telah di terima secara tunai.
4.   Dibayar Gaji Karyawan untuk bulan september sebesar Rp.400.000,-
5.   Perusahaan membayar biaya listrik dan telepon sebesar Rp.150.000,-
6. Perusahaan menyerahkan 10 unit komputer ke CV BRATA dan menerima pembayaran secara tunai Rp.500.000,-

Persamaan Dasar Akuntasi “GoodCom”.
NO
AKTIVA
PASIVA
Kas
Kendaraan
Peralatan
Modal
Pendapatan
Biaya
1
+10.000.000
+ 30.000.000
-
+40.000.000
-
-
2
-1.500.000
-
+ 1.500.000
-
-
-
3
+650.000
-
-
-
+650.000
-
4
-400.000
-
-
-
-
+400.000
5
-150.000
-
-
-
-
+150.000
6
+500.000
-
-
-
+500.000
-
tot
9.100.000
30.000.000
1.500.000
40.000.000
1.150.000
550.000

AKTIVA                                   =                                  PASSIVA
Kas + Kendaraan + peralatan                         =          Modal +  (Pendapatan - Biaya)
9.100.000 + 30.000.000 + 1.500.000              =          40.000.000 ( 1.150.000 - 550.000 )
                        Rp.40.600.000,-                       =                      Rp.40.600.000,-

source dari blog saya satu lagi http://downloadtugaskulia.blogspot.com/ 
[ Read More ]
Wednesday, 23 October 2013

Differences in Blackberry BBM and BBM for Android - iOS

Perbedaan BBM di Blackberry dan BBM for Android   iOS 
 In the previous topics I discuss How to install BBM (BlackBerry Messenger) in Android,. This time I gave Differences in Blackberry BBM and BBM for Android - iOS -

Source : Hariantekno.com -
 Differences in Blackberry BBM and BBM for Android - iOS - Blackberry Party has ensured that the BBM app for Android will be available today on Google Play Store promptly at 6 pm Western Indonesia time later. And for the application of fuel for the iOS became available tomorrow at the Apple App Store. Many users of Android and iOS handsets, is there any difference in the application of fuel in advance of Blackberry and BBM cross platform application available for Android and iOS?
Differences in Blackberry BBM BBM for Android and iOS 







Here we want to make sure that the application does not have the distinction of fuel at all, the Blackberry will present the same features between BBM for Blackberry, Android and iOS. So for those Android users who also have a Blackberry handset, not difficult to use. This can be known from the feature BBM app for Android and iOS following, which has features in common with BBM on the Blackberry.
Typical BBM chats
Each application would have the characteristics of each - each, as well as the BBM app for Android and iOS. For Blackberry users keberaradaan certainly was familiar with the lowercase "D" and "R" that characterizes the BBM application to report a message has been read and sent.

Photo Sharing and Voice Features
One of the advantages of BBM application is the ability to share images or photos and voice messages can be sent to all your friends at the same or better known as broadcast.

BBM Groups feature Reached 30 Users
BBM app also mnyediakan a feature to create groups that can be used to chat with up to 30 users. Group chat will also support sharing images or photos and a short voicemail.
Alert Status Change
If you ever use the Yahoo! Messenger status would ever get a notification made by your chat friends. This feature can also be found in the BBM app on Android, iOS and Blackberry handsets fuel applications.

Presence BBM PIN or ID
This feature may be the most striking difference between the application of fuel with other cross-platform messenger application. By using this BBM PIN you can automatically search your friends and make calls quickly.

Feature Video Chat
Fore BBM application features will be added features for sharing via video chat like you can do on Skype and similar applications.




Click here to download
  BBM for Android apk
[ Read More ]

Learning Database (Database)

DATABASE AND DBMS
Database Management System (DBMS) contains a collection of interrelated data and a set of programs to access that data. Database and DBMS consists of Set Program manager for add data, delete data, retrieve, and read the data.
The database is a collection of files that relate to each other, the relationship is shown by the usual key of each existing file. The database shows one set of data / tables used in the scope of the enterprise, institution. It means that the database is a collection of data related to an object, a particular topic or purpose. For example the phone book, dictionary, books in the library catalog, the data collection of music and videos, customer data, supplier data, student data, employee data, and others.
In the data file / table records are similar, equal, same shape, is a collection of uniform entity. The record consists of fields that are interconnected to show that the field in one sense a complete and recorded in one record.
To refer to the contents of a field then use the title attribute or an entity of a particular group, such as Address attribute indicates the address of the student entity. Entity is an object which is real and will be recorded.
Set management program is a package of programs designed to facilitate and streamline the income or information recording and retrieval or reading the information into a database, called the DBMS package. There are several kinds of packages DBMS, such as MySQL, postgresql, FoxPro, Oracle, DB2, etc..
 
MySQL
MySQL is one example of software / package is extremely popular DBMS. MySQL popularity is possible because of the ease of use, the faster query performance, and insufficient for the needs of enterprise database-small-medium scale enterprises.
MySQL is the DBMS that is client-server and multi-user. The point is that there is software which runs as a MySQL client, and those that run as a server. Server serves to provide service upon a request made by the Client. There are a lot of users who can simultaneously access the database server through the client program.
Therefore, before we do the processing to the database, then we have to run the program first MySQL Database Server that provides services such as data. After that we can only make requests to the server in the form of data services through the client program. Services provided can include income or information recording and retrieval or reading information to / from the database.
 
Connection to the MySQL server through the MySQL client
As already mentioned that MySQL is a multi-user program. Therefore, when we will make a connection, then we should have the right of access to existing data in the database server and each user can have different passwords. This is one of the security facilities usually provided by the DBMS software is multi-user. In addition, clients can connect from any computer connected on the network and have permissions to connect from another computer specified. To make a connection, use a client program called mysql. In use, MySQL has several parameters. Parameters are often used to connect is username and password and host name (if connection via another computer). Writing parameter can be reversed and forth between the parameters, not between its value.
 
 
 
for more details please download this module:
click here to download Database moduls

Also Read  : 
 How Install BBM (BlackBerry Messenger) in Android 

 
[ Read More ]
Tuesday, 22 October 2013

How to Install BBM (BlackBerry Messenger) in Android

For those who want to install BBM (BlackBerry Messenger) in Android, but can not access the Google Play Store, liposuction here BBM.apk files directly though its course can be installed and be divided into other android users without having to download it again from the Play Store.



As mentioned earlier, BBM for Android and iPhone has been officially released (again) for the second time after its release last september 2013 failed.

Directly without any strings attached, download bbm for android from the following 3 servers for jaga2 if there is a dead link, overload, or removed because traffic is booming.


Click here to download
[ Read More ]