RSS

Using MySQL with C# (II): Creating a DB for programming

13 Jul

You might be interested in how to install MySQL in windows, check up this link for details.

  • Run MySQL workbench after clicking Finish

image_thumb[23]  image_thumb[24]

  • In the MySQL workbench, copy below scripts to create a new database called “MyBooks”:

create database MyBooks

  • Select the above script line, then click the thunder icon to execute the sql statement
  • A new DB is created, as shown in the left DB group:

image   image

  • Next create some table, using below scripts:

create table books
(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(30),
code VARCHAR(20),
isbn VARCHAR(20),
year INT,
PRIMARY KEY(id)
);

image  image

Now the DB and tables are ready. Next, let’s start programming mysql database.

 
1 Comment

Posted by on July 13, 2015 in Dotnet/C#, Programming

 

Tags: , , , , , ,

One response to “Using MySQL with C# (II): Creating a DB for programming

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: