Heh, I'm a mathematician by training :)

Edge / vertex are used in the sense of graph theory. So its a network where
each edge has a certain capacity and a certain length. Like, for example, a
network of water pipes. Of course, it doesn't do any useful computations its
meant to be merely illustrative.

I know its not a very good example. But I was tryng to steer clear of the
very "typical" kinds of examples used for business computing.....

----- Original Message -----
From: "Boring, Jeff W, ALBAS" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, September 28, 2002 3:22 AM
Subject: [Hibernate] Network Demo


> Could someone explain the objects and tables. I really don not understand
the problem domain. How is vertex used here - math (The point at which the
sides of an angle intersect), Astronomy (The highest point reached in the
apparent motion of a celestial body), or Anatomy (The highest point of the
skull)? None of these jive with "sink" or "source." Also, why does the edge
table below need foreign keys to vertex?
>
> Thanks much,
>
> ----------------------------------------------------------------- TABLES
> create table vertex (
> creationDate DATE,
> name VARCHAR(50) not null unique,
> strength FLOAT,
> version_number INTEGER not null,
> vertex_id BIGINT not null,
> vertex_type VARCHAR(255) not null,
> primary key (vertex_id))
>
> create table edge (
> creationDate DATE,
> edge_cpcty FLOAT,
> edge_id BIGINT not null,
> edge_length FLOAT,
> name VARCHAR(50) not null unique,
> sink BIGINT not null,
> source BIGINT not null,
> primary key (edge_id))
>
> alter table edge add constraint
> edgeFK1 foreign key (sink) references vertex
>
> alter table edge add constraint
> edgeFK0 foreign key (source) references vertex
>
> create table hibernate_unique_key ( next_hi INTEGER )
>
> insert into hibernate_unique_key values ( 0 )
> -----------------------------------------------------------------
>
> ----------------------------------------------------------------- Classes
> public class Edge {
> private float length;
> private String name;
> private float capacity;
> private Vertex source;
> private Vertex sink;
> private long key;
> private Date creationDate = new Date();
> }
> public class Vertex {
> private Set incoming = new HashSet();
> private Set outgoing = new HashSet();
> private String name;
> private long key;
> private int version;
> private Date creationDate = new Date();
> }
> public class Source extends Vertex {
> private float strength;
> }
> -----------------------------------------------------------------
>
> Jeff Boring
> Custom & Web Services Development
> AT&T Labs
> [EMAIL PROTECTED]
> (813) 878-3367
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> hibernate-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to