Obtaining a Database Schema
See Also
The IDE allows you to capture and create a persistent database schema which can then be
used in other projects.
To connect to a database to retrieve a schema, the database
driver first needs to be added to the IDE. Database drivers can be added in the Services window. For more,
see Adding a New Driver.
To capture a database schema:
- Make sure the database server is running.
- Choose File > New File to open the New File
wizard.
- Select the Project where the schema should be saved.
- Select Persistence in the Categories pane.
- Select Database Schema in the File Types pane and click Next.
- For File Name, provide a name for the schema.
- Click Browse to specify the folder where to save the schema.
The default location is src within the specified project. You can choose any other location for the schema file.
- Click Next.
- Select an existing database connection from the list or select New Database Connection
to create a new connection. For more information, see Connecting to a Database.
- Click Next.
You may be prompted by a Connect dialog box to supply a username and password to connect to the database, if required.
Enter the user name and password in the Basic setting tab and click OK.
- When connecting to the database, the schema with the same name as the user name is
set as default, but if a schema with that name does not exist,
you are automatically switched to the Advanced Tab to select a schema. Choose the correct schema
from the combobox and click OK.
- Select the tables and views you want to capture in the Available Tables
and Views list on the left, then click Add to add them to your list of Selected
Tables and Views on the right. Alternatively, you can click Add All to specify
all tables and views.
- If you specify a table that references a table that you
have not chosen to capture, both tables are captured.
- Click Finish to complete capturing the schema.
The IDE displays a progress window with information about the status of the
capturing of the database schema, including the table and view information
it is capturing.
When schema capturing is complete, the progress window closes.
The IDE saves the captured schema in XML format.
The schema node (
)
is visible in the Projects window.
- See Also
- Recapturing Schema From a Database
- Connecting to a Database
Legal Notices