generalization in Er diagram
Submitted by crimica on Mon, 02/25/2013 - 05:20
Hi,
i have to implement a generalization in a er diagram like this(for example):
http://andrewbelson.wordpress.com/2012/12/05/generalizationinheritance-w...
is it possible with Graphviz?I'haven't found any suggestion on how to create a generalization.
Thank you!
Recent comments
- No, 2.28 is a release
1 day 9 hours ago - Ok finaly i have time to test
1 day 14 hours ago - Well, there should be an
4 days 1 hour ago - Sorry, yes, the parallel edge
4 days 2 hours ago - I want more and more ...
6 days 2 hours ago - Graphviz provides a small
6 days 14 hours ago - Actually, we have been
1 week 10 hours ago - What machine are you running
1 week 1 day ago - Graphviz is a collection of
1 week 1 day ago - Thanks. I tried running it
1 week 2 days ago

it you need other information, please let me know
it you need other information, please let me know. It is important for me to solve this problem. Thank you
sorry
if i've sent two answer,I'm not familiar with this site.
There is nothing built into
There is nothing built into Graphviz to do it automatically. You can encode this using something like:
digraph {
{rank=same node[shape=point width=0.005 ] x -> y -> z [dir=none] }
node [shape=box]
Employee -> y [dir=back arrowtail=onormal]
x -> Supervisor [dir=none]
z -> SalesAssistant [dir=none]
}
thank you but it doesn't work
I have a situation like this:
graph ER {
node [shape=box]; customer; client; socialBeing; order;
node [shape=ellipse]; a; b; c; d; e; f; g;
node [shape=diamond,style=filled,color=lightgrey];"complete";
socialBeing -- a;
socialBeing -- b;
customer-- c;
customer -- d;
client -- e;
client -- f;
order -- g;
"complete" -- socialBeing [label="1-10" len=1.00];
order -- "complete" [label="1-1" len=1.00];
}
then I write your code:
digraph {
{rank=same node[shape=point width=0.005 ] x -> y -> z [dir=none] }
node [shape=box]
socialBeing -> y [dir=back arrowtail=onormal]
x -> customer [dir=none]
z -> client[dir=none]
}
but it has been overlooked and it doesn't appear in er diagram.
Please, help me. Thank you
It doesn't work :(
Hi,
thank you for your answerbut it desn't work.
I have create a er diagram with:
graph ER {..... }
and then I encode your code without success :( It doesn't appear in diagram. Do you have other suggestions?
Thank you very much
The code I showed was a
The code I showed was a template that would need to be inserted into your graph. I don't know precisely what you are after, but here is one approach.
graph ER {
node [shape=box]; customer; client; socialBeing; order;
node [shape=ellipse]; a; b; c; d; e; f; g;
node [shape=diamond,style=filled,color=lightgrey];"complete";
socialBeing -- a;
socialBeing -- b;
customer-- c;
customer -- d;
client -- e;
client -- f;
order -- g;
"complete" -- socialBeing [label="1-10" len=1.00];
order -- "complete" [label="1-1" len=1.00];
{rank=same node[shape=point width=0.005 ] x -- y -- z }
node [shape=box]
socialBeing -- y [dir=back arrowtail=onormal]
x -- customer
z -- client
}
could you give me another suggestion, please
In my er diagram has two generalizations. The first one is that:
{rank=same node[shape=point width=0.005 ]
x25 -- t25 -- z25 }node [shape=box]
socialBeing -- t25 [dir=back arrowtail=onormal color=black]
x25 -- customer
z25 -- client
and the second one is:
{rank=same node[shape=point width=0.005 ]
x22 -- t22 -- z22 }node [shape=box]
goods -- t22 [dir=back arrowtail=onormal color=black splines=ortho]
x22 -- produce
z22 -- product
Why the second has curved and long lines?Could I improve er diagram?
COuld you help me?
This is the global code:
graph ER {
node [shape=box]; customer; client; socialBeing; order; produce; fruitvegetable; packaged; price; product; goods; producer; category;
node [shape=ellipse]; {node [label="via"] via2; via1; }
{node [label="n_civico"] n_civico2; n_civico1; }
{node [label="provincia"] provincia2; provincia1; }
{node [label="citta"] citta3; citta2; citta1; }
{node [label="indirizzo"] indirizzo2; indirizzo1; }
{node [label="email"] email2; email1; }
{node [label="codice_articolo"] codice_articolo2; codice_articolo1; }
{node [label="giacenza_ortofrutta"] giacenza_ortofrutta2; giacenza_ortofrutta1; }
{node [label="immagine"] immagine2; immagine1; }
{node [label="prezzo"] prezzo2; prezzo1; }
{node [label="descrizione"] descrizione2; descrizione1; }
id_goods; id_socialBeing; id_order; nome_cat; logo; marchio; altezza; id_prodotto; importo; data_ordine; tipo_pagamento; prezzo_vendita_kg; data_prezzo; codice_prezzo; livello; giacenza_imballaggio; tipologia; giacenza_prodotto; nome_prodotto; codice_prodotto; data_ordine_vendita; cognome; nome; cod_fiscale; nickname; nazione; partita_iva; codice_cliente;
node [shape=diamond,style=filled,color=lightgrey];"complete"; "detail"; "production"; "membership"; "assignment"; "consistof"; "include";
goods -- id_goods;
socialBeing -- id_socialBeing;
order -- id_order;
category -- nome_cat;
producer -- logo;
producer -- marchio;
product -- altezza;
product -- id_prodotto;
order -- importo;
order -- data_ordine;
order -- tipo_pagamento;
price -- prezzo_vendita_kg;
price -- data_prezzo;
price -- codice_prezzo;
packaged -- livello;
packaged -- giacenza_imballaggio;
fruitvegetable -- tipologia;
produce -- giacenza_prodotto;
produce -- nome_prodotto;
produce -- codice_prodotto;
order -- data_ordine_vendita;
socialBeing -- cognome;
socialBeing -- nome;
client -- cod_fiscale;
client -- nickname;
customer -- nazione;
customer -- partita_iva;
customer -- codice_cliente;
customer -- via2;
order -- via1;
customer -- n_civico2;
order -- n_civico1;
customer -- provincia2;
order -- provincia1;
client -- citta3;
order -- citta2;
producer -- citta1;
client -- indirizzo2;
producer -- indirizzo1;
socialBeing -- email2;
producer -- email1;
fruitvegetable -- codice_articolo2;
packaged -- codice_articolo1;
fruitvegetable -- giacenza_ortofrutta2;
category -- giacenza_ortofrutta1;
fruitvegetable -- immagine2;
packaged -- immagine1;
packaged -- prezzo2;
product -- prezzo1;
product -- descrizione2;
category -- descrizione1;
"complete" -- socialBeing [label="1-n" len=1.00];
order -- "complete" [label="1-n" len=1.00];
"detail" -- goods [label="1-n" len=1.00];
order -- "detail" [label="0-n" len=1.00];
"production" -- product [label="1-1" len=1.00];
producer -- "production" [label="1-n" len=1.00];
"membership" -- product [label="1-1" len=1.00];
category -- "membership" [label="1-n" len=1.00];
"assignment" -- produce [label="1-n" len=1.00];
price -- "assignment" [label="0-1" len=1.00];
"consistof" -- produce [label="1-1" len=1.00];
packaged -- "consistof" [label="0-1" len=1.00];
"include" -- produce [label="1-1" len=1.00];
fruitvegetable -- "include" [label="1-1" len=1.00];
{rank=same node[shape=point width=0.005 ]
x25 -- t25 -- z25 }node [shape=box]
socialBeing -- t25 [dir=back arrowtail=onormal color=black]
x25 -- customer
z25 -- client
{rank=same node[shape=point width=0.005 ]
x22 -- t22 -- z22 }node [shape=box]
goods -- t22 [dir=back arrowtail=onormal color=black]
x22 -- produce
z22 -- product
}
thank you for helping