Creating Database Table by Database Diagram Using ...



Creating Databases Table by Database Diagram Using JDeveloper 10.g

Summary:

This tutorial aims to introduce how to create database tables by Database Diagram using JDeveloper 10g.

Requirement:

Oracle database account and knowing how to create a connection to database. (see website: )

1. Right click “Applications” to add the “New Application”

[pic]

2. Then you can see a dialog. Choose “Web Application (JSF, ADF, BC)” as the application template. Click “OK”.

[pic]

3. Right click on “Application3” and choose “New”.

[pic]

4. Open up the node of Business Tier, and choose “ADF Business Components”. Then you can see the right dialog will show an item called “Business Components Project”. Choose it and then click “ok”.

[pic]

5. Click “Next” for next two processes. Then press “Finish”.

[pic]

6. After clicking “Finish” on previous step, you can see a dialog for connecting your database. If you don’t see this dialog, you need to create a connection to database first. Read the tutorial for creating a connection in ORCAL tutorial website at

[pic]

7. Press “Next” for next 5 steps to setup your connection of database. Then press “Finish”.

[pic]

8. Right click on “Project1” and choose “New” option.

[pic]

9. Open up “Database Tier” and choose “Offline Database Objects”. Then click “Database Diagram” on the right dialog. Press “OK”

[pic]

10. Put a name on this dialog. Then press “OK”.

[pic]

11. In the Database Diagram, drag “Table” to the diagram, and name these tables as FACULTY and COURSE.

[pic]

12. Double click “FACULTY” table, and use “+” button to create three columns with the following properties.

Name Type

FACULTY_NO Number

FIRSTNAME VARCHAR2

LASTNAME VARCHAR2

[pic]

13. Then, click “Primary Key Information”, and choose FACULTY_NO as a primary key with “>”button. Press “OK”

[pic]

14. With the same step of 12, double click the table of “COURSE”, and input three columns with the following properties.

Name Type

COURSE_NO NUMBER

COURST_TITLE VARCHAR2

FACULTY_NO NUMBER

[pic]

15. Then click “Primary Key Information”, and choose COURSE_NO as a primary key with “>” button.

[pic]

16. Then, press the “Foreign Key Information”. Push “Add” button to add a foreign key, and choose FACULTY as “Referenced Table”, then choose “FACULTY_NO” as a Local Column. Press “OK”.

[pic]

17. Back to the diagram, you can see two tables have been setup

[pic]

18. Right click on FACULTY table; on the menu, you can see an option called “Generate”. Choose it and its next menu will show “Data Definition Language”. Press it and go next step.

[pic]

19. Press “Next” to start generate your tables in database.

[pic]

20. Then press ”>” to add COURSE to the right dialog. Push “Next”.

[pic]

21. Select “CREATE Objects. And click “Next”.

[pic]

22. Then press “Next” button twice to Step 4 of 4, and select “Perform Operation against the Database”. Then, click “Finish”

[pic]

23. After pushing “Finish” button, you will see a dialog shows a success message.

[pic]

24. Choose “Connections Navigator”, and open up “Tables”. You will see “FACULTY” and “COURSE” table have been created successfully.

[pic]

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download