 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Thu May 17, 2007 6:10 pm Post subject: Read (and Visualize) Database Schema |
|
|
Hi experts,
which approaches would you suggest for:
- Reading a database schema (tables, fields, relationships) from SQL
Server 2005?
- Visualizing the DB schema?
For developing a DB tool (Eclipse plug-in) the schema should be read
from the server and then be visualized, e.g. like the SQL Server BI
Development Studio does when importing the whole schema to a data
source view.
Any ideas or hints on how to start approaching this (either reading
schema and/or visualizing it) are welcome!
Regards,
Max |
|
| Back to top |
|
 |
Christian Guest
|
Posted: Thu May 17, 2007 6:19 pm Post subject: Re: Read (and Visualize) Database Schema |
|
|
send.me.all.email (AT) googlemail (DOT) com schrieb:
| Quote: | Hi experts,
which approaches would you suggest for:
- Reading a database schema (tables, fields, relationships) from SQL
Server 2005?
- Visualizing the DB schema?
For developing a DB tool (Eclipse plug-in) the schema should be read
from the server and then be visualized, e.g. like the SQL Server BI
Development Studio does when importing the whole schema to a data
source view.
Any ideas or hints on how to start approaching this (either reading
schema and/or visualizing it) are welcome!
Regards,
Max
Well visualization. How about doing it like an Entity-Relationship model... |
thats at least one Visulaization that comes to my mind .. may be you
want more..
Christian |
|
| Back to top |
|
 |
Guest
|
Posted: Fri May 18, 2007 5:44 pm Post subject: Re: Read (and Visualize) Database Schema |
|
|
On 17 Mai, 15:19, Christian <fakem...@xyz.de> wrote:
| Quote: | Well visualization. How about doing it like an Entity-Relationship model...
thats at least one Visulaization that comes to my mind .. may be you
want more..
|
No, in contrast, I want less. :-)
Generating an ER model based on a given database schema would require
some model transformation or reverse engineering approaches (e.g. to
decide if a concrete relation could have been introduced to realize a
weak entity or a multivalued attribute).
The kind of visualization I have in mind is just an easy to understand
graphical 1:1 representation of the schema. Something like: Tables are
depicted as boxes, containing the fields of the table as rows showing
the name and type of the field. Fields acting as primary or foreign
keys are specially marked. Relationships between tables are depicted
as lines connecting the tables. If the name of a relationship and the
cardinality information are given, then these should also be included
as labels to the relationship lines. The visualization of the database
schema should then allow the user to select tables by clicking on them
and perform basic operations on them.
So this should be no rocket sience, but as I never built such a tool
before, I'm quite interested in what is the current state-of-the-art-
approach to do this. Building an Eclipse-PlugIn using EMF? Which
frameworks to use to minimize the development effort?
Any ideas?
Regards,
Max |
|
| Back to top |
|
 |
Martin Gregorie Guest
|
Posted: Fri May 18, 2007 6:53 pm Post subject: Re: Read (and Visualize) Database Schema |
|
|
send.me.all.email (AT) googlemail (DOT) com wrote:
| Quote: | On 17 Mai, 15:19, Christian <fakem...@xyz.de> wrote:
Well visualization. How about doing it like an Entity-Relationship model...
thats at least one Visulaization that comes to my mind .. may be you
want more..
No, in contrast, I want less. :-)
Generating an ER model based on a given database schema would require
some model transformation or reverse engineering approaches (e.g. to
decide if a concrete relation could have been introduced to realize a
weak entity or a multivalued attribute).
The kind of visualization I have in mind is just an easy to understand
graphical 1:1 representation of the schema. Something like: Tables are
depicted as boxes, containing the fields of the table as rows showing
the name and type of the field. Fields acting as primary or foreign
keys are specially marked. Relationships between tables are depicted
as lines connecting the tables. If the name of a relationship and the
cardinality information are given, then these should also be included
as labels to the relationship lines. The visualization of the database
schema should then allow the user to select tables by clicking on them
and perform basic operations on them.
So this should be no rocket sience, but as I never built such a tool
before, I'm quite interested in what is the current state-of-the-art-
approach to do this. Building an Eclipse-PlugIn using EMF? Which
frameworks to use to minimize the development effort?
Any ideas?
As you say, this seems quite doable - the JDBC metadata retrieval |
functions should be able to return most of what you need, though you may
need to rethink the GUI. It may be enough of a problem to draw a
readable ER diagram (where E=table, R=fk) showing just the table names
from a decent sized schema and disentangling it so not to many
relationship lines cross could be quite difficult. You may want to show
table properties (columns, keys, indices, etc) only by clicking on a
table and the same for a relationship.
Are you familiar with the Embarcadero (http://www.embarcadero.com)
tools? If not you could do a lot worse that download an evaluation copy
or two. Some of their stuff may be what you need and failing that you'll
surely get some ideas by playing with it.
If you may find that automatically producing a schema diagram that isn't
a tangled mess is sufficiently difficult that the way to go is to let
the user drag objects around to make the diagram readable and then save
the result. On start-up it should be easy enough to compare the saved
model with the actual schema. If they are the same there's no problem:
just show the hand-modified version. If they differ you'll need to do
something about it: either replace the diagram entirely or just patch it
to match the schema, again letting the user change any tangled bits.
HTH
--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org | |
|
| Back to top |
|
 |
Mishagam Guest
|
Posted: Sat May 19, 2007 1:19 am Post subject: Re: Read (and Visualize) Database Schema |
|
|
send.me.all.email (AT) googlemail (DOT) com wrote:
| Quote: | On 17 Mai, 15:19, Christian <fakem...@xyz.de> wrote:
Well visualization. How about doing it like an Entity-Relationship model...
thats at least one Visulaization that comes to my mind .. may be you
want more..
No, in contrast, I want less. :-)
Generating an ER model based on a given database schema would require
some model transformation or reverse engineering approaches (e.g. to
decide if a concrete relation could have been introduced to realize a
weak entity or a multivalued attribute).
The kind of visualization I have in mind is just an easy to understand
graphical 1:1 representation of the schema. Something like: Tables are
depicted as boxes, containing the fields of the table as rows showing
the name and type of the field. Fields acting as primary or foreign
keys are specially marked. Relationships between tables are depicted
as lines connecting the tables. If the name of a relationship and the
cardinality information are given, then these should also be included
as labels to the relationship lines. The visualization of the database
schema should then allow the user to select tables by clicking on them
and perform basic operations on them.
So this should be no rocket sience, but as I never built such a tool
before, I'm quite interested in what is the current state-of-the-art-
approach to do this. Building an Eclipse-PlugIn using EMF? Which
frameworks to use to minimize the development effort?
Any ideas?
Regards,
Max
I believe I have seen Eclipse plugin doing just this - probably |
azzurri.clay. I played with it some time ago - you setup parameters like
database connection, user, password, database used - and it produces
picture or some structure with database schema. |
|
| Back to top |
|
 |
