sistem informasi

blog of information system material for my students.

Monday, August 25, 2008

Query Order-OrderDetail-Barang

A. Model Data:


B. Kondisi awal: Tabel di dalam database

tabel: Barang
kdBrgNamaBrg HrgSat
11111 Apel Manalagi 5000
11112 Apel Malang 4000
11114 Durian Bangkok 10000
11119 Belimbing 3000


tabel: Order
NoOrder tgl total
00001 10-agu-08 0
00002 10-agu-08 0
00003 10-agu-08 0
00012 11-agu-08 0
00013 11-agu-08 0
00014 11-agu-08 0
00015 11-agu-08 0


tabel: OrderDetail
NoOrder
kdBrg
Qty
00001 11111 5
00001 11114 3
00002 11111 3
00002 11112 5
00002 11114 10
00003 11119 10
00012 11114 5
00012 11119 5
00013 11111 10
00014 11112 8
00015 11119 12


C. Proses dengan Query

Query1
SELECT *
FROM Order, Barang, OrderDetail
WHERE ((Order.NoOrder = OrderDetail.NoOrder) and (Barang.Kdbrg = OrderDetail.Kdbrg))

Tujuan Query1 : untuk menampilkan semua rincian order dengan orderDetail-nya

Query2
SELECT Order.NoOrder, OrderDetail.kdBrg, Barang.NamaBrg, Barang.HrgSat, OrderDetail.Qty, (OrderDetail.Qty * Barang.HrgSat) AS subTotal
FROM Order, Barang, OrderDetail
WHERE ((Order.NoOrder = OrderDetail.NoOrder) and (Barang.Kdbrg = OrderDetail.Kdbrg))

Tujuan Query2 : untuk menampilkan semua rincian order dengan orderDetail-nya sambil menghitung subTotal per barang yang dibeli dalam suatu order.

Query3
SELECT Order.NoOrder, sum (OrderDetail.Qty * Barang.HrgSat) as Total
FROM [Order], Barang, OrderDetail
WHERE (((Order.NoOrder)=OrderDetail.NoOrder) AND
((Barang.kdBrg)=OrderDetail.Kdbrg)) group by Order.NoOrder;

Tujuan Query3 : untuk menampilkan semua order sambil menghitung Total per order.


D. Hasil Query

Hasil Query1


Hasil Query2


Hasil Query3


Anda tinggal memasukkan perintah query itu ke dalam perintah pemrograman Delphi Anda.

:-)

Wednesday, March 28, 2007

Milestones for stepping IS engineering

Facing complexities of the enterprise of a business organization, we may make separation between organization system view, information system views, and their elements.

  • In organization system analysis, we try to understand about core of business of the system, including their activities, try to identify the needs of information for supporting management, and to develop the boundaries of information system context, base on the core of business and the information needed.
  • In information system analysis, we will identify the context of data processing system, the task functionalities, and the context of data schema of the database.
  • Finally, we try to find some elements of information system, such as software (spl), hardware (spk), network (sjk), database (sbd), human computer interaction (hci or imk), user (admin, operator, boss), non-computer data processing, standard operation procedures, and maintenance procedures.

Visitor Counter