mjb@otter.hpl.hp.com (Michael Bright) (08/03/90)
Does anyone have any macros defined to allow the display of entity relationships? It would be nice to be able to specify something like that shown below to produce a diagram of boxes as shown. Excuse the syntax shown it probably shows my great misunderstanding of latex. -------------------------------------------------------------------------------- \begin{entity} \name Invoice \at{5,2} % top-left co-ordinates of box. \key\field{Invoice Number} \foreignkey\field{Customer Number} \field{Invoice Date} \field{Invoice Value} \end{entity} \begin{entity} \name Customer \at{5,22} % top-left co-ordinates of box. \key\field{Customer Number} \field{Customer Name} \field{Customer Credit} \end{entity} \relate11{Invoice}{Customer}{Is sent to} \relate11{Customer}{Invoice}{Has} % % with types: % % \relate01 % \relate0n % \relate11 % \relate1n % \relatenn % -------------------------------------------------------------------------------- +-----------------+ | Invoice | |-----------------| | | | Invoice# | | | | Customer# | | | | Date | | | | Value | | | +-----------------+ | 1 | | Has a | Is sent to | | | 1 +-----------------+ | Customer | |-----------------| | | | Customer# | | | | Name | | | | Credit | | | +-----------------+ Thanks, Mike. -------------------------------------------------------------------------------- E-Mail: mjb@hplb.hpl.hp.com || mjb@hplb.hp.co.uk || mjb@hplb.uucp In-Real-Life: Michael Bright Organisation: Hewlett-Packard Laboratories, Bristol Address: Filton Road, Stoke Gifford, Bristol, England, BS12 6QZ Telephone: [+44] [0]272 799910 x.24015 Home: 0272 500827