Guest
|
Posted: Mon May 21, 2007 2:52 am Post subject: Re: Read (and Visualize) Database Schema |
|
|
On 18 Mai, 15:53, Martin Gregorie <mar...@see.sig.for.address> wrote:
| Quote: | [...] showing just the table names from a decent sized schema and
disentangling it so not to many relationship lines cross could be
quite difficult.
|
Yes, you are addressing a very important point. Finding a framework
for just creating a visualization somehow is one thing. Getting a
neatly layouted schema representation is way more complex, if we
assume this framework doesn't offer ready to use layout algorithms
(layouter) right out of the box.
| Quote: | Are you familiar with the Embarcadero (http://www.embarcadero.com)
tools?
|
No, not yet, but a graphical representation and a layout like e.g.
http://www.embarcadero.com/news/product_photos/ERStudioOverview_HiRes.jpg
would be quite perfect.
| Quote: | If you may find that automatically producing a schema diagram that isn't
a tangled mess is sufficiently difficult that the way to go is to let
the user drag objects around to make the diagram readable and then save
the result.
|
This is quite a good solution if no layouter is available or the
effort of writing one, would be overkill. I think the approach you
describe should do it.
Now, the big question is: What framework should I base my tool
experiments on? Which framework is the current "state of the art" for
developing a design environment dealing with database schemas? Using
the Eclipse Modeling Framework (EMF) and start from scratch? Or are
they any sophisticated frameworks available, which could reduce the
development effort?
Regards,
Max |
|
| Back to top |
|
 |
Guest
|
Posted: Mon May 21, 2007 3:14 am Post subject: Re: Read (and Visualize) Database Schema |
|
|
On 18 Mai, 22:19, Mishagam <noem...@provider.com> wrote:
| Quote: | I believe I have seen Eclipse plugin doing just this - probably
azzurri.clay. I played with it some time ago - you setup parameters like
database connection, user, password, database used - and it produces
picture or some structure with database schema.
|
Yes, thanks for the hint. Azzurri Clay is able to "reverse engineer"
the schema of a concrete database and offers modeling in a visual
manner. Like e.g. depicted in:
http://www.azzurri.jp/en/software/clay/images/clay_eclipse_1.png
So now I'm interested in what frameworks are available to start
building my own visual modeling environment based on a concrete
database schema. Just read the database schema, visualize it and let
the user select some tables and perform some (nontrivial) operations
on it. What's the best framework to start with to minimite the
development effort? Any hints, ideas, approaches?
Regards,
Max |
|
| Back to top |
|
 |
Lew Guest
|
Posted: Mon May 21, 2007 7:10 am Post subject: Re: Read (and Visualize) Database Schema |
|
|
send.me.all.email (AT) googlemail (DOT) com wrote:
| Quote: | On 18 Mai, 22:19, Mishagam <noem...@provider.com> wrote:
I believe I have seen Eclipse plugin doing just this - probably
azzurri.clay. I played with it some time ago - you setup parameters like
database connection, user, password, database used - and it produces
picture or some structure with database schema.
Yes, thanks for the hint. Azzurri Clay is able to "reverse engineer"
the schema of a concrete database and offers modeling in a visual
manner. Like e.g. depicted in:
http://www.azzurri.jp/en/software/clay/images/clay_eclipse_1.png
So now I'm interested in what frameworks are available to start
building my own visual modeling environment based on a concrete
database schema. Just read the database schema, visualize it and let
the user select some tables and perform some (nontrivial) operations
on it. What's the best framework to start with to minimite the
development effort? Any hints, ideas, approaches?
|
Any chance you could set the followup on this thread to one newsgroup? I keep
reading the same posts again and again.
Which newsgroup best represents the issues of your inquiry?
--
Lew |
|
| Back to top |
|
 |
Sualeh Fatehi Guest
|
Posted: Mon May 21, 2007 4:51 pm Post subject: Re: Read (and Visualize) Database Schema |
|
|
Max,
- Reading a database schema (tables, fields, relationships) from SQL
Server 2005?
SchemaCrawler is an open-source project that produces a rational the
database metadata ojbect model. Take a look at http://www.devx.com/Java/Article/32443
SchemaCrawler can be downloaded from http://schemacrawler.sourceforge.net/
- Visualizing the DB schema?
SchemaCrawler comes with some dead-simple schema visualization
examples, using JUNG. You can build more elaborate visualization using
a good graphing library.
Sualeh. |
|
| Back to top |
|
 |
Guest
|
Posted: Tue May 22, 2007 1:55 am Post subject: Re: Read (and Visualize) Database Schema |
|
|
On 21 Mai, 05:59, Lew <l...@nospam.lewscanon.com> wrote:
| Quote: | Any chance you could set the followup on this thread to one newsgroup? I keep
reading the same posts again and again.
|
Please correct me, if I'm wrong, but I always thought that the message
I post should have one single unique ID if a proper crosspost is done
(in contrast to multicopying, i.e. copying a post to several groups).
If reading a certain message and this message becomes marked as read,
a proper newsreader should recognize this message in other groups and
show it correctly as already read. This should prevent reading a
single message multiple times in differnt groups. But if things have
changed, I'm willing to adjust my behaviour. :-)
| Quote: | Which newsgroup best represents the issues of your inquiry?
|
As it has something to do with databases and GUI development, I think
crossposting to comp.lang.java.databases and comp.lang.java.gui should
be enough.
Regards,
Max |
|
| Back to top |
|
 |
Lew Guest
|
Posted: Tue May 22, 2007 4:59 am Post subject: Re: Read (and Visualize) Database Schema |
|
|
send.me.all.email (AT) googlemail (DOT) com wrote:
| Quote: | On 21 Mai, 05:59, Lew <l...@nospam.lewscanon.com> wrote:
Any chance you could set the followup on this thread to one newsgroup? I keep
reading the same posts again and again.
Please correct me, if I'm wrong, but I always thought that the message
I post should have one single unique ID if a proper crosspost is done
(in contrast to multicopying, i.e. copying a post to several groups).
If reading a certain message and this message becomes marked as read,
a proper newsreader should recognize this message in other groups and
show it correctly as already read. This should prevent reading a
single message multiple times in differnt groups. But if things have
changed, I'm willing to adjust my behaviour.
|
You are partly right - you do have a single message "ID", but it shows up in
every group you cross-post to. Since I read most of them, I keep seeing the
same message in each group. Don't you? If not, then why cross-post?
I only asked because the thread has gone on for quite a while and I thought to
minimize the repetition. The choice is entirely yours.
--
Lew |
|
| Back to top |
|
 |
Lew Guest
|
Posted: Tue May 22, 2007 5:02 am Post subject: Re: Read (and Visualize) Database Schema |
|
|
send.me.all.email (AT) googlemail (DOT) com wrote:
| Quote: | On 21 Mai, 05:59, Lew <l...@nospam.lewscanon.com> wrote:
Any chance you could set the followup on this thread to one newsgroup? I keep
reading the same posts again and again.
Please correct me, if I'm wrong, but I always thought that the message
I post should have one single unique ID if a proper crosspost is done
(in contrast to multicopying, i.e. copying a post to several groups).
If reading a certain message and this message becomes marked as read,
a proper newsreader should recognize this message in other groups and
show it correctly as already read. This should prevent reading a
single message multiple times in differnt groups. But if things have
changed, I'm willing to adjust my behaviour. :-)
Which newsgroup best represents the issues of your inquiry?
As it has something to do with databases and GUI development, I think
crossposting to comp.lang.java.databases and comp.lang.java.gui should
be enough.
|
You are partly right - you do have a single message "ID", but it shows up in
every group you cross-post to. Since I read most of them, I keep seeing the
same message in each group.
I guess I don't have a "proper" newsreader by your lights, but it's always
been good enough for me.
I only asked because the thread has gone on for a while and I thought to
minimize the repetition. The choice is entirely yours.
--
Lew |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|