The graphical database design editor in DatabaseSpy lets you view, create, and edit the structures of all your databases through one graphical user interface. You can examine tables and relationships in an existing database to understand them more easily, you can edit existing database tables to better suit your needs, or you can add entire tables and specify all their column attributes and relationships to other tables from scratch.
This unique graphical view allows you to concentrate on the underlying structure of your data and any required modifications rather than the SQL commands required to implement them. As you work, the graphical database designer automatically constructs the SQL statements you will need — but you choose when to execute the database structure change script once all your edits are complete.
Unlike other tools, DatabaseSpy supports all major databases in a single version and automatically adjusts contents of pull-down lists of data types and other specialized features.
The graphical schema design tools in DatabaseSpy make it easy to create new tables with multiple columns, keys, and indexes. You can even define relationships to other tables, based on foreign keys.
Based on your graphical definition, DatabaseSpy then generates the corresponding DDL scripts for creating tables. This is especially helpful for users who prefer visual database design but need DDL scripts for deployment.
You can even use the built-in AI Assistant to generate tables and create table relations.
You can view the structure of any existing table in your database by dragging it from the database browser into the database design pane or by selecting it and choosing Show in Design Editor from the context menu. The table and column details are immediately displayed in the database designer graphical view.
The graphical image of each table includes compartments you can expand to view in greater detail or collapse so you can concentrate on table relationships, which are clearly indicated with connecting lines.
You can edit table column names and attributes directly in the graphical table display, or add a new column, index, key, or constraint by clicking icons, or via a right-click context menu. You can also edit existing entries directly in the design window or in the properties helper window.
Then, DatabaseSpy can generate a DLL script to alter or drop tables, views, indexes, and other objects.
As you design your database schema and tables, DatabaseSpy automatically creates and updates the SQL statements required to implement your changes.
The SQL change scripts may include DDL statements to create or alter database structures, as well as SQL statements for modifying data. This approach lets you handle both schema and data changes in a single, cohesive script, allowing for efficient versioning and deployment of updates across database environments.
You can review the SQL statements directly in the change script window, paste them into a new SQL Editor window, or save the script to a file. You can also execute the script directly or discard your changes if you wish.
DatabaseSpy enables you to generate DDL (Data Definition Language) statements for all objects of a database or schema, as one SQL script. You can also generate DDL scripts for multiple schemas or databases in the same operation.
Generating the complete DDL scripts of a database or schema may be useful, for example, if you want to re-create the structure of that schema or database on another server or environment, or if you want to back up the current database structure, or if you want to create a text snapshot of the current database structure for comparing it later to another snapshot.
DatabaseSpy includes a command to create complete DDL scripts for a database schema, including all views, constraints, indexes, functions, procedures, etc., that are defined in the database.
Right-clicking any database schema in the Online Browser helper window offers the DDL Script command.
When you run the Complete DDL Script command for a single schema or database, DatabaseSpy analyzes all objects (such as tables, views, stored procedures, and so on), and then generates their corresponding DDL statements as a single script, in a new SQL Editor window. If multiple schemas or multiple databases were selected, the DDL script of each schema or database will be in a new SQL Editor window.
The script(s) are then immediately opened for review in a new SQL Editor window, where you can save it to a file.