Writing long command lines could lead to errors. Please have a look to the section "Tips and tricks".
dbview.bat <Command selector> [parameters]
dbview.sh <Command selector> [parameters]
dbview.sh <Command selector> [parameters]
Command selector | Description |
---|---|
help | Print the general help. |
list‑db‑adaptors | Print the list of all available database adaptors. |
list‑table‑exporters | Print the list of all available exporters for tables. |
list‑soft‑key‑detectors | Print the list of all available soft foreign key detectors. |
profile‑list | Print the list of all profiles stored in the repository. |
help‑db‑adaptor | Print the help for a given database adaptor.
|
help‑table‑exporter |
Print the help for a given table exporter.
|
profile‑add |
Add a new profile to the profiles' repository.
Other parameters depend on the specific data source associated to the profile. Each data source has particularities (although data source configurations are very similar). To get the list of specific parameters for a given data source, you can print the help for this data source (see command selector "help‑db‑adaptor"). |
profile‑delete | Remove a profile from the profiles' repository.
|
profile‑show | Print a profile.
|
profile‑update | Update a profile.
|
export | Export the structure of a given data source into a given output format.
|
dbview.bat
dbview.sh
dbview.sh
Result:
dbview.bat list-db-adaptors
dbview.sh list-db-adaptors
dbview.sh list-db-adaptors
Result:
This means that this version en DbView supports MySql and PostgraSql.
dbview.bat list-table-exporters
dbview.sh list-table-exporters
dbview.sh list-table-exporters
Each exporter generates a specific representation. Please read this link.
Note: Please have a look to the following link.
dbview.bat profile-list
dbview.sh profile-list
dbview.sh profile-list
Note: Please have a look to the following link.
dbview.bat profile-add
dbview.sh profile-add
dbview.sh profile-add
Note: Please have a look to the following link.
dbview.bat profile-delete <name of the profile to delete>
dbview.sh profile-delete <name of the profile to delete>
dbview.sh profile-delete <name of the profile to delete>
Note: Please have a look to the following link.
dbview.bat profile-show <name of the profile to show>
dbview.sh profile-show <name of the profile to show>
dbview.sh profile-show <name of the profile to show>
Note: Please have a look to the following link.
dbview.bat profile-update <name of the profile> /One, or more, profile's parameter(s)/
dbview.sh profile-update <name of the profile> /One, or more, profile's parameter(s)/
dbview.sh profile-show profile-update <name of the profile> /One, or more, profile's parameter(s)/
dbview.bat export -exporter <name of the exporter> /exporter's configuration/ [-between <name of a table>,<name of a table> [-limit <maximum number of pathes to calculate>] | -zoom <comma separated list of tables> [-zoom-level <value>]] (-profile <profile's name> | -db-adaptor <name of the database adaptor> /adaptor's configuration/)
dbview.sh export -exporter <name of the exporter> /exporter's configuration/ [-between <name of a table>,<name of a table> [-limit <maximum number of pathes to calculate>] | -zoom <comma separated list of tables> [-zoom-level <value>]] (-profile <profile's name> | -db-adaptor <name of the database adaptor> /adaptor's configuration/)
dbview.sh export -exporter <name of the exporter> /exporter's configuration/ [-between <name of a table>,<name of a table> [-limit <maximum number of pathes to calculate>] | -zoom <comma separated list of tables> [-zoom-level <value>]] (-profile <profile's name> | -db-adaptor <name of the database adaptor> /adaptor's configuration/)
-exporter <name of the exporter> /exporter's configuration/
These parameters define the type of representation that will be generated. See the section "Database exporters".
-between <name of a table>,<name of a table> [-limit <maximum number of pathes to calculate>]
You can ask DbView to calculate the path(s) between two tables within the database. Please note that you may have several paths between two given tables. By default, if you do not specify the option "-limit" (this is equivalent to "-limit 1"), DbView calculates the shortest path. If you specify the option, then DbView calculates the two shortest paths, and so on.
Consider the following (MySql) database:
dbview.sh export -exporter dot-light -layout v -zoom Beginning,L1A,L1B,L1C,L2A,L2B,L2C,L3B,L3C,Arrival -db-adaptor mysql -host localhost -user root -password root -dbname mydb -port 8889 > graph.dot
dot -Tgif -Ograph graph.dot
Let’s calculate the shortest path between the tables "Beginning" and "Arrival".
dbview.sh export -exporter dot-light -layout h -between Beginning,Arrival -db-adaptor mysql -host localhost -user root -password root -dbname mydb -port 8889 > graph.dot
dot -Tgif -Ograph graph.dot
Let’s calculate the two shortest paths between the tables "Beginning" and "Arrival".
dbview.sh export -exporter dot-light -layout h -between Beginning,Arrival -limit 2 -db-adaptor mysql -host localhost -user root -password root -dbname mydb -port 8889 > graph.dot
dot -Tgif -Ograph graph.dot
You get two graphs. The previous graph and the following one:
You can zoom around some tables. This option is useful if you play with very big databases. Please note that you can specify a neighborhood area, by using the option "-zoom-level". By default, only the specified tables listed will the displayed (this is equivalent to -zoom-level 0).
Consider the following (MySql) database:
dbview.sh export -exporter dot-light -layout v -zoom t1,t2,t3,t4,t5,t6,t7,t8 -db-adaptor mysql -host localhost -user root -password root -dbname mydb -port 8889 > graph.dot
dot -Tgif -Ograph graph.dot
Let's print only the tables "t3" and "t6":
dbview.sh export -exporter dot-light -layout h -zoom t3,t6 -db-adaptor mysql -host localhost -user root -password root -dbname mydb -port 8889 > graph.dot
dot -Tgif -Ograph graph.dot
Let's include a neighborhood:
dbview.sh export -exporter dot-light -layout h -zoom t3,t6 -zoom-level 1 -db-adaptor mysql -host localhost -user root -password root -dbname mydb -port 8889 > graph.dot
dot -Tgif -Ograph graph.dot
By the way, you can get more details by choosing another exporter (here, we use "dot-full"):
dbview.sh export -exporter dot-full -layout h -zoom t3,t6 -db-adaptor mysql -host localhost -user root -password root -dbname mydb -port 8889 > graph.dot
dot -Tgif -Ograph graph.dot
In order to open a connexion to a database you need to provide parameters. You can specify the list of parameters through the command line. Or you can create a profile that holds the list of parameters.
Please read the section "profile".
In order to open a connexion to a database you need to provide parameters. One way to provide parameters is through the command line. In this case, you provide the name of the adaptor for the specific database you want to connect to, and you also give the list of required parameters for this adapter.
Please read the section "profile".