0% found this document useful (0 votes)
1 views

03 - Creating Database

Uploaded by

Juan Dela Cruz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

03 - Creating Database

Uploaded by

Juan Dela Cruz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

CREATING DATABASE

1. Click the “Services” tab.

2. Expand the “Databases”.


3. Right-click on “MYSQL Server at localhost:3306 [root]”. Select “Create Database”.

4. (A) Type the name of the database as “studentDTB”. (B) Select “Grant Full Access To” (C) Click
the “OK” button.

The database URL will then be displayed.


5. Expand the database URL
“jdbc:mysql://localhost:3306/mystudentdtb?zeroDateTimeBehavior=CONVERT_TO_NULL [root
on Default schema]”

6. Expand the database “mystudentdtb”.

7. Right-click on the “Tables” folder. Select “Create Table”.


CREATING TABLE AND DEFINING TABLE STRUCTURE

1. Type the name of the table as “personal”.

2. Click the “Add Column” button.


3. Type “studentNo” for the Name of the field.

4. Select “varchar” for the type.


5. Type “100” for the Size. Click the “OK” button.

6. Click the “Add Column” button.


7. Type “lastName” for the Name of the field.

8. Select “varchar” for the type.


9. Type “100” for the Size. Click the “OK” button.

10. Click the “Add Column” button.


11. Type “firstName” for the Name of the field.

12. Select “varchar” for the type.


13. Type “100” for the Size. Click the “OK” button.

14. Click the “Add Column” button.


15. Type “address” for the Name of the field.

16. Select “varchar” for the type.


17. Type “100” for the Size. Click the “OK” button.

18. Click the “Add Column” button.


19. Type “contactNo” for the Name of the field.

20. Select “varchar” for the type.


21. Type “100” for the Size. Click the “OK” button.

22. The following is the final structure of your table. Click the “OK” button.
23. Expand the “Table” folder.

24. The table “personal” will then be displayed.


INSERTING RECORDS

1. Right-click on the “personal” table. Select “View Data”.

2. Click the “Insert Records” button.


3. Double-click under the field name to insert data.

4. To insert another record, click the “Add Row” button.


5. Click the “OK” button after you finish insering records.

6. The following will then be displayed on your screen.


EDITING RECORDS

1. Double-click the data you want to edit.

2. Type the necessary changes then press the “Enter” key.


DELETING RECORDS

1. Click the record number you want to delete.

2. Click the “Delete Selected Records” button.


3. Click the “Yes” button to delete the record.

You might also like