Sie sind auf Seite 1von 16

Assignment on

SQL server database creation and visual basic form create

Submitted to –
Mr. Md. Golam Kibria
Lecturer, MIS
School of Business
Independent University, Bangladesh (IUB)

Submitted by –

Shafiqul Islam Shuvo 1410595


Touhid Hossain 1210634
Hassan Imam Bhuiyan 1522048

Submission date: 28-11-2017


Letter of Transmittal
nd
Date: 20 November, 2017

To

Mr. Md. Golam Kibria


Lecturer, Management Information System,
School of Business
Independent University, Bangladesh (IUB)
Bashundhara, Dhaka
Subject: SQL server database creation and visual basic form create
Dear Sir,

With due respect, it is our pleasure and honor to be your students and have the opportunity to
present this report. While preparing this report, we have tried our level best to focus thoroughly
on the topic. We provided all relevant information and we believe and hope, that our report will
provide a clear idea about SQL server database creation and visual basic form create

While preparing the report, we all have given our best to accumulate needed information and we
will be available to answer any question for clarification. Thank you for all your help and
support.

Sincerely yours,

Shafiqul Islam Shuvo 1410595


Touhid Hossain 1210634
Hassan Imam Bhuiyan 1522048

i
TABLE OF CONTENTS

Contents
Letter of Transmittal ................................................................................................................................... i
TABLE OF CONTENTS ........................................................................................................................... 1
Acknowledgement ........................................................................................................................................ 2
Visual basic form create ............................................................................................................................. 3
Working process ....................................................................................................................................... 3
Now we show Form creation all the step ................................................................................................. 3
Codes......................................................................................................................................................... 4
Connection................................................................................................................................................ 7
Microsoft SQL Server-2012 ....................................................................................................................... 8
Some of the Most Important SQL Commands ........................................................................................ 12
Quarry ..................................................................................................................................................... 13
ER DIAGRAM .......................................................................................................................................... 14
Relation between all the table .................................................................................................................. 14

1
Acknowledgement

In performing our assignment, we had to take the help and guideline of our respected faculty,
who deserve our greatest gratitude. The completion of this assignment gives us much pleasure.

We would like to show our gratitude, Mr. Md. Golam Kibria, Independent University
Bangladesh for giving us a good guideline for the assignment throughout numerous
consultations.
We would also like to expand our deepest gratitude to all those who have directly and indirectly
guided us in writing this assignment.

Many people, especially our team members, have made valuable comment suggestions on this
proposal which gave us an inspiration to improve our assignment. We thank all the people for
their help directly and indirectly to complete our assignment.

2
Visual basic form create
We are use visual basic 2008 Express edition

Figure 1.1

Working process
We work with Airlines database creation. We use visual basic to create the database data input
from.

Now we show Form creation all the step


In Figure 1.1 show the interface Click on Create project

Figure 1.2

3
We got figure 1.2 interface select windows application form. Give a name “Home” and click ok.

Figure 1.3
We got our 1st form and click on Project then click add windows application form we got our
2nd form and the same way we take 4 more form and we got total 6 form. I
In 1st form we add 6 Button
One is home which nom key and other 5 button link with 5 other is from

Codes
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button1.Click

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button2.Click
Form2.ShowDialog()
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button3.Click
Form3.ShowDialog()
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button4.Click

4
Form4.ShowDialog()
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button5.Click
Form5.ShowDialog()
End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button6.Click
Form6.ShowDialog()
End Sub
End Class

Wright down this code in the panel and link with all the from

Figure 1.4
We give the name the button show on figure 1.4
Then we start work on other 5 form to make the database form
2nd form we design as like figure 1.5

5
Figure 1.5
And the code is wright down in the save button
Public Class Form2

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button1.Click
Try
cmd.CommandType = System.Data.CommandType.Text
cmd.CommandText = " Insert Into Department Values ('" & TextBox1.Text & "', '" & TextBox2.Text & "', '"
& TextBox3.Text & "')"

cmd.Connection = con
con.Open()

cmd.ExecuteNonQuery()
MsgBox("Successfull", MsgBoxStyle.Information, "Add")

con.Close()

Catch ex As Exception

MessageBox.Show(ex.Message)

End Try

TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""

End Sub
End Class

This is the code.

And the same process we make another 4 form

6
Connection
Connection with SQL server we use Module

Figure 1.6
Right click on the home then click add then click on module
Imports System.Data.SqlClient
Module Module1
Public Con As New SqlConnection("data source=localhost; initial catalog=Airline; integrated security=true")
Public cmd As New Data.SqlClient.SqlCommand

End Module
This is the module code.

7
Microsoft SQL Server-2012

Figure 2.1
2.1 is the interface of SQL Server-2012

Figure 2.2

8
In figure 2.2 click the right button on database folder then click on new database

Figure 2.3
Wright down the database name “airlines” and click ok
Airlines database was created then we make 5 table on this database

9
Figure 2.4
In figure 2.4 we show how to go new table option click on that

Figure 2.5
We found this interface

10
Give the column name and data type
If its only text data type “Text”
If date data type “date”, if time type “time”, If number and text data type “varcher”,
If only number type “number”.
In this same process we make 5 table

Figure 2.6

Figure 2.7

11
Figure 2.8
Figure 2.6, 2.7, 2.8 we show the table creation and table data input

Some of the Most Important SQL Commands

 SELECT - extracts data from a database


 UPDATE - updates data in a database
 DELETE - deletes data from a database
 INSERT INTO - inserts new data into a database
 CREATE DATABASE - creates a new database
 ALTER DATABASE - modifies a database
 CREATE TABLE - creates a new table
 ALTER TABLE - modifies a table
 DROP TABLE - deletes a table
 CREATE INDEX - creates an index (search key)
 DROP INDEX - deletes an index

12
Quarry

Figure 2.9

Select Airplanename
From Airplane
that is a simple quarry for find Airplane name name.

13
ER DIAGRAM
Airport
Airport name
Flight
City F Time
State F Data

Destination airport

Price Customer
Name

Address

City
Airplane Phone Number
Airplane Name

City

Airport Code
Payment
Airplane Name

City

Airport Code

Relation between all the table


Airport and Airplane interrelated
Airport and Flight interrelated
Customer and Payment interrelated
Payment and Flight interrelated

14

Das könnte Ihnen auch gefallen