DAFTAR PUSTAKA
Budiharto,Widodo. Visual Basic . Net 2005. Yogyakarta : CV.Andi Offset (Penerbit Andi), 2006. Clark, Daniel R. Beginning Object-Object Programing With VB 2005, New York : Springer-Verlag New York, Inc, 2006. Dubois, Paul. MYSQL Administrator Guide. MySQL Press Trus Vaswani, 2004. Dharwiyanti, Sri. Pengantar Unified Modeling Language, Ilmu Komputer.com, Jakarta, 2003. Lhotka, Rockford. Expert VB 2005 Business Object Second Edition, New York : Springer-Verlag New York, Inc, 2006. Michael dan David Axmark. MySQL Feference Manual, Mysql AB, 1997-2004. Raharjo, Willy Sudiarto dan Wikan, Aditya Mahastama. Pemodelan Sistem Perangkat Lunak, Universitas Duta Wacana, Yogyakarta, 2006. Suyanto, Asep Hermawan. Basisdata dan DBMS, Universitas Gajah Mada, Yogyakarta, 2004. Vikram dan Pamela Smith. MySQL: The Complete Reference, The Mcgraw-hill companies Trus Widenius, 2002. Yuliana, Yenti dan Tarigan, Josua. QUERY BY EXAMPLE: ALTERNATIF AUDIT TOOLS UNTUK MENUNJANG PENUGASAN AUDITOR DALAM PENGUJIAN SUBSTANTIF, Surabaya : Universitas Kristen Petra Surabaya. Zafina, Lidiya Iin dan Rianto, Yasman, Perancangan Simulasi Media Antarmuka Komputer, Jakarta: Universitas Gunadarma, 2006
LAMPIRAN A USER MANUAL
1.
Membuka apilkasi visualisai query ini dengan cara masuk Pilih shortcut aplikasi visualisa query
2.
Setelah membuka apilikasi ini maka harus melakukan login basisdata dengan cara input nama server basisdata dan kata kunci basisdata tersebut
3.
Setelah login basisdata berhasil maka harus dilakukan pemilihan nama basisdata yang akan dimanipulasi dengan cara memilih pada daftar basisdata seperti gambar berikut
4.
Langkah selanjutnya setelah pilih basisdata dapat dilakukan pemilihan tabeltabel yang akan di manipulasi pilih tabel dapat dilakukan dengan meng click icon
Pilih Tabel
5.
Bila manipulasi akan melibatkan lebih dari satu tabel maka harus ada relasi untuk menghubungkan antar tabel, untuk melakukan relasi ini dapat dilakukan dengan mengclick icon
Pilih relasi tabel
6.
Selanjutnya untuk memilih tipe proses yang akan digunakan dapat dilakukan dengan memilih salah satu tipe yang tersedia dalam daftar berikut ini
7.
Selanjutnya proses dapat dilakukan dengan memilih atau mencentang fieldfield yang terdapat dalam tabel
8.
Setelah proses ini dilakukan semua proses manipulasi dapat dilanjutkan dengan memproses menjadi sebuah hasil yang data-data yang ditampilkan dalam bentuk daftar berurutan, untuk melakukan proses ini kita harus mengclick icon berikut ini
Pilih Proses akhir
LAMPIRAN B KODE PROGRAM Kode Program untuk Basisdata 1. Kode Program DataBaseInfoList Public Class Cls_DatabasesInfoList Inherits ReadOnlyCollectionBase Implements IList #Region " Factory Methods " Public Shared Function GetObject(ByVal login As Cls_Login) As Cls_DatabasesInfoList Return FetchObject(New criteria(login)) End Function Private Sub New() End Sub #End Region #Region " Data Accsess " Private Class criteria Private _connString As String Public ReadOnly Property ConnectionString() As String Get Return _connString End Get End Property Public Sub New(ByVal log As Cls_Login) _connString = "Persist Security Info=False;database=test;server=" & log.Server & ";user id=" & log.UserName & ";Password=" & log.Pass End Sub End Class Private Shared Function FetchObject(ByVal crit As criteria) As Cls_DatabasesInfoList Dim obj As New Cls_DatabasesInfoList Using cn As New MySqlConnection(crit.ConnectionString) cn.Open() Using cm As MySqlCommand = cn.CreateCommand With cm .CommandType = CommandType.Text .CommandText = "show databases" Using dr As MySqlDataReader = cm.ExecuteReader While dr.Read obj.Add(Cls_DatabasesInfo. GetDatabases(dr)) End While End Using End With
End Using End Using Return obj End Function #End Regio End Class
2.
Kode Program DataBaseInfo Public Class Cls_DatabasesInfo #Region " Business Object " Private _database As String Public ReadOnly Property DataBase() As String Get Return _database End Get End Property #End Region #Region " Factory Methods " Public Shared Function GetDatabases(ByVal dr As MySqlDataReader) As Cls_DatabasesInfo Return New Cls_DatabasesInfo(dr) End Function Private Sub New(ByVal dr As MySqlDataReader) With dr _database = CType(.Item("database"), String) End With End Sub #End Region End Class
Kode Program untuk Tampil Tabel 1. Kode Program TabelInfoList Public Class Cls_TablesInfoList Inherits ReadOnlyCollectionBase Implements IList #Region " Factory Methods " Public Shared Function GetObject(ByVal login As Cls_Login, ByVal dbName As String) As Cls_TablesInfoList Return FetchObject(New criteria(login, dbName)) End Function Private Sub New() End Sub #End Region #Region " Data Accsess " Private Class criteria Private _connString As String Private _dbName As String Public ReadOnly Property DbName() As String Get Return _dbName End Get
End Property Public ReadOnly Property ConnectionString() As String Get Return _connString End Get End Property Public Sub New(ByVal log As Cls_Login, ByVal dbName As String) _connString = "Persist Security Info=False;database=" & dbName & ";server=" & log.Server & ";user id=" & log.UserName & ";Password=" & log.Pass _dbName = dbName End Sub End Class Private Shared Function FetchObject(ByVal crit As criteria) As Cls_TablesInfoList Dim obj As New Cls_TablesInfoList Using cn As New MySqlConnection(crit.ConnectionString) cn.Open() Using cm As MySqlCommand = cn.CreateCommand With cm .CommandType = CommandType.Text .CommandText = "show tables" Using dr As MySqlDataReader = cm.ExecuteReader While dr.Read obj.Add(Cls_TablesInfo.GetDatabase s(dr, crit.DbName)) End While End Using End With End Using End Using Return obj End Function #End Region End Class
2.
Kode Program TabelInfo Public Class Cls_TablesInfo #Region " Business Object " Private _tableName As String Public ReadOnly Property TableName() As String Get Return _tableName End Get End Property #End Region #Region " Factory Methods " Public Shared Function GetDatabases(ByVal dr As MySqlDataReader, ByVal dbName As String) As Cls_tablesInfo
Return New Cls_tablesInfo(dr, dbName) End Function Private Sub New(ByVal dr As MySqlDataReader, ByVal dbName As String) With dr _tableName = CType(.Item("tables_in_" & dbName), String) End With End Sub #End Region End Class
Kode Program untuk Tampil Field-Field 1. Kode Program FieldInfoList Public Class Cls_FieldInfoList Inherits ReadOnlyCollectionBase Implements IList #Region " Business Object " Public Function GetItem(ByVal field As String) As Cls_FieldInfo For Each item As Cls_FieldInfo In Me If item.FieldName.Equals(field, StringComparison.OrdinalIgnoreCase) Then Return item End If Next Return Nothing End Function Public Function GetTypeString(ByVal name As String) As Boolean For Each item As Cls_FieldInfo In Me If item.FieldName = name Then Dim a() As String = item.Type.Split("(") If UCase(a(0)) = "VARCHAR" Then Return True Else Return False End If End If Next End Function #End Region #Region " Factory Methods " Public Shared Function GetObject(ByVal login As Cls_Login, ByVal dbName As String, ByVal tableName As String) As Cls_FieldInfoList Return FetchObject(New criteria(login, dbName, tableName)) End Function Private Sub New() End Sub #End Region
#Region " Data Accsess " Private Class criteria Private _connString As String Private _dbName As String Private _tableName As String Public ReadOnly Property TableName() As String Get Return _tableName End Get End Property Public ReadOnly Property DbName() As String Get Return _dbName End Get End Property Public ReadOnly Property ConnectionString() As String Get Return _connString End Get End Property Public Sub New(ByVal log As Cls_Login, ByVal dbName As String, ByVal tablename As String) _connString = "Persist Security Info=False;database=" & dbName & ";server=" & log.Server & ";user id=" & log.UserName & ";Password=" & log.Pass _dbName = dbName _tableName = tablename End Sub End Class Private Shared Function FetchObject(ByVal crit As criteria) As Cls_FieldInfoList Dim obj As New Cls_FieldInfoList Using cn As New MySqlConnection(crit.ConnectionString) cn.Open() Using cm As MySqlCommand = cn.CreateCommand With cm .CommandType = CommandType.Text .CommandText = "describe " & crit.TableName Using dr As MySqlDataReader = cm.ExecuteReader While dr.Read obj.Add(Cls_FieldInfo.GetDatabases(dr)) End While End Using End With End Using End Using Return obj End Function #End Region End Class
2. Kode Program FieldInfo Public Class Cls_FieldInfo #Region " Business Object " Private _fieldName As String Private _type As String Private _null As Boolean Private _key As Boolean Private _default As String Private _isDefault As Boolean = False Public ReadOnly Property FieldName() As String Get Return _fieldName End Get End Property Public ReadOnly Property Type() As String Get Return _type End Get End Property Public ReadOnly Property Null() As Boolean Get Return _null End Get End Property Public ReadOnly Property Key() As Boolean Get Return _key End Get End Property Public ReadOnly Property FieldDefault() As String Get Return _default End Get End Property Public ReadOnly Property IsDefault() As Boolean Get Return _isDefault End Get End Property #End Region #Region " Factory Methods " Public Shared Function GetDatabases(ByVal dr As MySqlDataReader) As Cls_FieldInfo Return New Cls_FieldInfo(dr) End Function Private Sub New(ByVal dr As MySqlDataReader) With dr _fieldName = CType(.Item("field"), String) _type = CType(.Item("type"), String) If CType(.Item("null"), String) = "YES" Then _null = True Else _null = False End If If CType(.Item("key"), String) = "PRI" Then
_key = True Else _key = False End If If Not IsDBNull(.Item("Default")) Then _default = CType(.Item("Default"), String) _isDefault = True End If End With End Sub #End Region End Class
Kode Program untuk Proses Pembentukan Query Public Class Cls_ExecuteQuery #Region " Business Object " Private _login As Cls_Login Private _dbName As String Private _queryString As String Private _queryResult As New DataTable Private _massageResult As Integer Private _queryMassage As String Private _typeExecute As TypeProses Public WriteOnly Property Login() As Cls_Login Set(ByVal value As Cls_Login) _login = value End Set End Property Public Property QueryString() As String Get Return _queryString End Get Set(ByVal value As String) _queryString = value End Set End Property Public ReadOnly Property QueryResult() As DataTable Get Return _queryResult End Get End Property Public ReadOnly Property MassageResult() As Integer Get Return _massageResult End Get End Property Public WriteOnly Property QueryMassage() As String Set(ByVal value As String) _queryMassage = value End Set End Property Public WriteOnly Property TypeExecute() As TypeProses Set(ByVal value As TypeProses) _typeExecute = value End Set End Property
Public WriteOnly Property DbName() As String Set(ByVal value As String) _dbName = value End Set End Property #End Region #Region " Factory Object " Public Shared Function NewObject() As Cls_ExecuteQuery Dim obj As New Cls_ExecuteQuery Return obj End Function Public Sub ExecuteQuery() Select Case _typeExecute Case TypeProses.SELECT_TYPE ExecuteSelectData() Case TypeProses.INSERT_TYPE ExecuteNoSelectData() Case TypeProses.UPDATE_TYPE ExecuteNoSelectData() Case TypeProses.DELETE_TYPE ExecuteNoSelectData() End Select End Sub Public Sub ExecuteMassage() ExecuteQueryMassage() End Sub #End Region #Region " Data Acces " Private Sub ExecuteSelectData() Dim connstring As String = "Persist Security Info=False;database=" & _dbName & ";server=" & _login.Server & ";user id=" & _login.UserName & ";Password=" & _login.Pass Using cn As New MySqlConnection(connstring) cn.Open() Using cm As MySqlCommand = cn.CreateCommand With cm .CommandType = CommandType.Text .CommandText = _queryString Dim da As New MySqlDataAdapter(cm) da.Fill(_queryResult) End With End Using End Using End Sub Private Sub ExecuteNoSelectData() Dim connstring As String = "Persist Security Info=False;database=" & _dbName & ";server=" & _login.Server & ";user id=" & _login.UserName & ";Password=" & _login.Pass Using cn As New MySqlConnection(connstring) cn.Open() Using cm As MySqlCommand = cn.CreateCommand With cm .CommandType = CommandType.Text .CommandText = _queryString .ExecuteNonQuery()
End With End Using End Using End Sub Private Sub ExecuteQueryMassage() Dim connstring As String = "Persist Security Info=False;database=" & _dbName & ";server=" & _login.Server & ";user id=" & _login.UserName & ";Password=" & _login.Pass Using cn As New MySqlConnection(connstring) cn.Open() Using cm As MySqlCommand = cn.CreateCommand With cm .CommandType = CommandType.Text .CommandText = _queryString Using dr As MySqlDataReader = cm.ExecuteReader If dr.Read Then _massageResult = CType(dr.Item("count"), Integer) End If End Using End With End Using End Using End Sub #End Region End Class
Public Class Cls_QueryObject #Region " Business Object " Private _table As Cls_TableAddLineList = Cls_TableAddLineList.NewObject Public ReadOnly Property Table() As Cls_TableAddLineList Get Return _table End Get End Property #End Region #Region " Factory Methods " Public Shared Function NewObject() As Cls_QueryObject Return New Cls_QueryObject End Function Private Sub New() End Sub #End Region End Class