CreateDatabaseFromNetbeans

CREATING DATABASE USING NETBEANS


Actually,Netbeans 6.0 provide database service,Derby. Derby is the open source database being developed as part of the Apache DB Project.


1.To create a database from Netbeans is very easy. Select Tools > java DB Database > Create Database...as shown below: File:Picture1
2.You will see a window with caption "Create java DB database " .Fill the asked information in that as shown below for example. File:Picture2

Click OK button.
3.Right click on Databases>jdbc:derby://localhost:1527/mydb(scott on SCOTT),and click on connect to connect to database. File:Picture3

4.To create any table in your created database,right click on Tables and select "create table" as shown below: File:Picture4

5.you will be encountered with a "create table" window. Fill it as shown below for example: File:Picture5
6.To insert data into created table Right click on Tables>"name of table created"(here "employee") and select view data as shown below:
File:Picture6 7.SQL command editor will appear on the right side. write insert command as shown below for example:
File:Picture7 8.To execute your SQL command press Ctrl+Shift+E.You can see the execution details on output window as shown below:
File:Picture8

9.To view the data in the table, Right click on Tables>"name of table created"(here "employee") and select "view data" as shown below:

File:640 10.Select command will appear for that table. Also you can modify that command according to your needs.To execute your SQL command press Ctrl+Shift+E.You can watch the table under INS window as shown in picture below.
File:Picture10

FrontPage

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo