initial commit

This commit is contained in:
Michael Schären 2026-04-19 14:50:00 +02:00
commit e2dd16b793
36 changed files with 24977 additions and 0 deletions

View File

@ -0,0 +1,965 @@
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/28.2.5 Chrome/138.0.7204.251 Electron/37.6.1 Safari/537.36" version="28.2.5">
<diagram name="Page-1" id="LcIpgzZ0pPKfpMyWdTyy">
<mxGraphModel dx="1522" dy="1943" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="fajgYWBjn6P_XPNBhK-K-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;endArrow=none;endFill=0;" parent="1" source="fajgYWBjn6P_XPNBhK-K-1" target="fajgYWBjn6P_XPNBhK-K-9" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="60" y="670" as="targetPoint" />
<Array as="points">
<mxPoint x="290" y="760" />
<mxPoint x="290" y="715" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;endFill=0;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-5" target="aLI5nJ7Lq4Vnoyky47xt-2" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-10" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="aLI5nJ7Lq4Vnoyky47xt-3" vertex="1" connectable="0">
<mxGeometry x="0.65" y="2" relative="1" as="geometry">
<mxPoint x="8" y="-3" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-55" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="fajgYWBjn6P_XPNBhK-K-1" target="fajgYWBjn6P_XPNBhK-K-6" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-56" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="fajgYWBjn6P_XPNBhK-K-1" target="fajgYWBjn6P_XPNBhK-K-7" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-57" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="fajgYWBjn6P_XPNBhK-K-1" target="fajgYWBjn6P_XPNBhK-K-8" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="fajgYWBjn6P_XPNBhK-K-1" value="Individual" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="740" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="fajgYWBjn6P_XPNBhK-K-6" value="fname" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="330" y="730" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="fajgYWBjn6P_XPNBhK-K-7" value="lname" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="330" y="781" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="fajgYWBjn6P_XPNBhK-K-8" value="birth_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="330" y="831" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="fajgYWBjn6P_XPNBhK-K-9" value="cust_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="330" y="681" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;endFill=0;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-2" target="aLI5nJ7Lq4Vnoyky47xt-16" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="60" y="540" />
<mxPoint x="60" y="320" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-2" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-2" target="aLI5nJ7Lq4Vnoyky47xt-17" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="60" y="540" />
<mxPoint x="60" y="370" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-3" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-2" target="aLI5nJ7Lq4Vnoyky47xt-19" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="60" y="540" />
<mxPoint x="60" y="420" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-4" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-2" target="aLI5nJ7Lq4Vnoyky47xt-18" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="60" y="540" />
<mxPoint x="60" y="470" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-5" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-2" target="aLI5nJ7Lq4Vnoyky47xt-20" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="60" y="540" />
<mxPoint x="60" y="520" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-45" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="0OrwQUruu8tLv63JVhKT-46" target="0OrwQUruu8tLv63JVhKT-44" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-50" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="0OrwQUruu8tLv63JVhKT-45" vertex="1" connectable="0">
<mxGeometry x="-0.0047" y="3" relative="1" as="geometry">
<mxPoint y="-13" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-2" value="Customer" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="520" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-8" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;endFill=0;" parent="1" source="fajgYWBjn6P_XPNBhK-K-1" target="aLI5nJ7Lq4Vnoyky47xt-5" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="200" y="400" as="sourcePoint" />
<mxPoint x="200" y="580" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-9" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="aLI5nJ7Lq4Vnoyky47xt-8" vertex="1" connectable="0">
<mxGeometry x="-0.6" relative="1" as="geometry">
<mxPoint x="10" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-12" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-5" target="0OrwQUruu8tLv63JVhKT-10" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-1" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="0OrwQUruu8tLv63JVhKT-12">
<mxGeometry x="0.8118" relative="1" as="geometry">
<mxPoint y="-10" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-5" value="is a" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="160" y="640" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-13" value="" style="endArrow=none;html=1;rounded=0;edgeStyle=orthogonalEdgeStyle;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-2" target="aLI5nJ7Lq4Vnoyky47xt-14" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="30" y="540" as="sourcePoint" />
<mxPoint x="20" y="450" as="targetPoint" />
<Array as="points">
<mxPoint x="60" y="540" />
<mxPoint x="60" y="220" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-14" value="cust_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="-80" y="200" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-15" value="fed_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-80" y="250" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-16" value="cust_type_cd" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-80" y="300" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-17" value="address" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-80" y="350" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-18" value="state" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-80" y="450" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-19" value="city" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-80" y="400" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-20" value="postal_code" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-80" y="500" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-22" value="" style="endArrow=none;html=1;rounded=0;edgeStyle=orthogonalEdgeStyle;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-2" target="aLI5nJ7Lq4Vnoyky47xt-15" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="190" y="600" as="sourcePoint" />
<mxPoint x="60" y="450" as="targetPoint" />
<Array as="points">
<mxPoint x="60" y="540" />
<mxPoint x="60" y="270" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-22" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="0OrwQUruu8tLv63JVhKT-23" target="0OrwQUruu8tLv63JVhKT-21" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-28" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="0OrwQUruu8tLv63JVhKT-22" vertex="1" connectable="0">
<mxGeometry x="0.5556" y="-4" relative="1" as="geometry">
<mxPoint y="-14" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-58" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-10" target="0OrwQUruu8tLv63JVhKT-13" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-60" y="715" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-59" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-10" target="0OrwQUruu8tLv63JVhKT-15" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-60" y="765" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-60" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-10" target="0OrwQUruu8tLv63JVhKT-16" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-60" y="815" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-61" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-10" target="0OrwQUruu8tLv63JVhKT-17" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-60" y="865" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-10" value="Business" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-110" y="640" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-13" value="cust_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="-1" y="695" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-15" value="name" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-1" y="745" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-16" value="state_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-1" y="795" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-17" value="incorp_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-1" y="845" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-62" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-21" target="0OrwQUruu8tLv63JVhKT-32" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-63" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-21" target="0OrwQUruu8tLv63JVhKT-29" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-64" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-21" target="0OrwQUruu8tLv63JVhKT-30" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-65" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-21" target="0OrwQUruu8tLv63JVhKT-31" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-66" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-21" target="0OrwQUruu8tLv63JVhKT-33" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-67" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-21" target="0OrwQUruu8tLv63JVhKT-34" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-68" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-21" target="0OrwQUruu8tLv63JVhKT-35" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-21" value="Officer" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-410" y="640" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-24" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="0OrwQUruu8tLv63JVhKT-10" target="0OrwQUruu8tLv63JVhKT-23" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="-670" y="880" as="sourcePoint" />
<mxPoint x="-500" y="880" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-27" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="0OrwQUruu8tLv63JVhKT-24" vertex="1" connectable="0">
<mxGeometry x="-0.0667" y="-3" relative="1" as="geometry">
<mxPoint x="3" y="-13" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-23" value="has" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="-240" y="640" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-29" value="cust_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-500" y="780" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-30" value="fname" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-500" y="830" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-31" value="lname" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-500" y="880" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-32" value="officer_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="-500" y="730" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-33" value="title" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-500" y="930" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-34" value="start_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-500" y="980" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-35" value="end_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-500" y="1030" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-81" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="0OrwQUruu8tLv63JVhKT-82" target="0OrwQUruu8tLv63JVhKT-80" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-85" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="0OrwQUruu8tLv63JVhKT-81" vertex="1" connectable="0">
<mxGeometry x="0.1029" y="4" relative="1" as="geometry">
<mxPoint x="6" y="89" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-85" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-63" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="400" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-86" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-62" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="350" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-87" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-61" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="300" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-88" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-60" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="250" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-89" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-59" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="200" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-90" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-58" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="150" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-91" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-57" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="100" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-92" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-56" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="50" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-93" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-53" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-94" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-52" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="-50" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-95" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-51" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="-100" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-97" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="p0bx4gPseoiS8_Lzheli-96" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-119" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-97" vertex="1" connectable="0">
<mxGeometry x="-0.7778" y="2" relative="1" as="geometry">
<mxPoint x="-10" y="-8" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-120" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-97" vertex="1" connectable="0">
<mxGeometry x="0.7778" y="2" relative="1" as="geometry">
<mxPoint x="10" y="-8" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-124" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-125" target="p0bx4gPseoiS8_Lzheli-123" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-148" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-124" vertex="1" connectable="0">
<mxGeometry x="0.55" y="-1" relative="1" as="geometry">
<mxPoint x="9" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-44" value="Account" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="430" y="520" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-47" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-2" target="0OrwQUruu8tLv63JVhKT-46" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="250" y="540" as="sourcePoint" />
<mxPoint x="400" y="540" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-49" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="0OrwQUruu8tLv63JVhKT-47" vertex="1" connectable="0">
<mxGeometry x="-0.2412" y="-1" relative="1" as="geometry">
<mxPoint y="-11" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-46" value="owns" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="290" y="520" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-51" value="account_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="150" y="-120" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-52" value="product_cd" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="-70" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-53" value="cust_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="-20" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-56" value="open_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="30" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-57" value="close_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="80" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-58" value="last_activity_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="130" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-59" value="status" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="180" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-60" value="open_branch_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="230" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-61" value="open_emp_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="280" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-62" value="avail_balance" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="330" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-63" value="pending_balance" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="380" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-1" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1070" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-13" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-3" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1110" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-14" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-4" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1160" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-15" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-5" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1210" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-16" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-6" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1261" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-17" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-7" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1310" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-18" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-8" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1360" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-19" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-9" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1410" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-20" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-11" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1460" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-28" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-29" target="p0bx4gPseoiS8_Lzheli-27" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-32" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-28" vertex="1" connectable="0">
<mxGeometry x="0.1707" y="2" relative="1" as="geometry">
<mxPoint x="8" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-39" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-40" target="p0bx4gPseoiS8_Lzheli-38" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="680" y="850" />
<mxPoint x="680" y="850" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-84" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-39" vertex="1" connectable="0">
<mxGeometry x="0.6026" relative="1" as="geometry">
<mxPoint x="10" y="-7" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-80" value="Employee" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="460" y="1040" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-83" value="N" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;exitX=0.25;exitY=1;exitDx=0;exitDy=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-82" edge="1">
<mxGeometry x="-0.9273" y="-15" relative="1" as="geometry">
<mxPoint x="480" y="560" as="sourcePoint" />
<mxPoint x="480" y="690" as="targetPoint" />
<mxPoint as="offset" />
<Array as="points">
<mxPoint x="455" y="660" />
<mxPoint x="510" y="660" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-82" value="opens" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="470" y="780" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-1" value="emp_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="920" y="1040" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-3" value="fname" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="1090" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-4" value="lname" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="1140" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-5" value="start_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="1190" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-6" value="end_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="919" y="1241" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-7" value="superior_emp_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="1290" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-8" value="dept_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="1340" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-9" value="title" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="1390" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-11" value="assigned_branch_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="1440" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-24" value="N" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.174;entryY=-0.008;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;entryPerimeter=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-22" target="0OrwQUruu8tLv63JVhKT-80" edge="1">
<mxGeometry x="0.7777" y="-7" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-81" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.75;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-22" target="0OrwQUruu8tLv63JVhKT-80" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="370" y="1070" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-171" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-81" vertex="1" connectable="0">
<mxGeometry x="0.375" y="-2" relative="1" as="geometry">
<mxPoint x="28" y="-12" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-22" value="supervises" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="330" y="1000" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-36" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-27" target="p0bx4gPseoiS8_Lzheli-33" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-37" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-27" target="p0bx4gPseoiS8_Lzheli-35" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-27" value="Department" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="460" y="1201" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-30" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-29" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="510" y="1080" as="sourcePoint" />
<mxPoint x="510" y="1201" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-9" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="p0bx4gPseoiS8_Lzheli-30">
<mxGeometry x="-0.55" y="5" relative="1" as="geometry">
<mxPoint x="5" y="1" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-29" value="works in" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="470" y="1120" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-33" value="dept_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="400" y="1360" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-35" value="name" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="520" y="1360" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-43" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-38" target="p0bx4gPseoiS8_Lzheli-44" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-49" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-38" target="p0bx4gPseoiS8_Lzheli-45" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-50" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-38" target="p0bx4gPseoiS8_Lzheli-48" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-51" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-38" target="p0bx4gPseoiS8_Lzheli-47" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-52" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-38" target="p0bx4gPseoiS8_Lzheli-46" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-53" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-38" target="p0bx4gPseoiS8_Lzheli-42" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-38" value="Branch" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="630" y="795" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-41" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-40" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="460" y="1060" as="sourcePoint" />
<mxPoint x="230" y="1060" as="targetPoint" />
<Array as="points">
<mxPoint x="550" y="940" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-82" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-41" vertex="1" connectable="0">
<mxGeometry x="-0.8339" y="4" relative="1" as="geometry">
<mxPoint x="14" y="-4" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-40" value="assigns" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="640" y="920" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-42" value="branch_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="921" y="710" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-44" value="name" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="921" y="760" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-45" value="address" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="921" y="810" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-46" value="city" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="921" y="860" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-47" value="state" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="911" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-48" value="zip" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="921" y="960" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-111" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-110" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-112" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-108" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-113" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-109" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-114" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-107" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-115" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-106" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-116" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-105" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-117" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-104" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-118" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-102" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="_Gp69ajdkHd3nP33if5o-11">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="790" y="680" />
<mxPoint x="1050" y="680" />
<mxPoint x="1050" y="1020" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-16" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="_Gp69ajdkHd3nP33if5o-13">
<mxGeometry x="-0.9616" y="5" relative="1" as="geometry">
<mxPoint x="5" y="-9" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-96" value="Transaction" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="710" y="520" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-98" value="has" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="580" y="520" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-99" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-100" target="p0bx4gPseoiS8_Lzheli-38" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-122" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-99" vertex="1" connectable="0">
<mxGeometry x="0.695" relative="1" as="geometry">
<mxPoint x="10" y="5" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-101" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0.375;entryDx=0;entryDy=0;entryPerimeter=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-100" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="760" y="560" as="sourcePoint" />
<mxPoint x="680" y="810" as="targetPoint" />
<Array as="points">
<mxPoint x="720" y="600" />
<mxPoint x="680" y="600" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-121" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-101" vertex="1" connectable="0">
<mxGeometry x="-0.8316" y="1" relative="1" as="geometry">
<mxPoint x="9" y="-6" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-100" value="executes" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="640" y="655" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-102" value="txn_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="919" y="270" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-104" value="txn_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="918" y="320" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-105" value="account_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="918" y="370" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-106" value="txn_type_cd" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="918" y="420" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-107" value="amount" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="918" y="470" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-108" value="teller_emp_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="918" y="520" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-109" value="execution_branch_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="570" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-110" value="funds_avail_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="620" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-133" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-123" target="p0bx4gPseoiS8_Lzheli-127" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-134" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-123" target="p0bx4gPseoiS8_Lzheli-130" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-135" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-123" target="p0bx4gPseoiS8_Lzheli-131" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-136" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-123" target="p0bx4gPseoiS8_Lzheli-132" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-137" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-123" target="p0bx4gPseoiS8_Lzheli-129" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-139" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-144" target="p0bx4gPseoiS8_Lzheli-138" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-146" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-139" vertex="1" connectable="0">
<mxGeometry x="0.55" y="-2" relative="1" as="geometry">
<mxPoint x="8" y="-4" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-123" value="Product" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="480" y="310" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-126" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="p0bx4gPseoiS8_Lzheli-125" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="480" y="520" as="sourcePoint" />
<mxPoint x="530" y="350" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-149" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-126" vertex="1" connectable="0">
<mxGeometry x="-0.7458" y="-4" relative="1" as="geometry">
<mxPoint x="6" y="5" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-125" value="defines" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="490" y="410" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-127" value="product_cd" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="680" y="240" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-129" value="name" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="680" y="290" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-130" value="product_type_cd" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="680" y="340" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-131" value="date_offered" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="680" y="390" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-132" value="date_retired" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="680" y="440" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-142" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-138" target="p0bx4gPseoiS8_Lzheli-141" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="650" y="120" />
<mxPoint x="650" y="120" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-143" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-138" target="p0bx4gPseoiS8_Lzheli-140" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-138" value="Product Type" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="480" y="100" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-140" value="product_type_cd" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="680" y="50" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-141" value="name" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="680" y="100" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-145" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-123" target="p0bx4gPseoiS8_Lzheli-144" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="530" y="310" as="sourcePoint" />
<mxPoint x="530" y="140" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-147" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-145" vertex="1" connectable="0">
<mxGeometry x="-0.4929" y="1" relative="1" as="geometry">
<mxPoint x="11" y="8" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-144" value="categorizes" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="490" y="200" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-152" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-151" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-60" y="1110" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-162" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-161" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-163" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-159" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-165" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-158" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-166" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-154" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-167" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-157" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-168" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-155" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-169" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-160" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-170" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-156" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-150" value="Person" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-110" y="1000" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-151" value="person_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="-200" y="1090" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-164" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-153" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="-60" y="1040" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-153" value="gender" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-20" y="1140" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-154" value="street" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-20" y="1190" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-155" value="state" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-20" y="1241" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-156" value="postal_code" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-20" y="1290" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-157" value="city" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-200" y="1241" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-158" value="birth_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-200" y="1190" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-159" value="lname" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-200" y="1140" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-160" value="country" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-200" y="1290" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-161" value="fname" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-20" y="1090" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-5" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="_Gp69ajdkHd3nP33if5o-3">
<mxGeometry relative="1" as="geometry">
<mxPoint x="480" y="560" as="sourcePoint" />
<mxPoint x="630" y="815" as="targetPoint" />
<Array as="points">
<mxPoint x="510" y="640" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-8" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="_Gp69ajdkHd3nP33if5o-5">
<mxGeometry x="-0.7091" y="-1" relative="1" as="geometry">
<mxPoint x="11" y="-6" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="_Gp69ajdkHd3nP33if5o-3" target="p0bx4gPseoiS8_Lzheli-38">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="580" y="815" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-7" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="_Gp69ajdkHd3nP33if5o-6">
<mxGeometry x="0.8341" y="2" relative="1" as="geometry">
<mxPoint y="-12" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-3" value="opened in" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="540" y="620" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.25;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="_Gp69ajdkHd3nP33if5o-11" target="0OrwQUruu8tLv63JVhKT-80">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-15" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="_Gp69ajdkHd3nP33if5o-14">
<mxGeometry x="0.8118" y="-2" relative="1" as="geometry">
<mxPoint x="4" y="-8" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-11" value="carries out" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="700" y="1000" width="80" height="40" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

10
.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,10 @@
# Default ignored files
/shelf/
/workspace.xml
# Ignored default folder with query files
/queries/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="$USER_HOME$/anaconda3" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

12
.idea/dataSources.xml generated Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="postgres@localhost" uuid="e1dddddf-a4bd-4327-84c2-f4c31c6f0bd2">
<driver-ref>postgresql</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
<jdbc-url>jdbc:postgresql://localhost:5432/postgres</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>

9
.idea/data_source_mapping.xml generated Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourcePerFileMappings">
<file url="file://$PROJECT_DIR$/ViewsundTrigger.sql" value="e1dddddf-a4bd-4327-84c2-f4c31c6f0bd2" />
<file url="file://$PROJECT_DIR$/create_movies.sql" value="e1dddddf-a4bd-4327-84c2-f4c31c6f0bd2" />
<file url="file://$PROJECT_DIR$/movies_data.sql" value="e1dddddf-a4bd-4327-84c2-f4c31c6f0bd2" />
<file url="file://$PROJECT_DIR$/postgreSQL_Vertiefung_CDS104_FS26.sql" value="e1dddddf-a4bd-4327-84c2-f4c31c6f0bd2" />
</component>
</project>

View File

@ -0,0 +1,17 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="false" level="WARNING" enabled_by_default="false">
<option name="ignoredPackages">
<list>
<option value="torch" />
<option value="transformers" />
<option value="sentence-transformers" />
<option value="scikit-learn" />
<option value="matplotlib" />
<option value="numpy" />
</list>
</option>
</inspection_tool>
</profile>
</component>

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

7
.idea/misc.xml generated Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.12" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="$USER_HOME$/anaconda3" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/cds-104 Datenbanken und Datenverarbeitung.iml" filepath="$PROJECT_DIR$/.idea/cds-104 Datenbanken und Datenverarbeitung.iml" />
</modules>
</component>
</project>

10
.idea/sqldialects.xml generated Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SqlDialectMappings">
<file url="file://$PROJECT_DIR$/ViewsundTrigger.sql" dialect="PostgreSQL" />
<file url="file://$PROJECT_DIR$/create_movies.sql" dialect="PostgreSQL" />
<file url="file://$PROJECT_DIR$/movies_data.sql" dialect="PostgreSQL" />
<file url="file://$PROJECT_DIR$/postgreSQL_Vertiefung_CDS104_FS26.sql" dialect="PostgreSQL" />
<file url="PROJECT" dialect="PostgreSQL" />
</component>
</project>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,265 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "b53d472a-14d4-42bb-a0ee-38eb8c9c24a8",
"metadata": {},
"source": [
"Zunächst muss ein Paket zur Anbindung installiert werden. Wir verwenden psycopg 2 (psycopg.org).\n",
"Dies kann über den Reiter \"Environment\" im Anaconda Navicator installiert werden.\n",
"Ist dies geschehen können wir das Paket importieren."
]
},
{
"cell_type": "code",
"execution_count": 26,
"id": "0d3fea87-d2a6-4da8-9327-4c08bb70ef9e",
"metadata": {},
"outputs": [],
"source": [
"import psycopg2, psycopg2.extras"
]
},
{
"cell_type": "markdown",
"id": "bedf4588-60dc-4169-9295-21f6b3317e9f",
"metadata": {},
"source": [
"Nun sind wir bereit, um eine Verbindung zur Datenbank aufzubauen. Nehmen wir zum Beispiel die \"bank\" Datenbank. Da wir die Installation local haben, muss keine URL angegeben werden. Dafür legen wir eine Variable mit dem connect Befehl an."
]
},
{
"cell_type": "code",
"execution_count": 27,
"id": "62b5a0b5-bafd-4125-8b62-4a2aa493a061",
"metadata": {},
"outputs": [],
"source": [
"conn = psycopg2.connect(\"dbname=bank host=/var/run/postgresql user=postgres password=sml12345\")"
]
},
{
"cell_type": "markdown",
"id": "8861806c-5786-42fb-81d3-1ba5283b1d2b",
"metadata": {},
"source": [
"Als nächstes führen wir eine einfache SELECT Abfrage aus.\n",
"Zunächst werden wir verbunden, dann stellen wir die Abfrage, dann rufen wir das Ergebnis der Abfrage ab und lassen es uns anzeigen.\n",
"Dazu benötigen wir ein cursor Objekt, das uns die Abfrage aber auch die Rücklieferung der Daten liefert. Dieses kommt in die Variable cursor.\n",
"Die Variable result speichert uns die Ergebnisse. fetchall wartet bis alle Ergebniszeilen geliefert sind und ermöglicht dann die Anzeige."
]
},
{
"cell_type": "code",
"execution_count": 28,
"id": "09dbc41c-0ed7-449a-853d-3a18fbb1d97e",
"metadata": {},
"outputs": [],
"source": [
"cursor = conn.cursor(cursor_factory=psycopg2.extras.DictCursor)\n",
"cursor.execute(\"SELECT * FROM account;\")\n",
"result = cursor.fetchall()"
]
},
{
"cell_type": "markdown",
"id": "81c22552-4d3c-4824-82c7-5b8a0c74402c",
"metadata": {},
"source": [
"Pro Klammer bekommen wir nun ein Tupel angezeigt. Das ist noch nicht so schön. Mit einer kleinen Schleife können wir uns die Tupel zeilenweise anzeigen lassen."
]
},
{
"cell_type": "code",
"execution_count": 29,
"id": "dba24620-fe85-4feb-8109-59a3d7c5e3b3",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1, 'CHK', 1, datetime.date(2000, 1, 15), None, datetime.date(2005, 1, 4), 'ACTIVE', 2, 10, 1057.75, 1057.75]\n",
"[2, 'SAV', 1, datetime.date(2000, 1, 15), None, datetime.date(2004, 12, 19), 'ACTIVE', 2, 10, 500.0, 500.0]\n",
"[3, 'CD', 1, datetime.date(2004, 6, 30), None, datetime.date(2004, 6, 30), 'ACTIVE', 2, 10, 3000.0, 3000.0]\n",
"[4, 'CHK', 2, datetime.date(2001, 3, 12), None, datetime.date(2004, 12, 27), 'ACTIVE', 2, 10, 2258.02, 2258.02]\n",
"[5, 'SAV', 2, datetime.date(2001, 3, 12), None, datetime.date(2004, 12, 11), 'ACTIVE', 2, 10, 200.0, 200.0]\n",
"[7, 'CHK', 3, datetime.date(2002, 11, 23), None, datetime.date(2004, 11, 30), 'ACTIVE', 3, 13, 1057.75, 1057.75]\n",
"[8, 'MM', 3, datetime.date(2002, 12, 15), None, datetime.date(2004, 12, 5), 'ACTIVE', 3, 13, 2212.5, 2212.5]\n",
"[10, 'CHK', 4, datetime.date(2003, 9, 12), None, datetime.date(2005, 1, 3), 'ACTIVE', 1, 1, 534.12, 534.12]\n",
"[11, 'SAV', 4, datetime.date(2000, 1, 15), None, datetime.date(2004, 10, 24), 'ACTIVE', 1, 1, 767.77, 767.77]\n",
"[12, 'MM', 4, datetime.date(2004, 9, 30), None, datetime.date(2004, 11, 11), 'ACTIVE', 1, 1, 5487.09, 5487.09]\n",
"[13, 'CHK', 5, datetime.date(2004, 1, 27), None, datetime.date(2005, 1, 5), 'ACTIVE', 4, 16, 2237.97, 2897.97]\n",
"[14, 'CHK', 6, datetime.date(2002, 8, 24), None, datetime.date(2004, 11, 29), 'ACTIVE', 1, 1, 122.37, 122.37]\n",
"[15, 'CD', 6, datetime.date(2004, 12, 28), None, datetime.date(2004, 12, 28), 'ACTIVE', 1, 1, 10000.0, 10000.0]\n",
"[17, 'CD', 7, datetime.date(2004, 1, 12), None, datetime.date(2004, 1, 12), 'ACTIVE', 2, 10, 5000.0, 5000.0]\n",
"[18, 'CHK', 8, datetime.date(2001, 5, 23), None, datetime.date(2005, 1, 3), 'ACTIVE', 4, 16, 3487.19, 3487.19]\n",
"[19, 'SAV', 8, datetime.date(2001, 5, 23), None, datetime.date(2004, 10, 12), 'ACTIVE', 4, 16, 387.99, 387.99]\n",
"[21, 'CHK', 9, datetime.date(2003, 7, 30), None, datetime.date(2004, 12, 15), 'ACTIVE', 1, 1, 125.67, 125.67]\n",
"[22, 'MM', 9, datetime.date(2004, 10, 28), None, datetime.date(2004, 10, 28), 'ACTIVE', 1, 1, 9345.55, 9845.55]\n",
"[23, 'CD', 9, datetime.date(2004, 6, 30), None, datetime.date(2004, 6, 30), 'ACTIVE', 1, 1, 1500.0, 1500.0]\n",
"[24, 'CHK', 10, datetime.date(2002, 9, 30), None, datetime.date(2004, 12, 15), 'ACTIVE', 4, 16, 23575.12, 23575.12]\n",
"[25, 'BUS', 10, datetime.date(2002, 10, 1), None, datetime.date(2004, 8, 28), 'ACTIVE', 4, 16, 0.0, 0.0]\n",
"[27, 'BUS', 11, datetime.date(2004, 3, 22), None, datetime.date(2004, 11, 14), 'ACTIVE', 2, 10, 9345.55, 9345.55]\n",
"[28, 'CHK', 12, datetime.date(2003, 7, 30), None, datetime.date(2004, 12, 15), 'ACTIVE', 4, 16, 38552.05, 38552.05]\n",
"[29, 'SBL', 13, datetime.date(2004, 2, 22), None, datetime.date(2004, 12, 17), 'ACTIVE', 3, 13, 50000.0, 50000.0]\n"
]
}
],
"source": [
"for entry in result:\n",
" print(entry)"
]
},
{
"cell_type": "markdown",
"id": "b975ba44-de7e-4337-a2f9-a4fa06fc59b1",
"metadata": {},
"source": [
"Wollen wir nur eine bestimmte Spalte geht dies über die Angabe der Spaltennummer."
]
},
{
"cell_type": "code",
"execution_count": 32,
"id": "6159012d-ea9c-44da-bec0-5d073d210bd3",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1057.75\n",
"500.0\n",
"3000.0\n",
"2258.02\n",
"200.0\n",
"1057.75\n",
"2212.5\n",
"534.12\n",
"767.77\n",
"5487.09\n",
"2237.97\n",
"122.37\n",
"10000.0\n",
"5000.0\n",
"3487.19\n",
"387.99\n",
"125.67\n",
"9345.55\n",
"1500.0\n",
"23575.12\n",
"0.0\n",
"9345.55\n",
"38552.05\n",
"50000.0\n"
]
}
],
"source": []
},
{
"cell_type": "markdown",
"id": "b3180855-e952-4d4a-86b5-a27c9d326f69",
"metadata": {},
"source": [
"Spaltennummern zählen ist nun etwas aufwendig und unschön. Mit einer Erweituerung des Pakets können wir den cursor anpassen und dann auch Spaltennamen angeben. Wir wählen psycopg2.extras und dann einen DictCursor."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "75b7a5c8-4677-4546-a461-e7b36b97ff5e",
"metadata": {},
"outputs": [],
"source": [
"for entry in result:\n",
" print(entry['avail_balance'])"
]
},
{
"cell_type": "markdown",
"id": "3b90228d-bbc6-40ca-bf18-abb698318603",
"metadata": {},
"source": [
"Problembehandlung Transaktion: Da wir Abfragen durchführen sollten wir diese auch korrekt starten und abschliessen. Vor allem wenn es zu einem Fehler (z.B. einem Tippfehler) kommt. Anosnten laufen wir auf eine Fehlermeldung und eine offen Transaktion.\n",
"Die Lösung ist unseren SQL Befehl in einen try, except bzw finally Block zu setzen.\n",
"MIt conn.commit() wird die Durchführung der Transaktion bestätigt."
]
},
{
"cell_type": "code",
"execution_count": 35,
"id": "2e24b6bb-4773-4652-b027-7ee4faf6db92",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1 1057.75\n",
"3 3000.0\n",
"4 2258.02\n",
"7 1057.75\n",
"8 2212.5\n",
"12 5487.09\n",
"13 2237.97\n",
"15 10000.0\n",
"17 5000.0\n",
"18 3487.19\n",
"22 9345.55\n",
"23 1500.0\n",
"24 23575.12\n",
"27 9345.55\n",
"28 38552.05\n",
"29 50000.0\n"
]
}
],
"source": [
"try:\n",
" cursor.execute(\n",
" 'select * from account where avail_balance > 1000;'\n",
" )\n",
" result = cursor.fetchall()\n",
" result\n",
"\n",
" for row in result:\n",
" print(row[0], row['avail_balance'])\n",
" \n",
" conn.commit()\n",
"except:\n",
" conn.rollback()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4e2f6948-9a18-421c-b64c-85ed9743b28f",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:base] *",
"language": "python",
"name": "conda-base-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.9"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

View File

@ -0,0 +1,386 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Python - Kurzwiederholung\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Elementare Datentypen"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# eine Variable mit einem int-Wert\n",
"i = 10\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Python kann sher grosse Zahlen verarbeiten:\n",
"j = 123456395823842193412376429384\n",
"j+1"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# int-Zahlen sind richtige Objekte - sie brauchen mehr Speicher, \n",
"# haben aber auch mehr Fähigkeiten als in anderen Sprachen\n",
"import sys\n",
"\n",
"print(sys.getsizeof(10)) # Specherverbrauch einer einzelnen Zahl\n",
"print(i.bit_length()) # Methoden, hier Bitlänge der Zahl"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# ein Float \n",
"f = 5.0\n",
"\n",
"# auch Floats haben Methoden\n",
"print(f.is_integer())"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Floats haben so ihre Probleme...\n",
"0.1 + 0.2"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Strings, Konkatenation\n",
"s = \"Hello\" + \" \" + \"World\"\n",
"s"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Boolsche Werte\n",
"a = True\n",
"b = False\n",
"\n",
"print(a and b)\n",
"print(a or b)\n",
"type(a)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Umwandlung von Datentypen"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# zahl in string umwandeln\n",
"i = 5\n",
"str(i)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# string in zahl umwandeln\n",
"s = \"55\"\n",
"float(s)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Kontrollstrukturen: if, while, for, range-Funktion"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"i = 10\n",
"\n",
"if i > 5:\n",
" print(\"i ist grösser 5\")\n",
" \n",
"while i > 0:\n",
" print(i)\n",
" i = i - 1"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"for i in range(5):\n",
" print(i)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# rückwärts zählen\n",
"for i in range(10, 4, -1):\n",
" print(i)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Beispiele für Funktionen"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"def add(i, j):\n",
" return i+j"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print(add(2, 3))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Listen, Indizierung, Slicing"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Platznummern\n",
"# 0 1 2 3 4 5 6\n",
"l = [1, 2, 3, 4, 5, 6, 7]\n",
"\n",
"# slicing\n",
"l[1::2]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# enumerate: Aufzählen einer Liste (Tupelbildung mit Index)\n",
"list(enumerate([5,9,42]))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"l = [\"test\", 1, 5.5, True] # Listen können gemischte Werte enthalten"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Tupel"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"t = (4, 5) # Tupel einpacken\n",
"a, b = t # Tupel auspacken\n",
"\n",
"print(a)\n",
"print(b)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"builtin-Funktionen, Standardbibliothek"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# builtin-Funktion\n",
"# range, list, int, float, len, sum, bool, tuple "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# ein Import - hier math\n",
"import math"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"math.exp(2.0)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Dictionaries"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"d = { 'eins': 'one', 'zwei': 'two' }\n",
"\n",
"d.keys(), d.values()\n",
"\n",
"for key, value in d.items():\n",
" print(key, '->', value)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"List-Comprehensions"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Quadratzahlen mit gerader Basis\n",
"[ x*x for x in range(0,21) if x % 2 == 0 ]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Statistics"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"a = [3,4,5,6,7]\n",
"mean(a), variance(a)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"b = [0, 2, 4, 6, 8, 10]\n",
"mean(b), variance(b)"
]
}
],
"metadata": {
"interpreter": {
"hash": "a6b707a736c5fbba452b904aff207ddd250a7524df1f8c74db5bc52ff4a2560b"
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.8"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

View File

@ -0,0 +1,174 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Python - Kurzwiederholung\n",
"\n",
"Hier werden wir einige Beispiele betrachten, um noch einmal einige Python-Konzepte zu wiederholen. Sie können mitschreiben, oder am Ende mein fertiges Notebook herunterladen."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Elementare Datentypen"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Umwandlung von Datentypen"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Kontrollstrukturen: if, while, for, range-Funktion"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Beispiele für Funktionen"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Listen, Indizierung, Slicing"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Tupel"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"builtin-Funktionen, Standardbibliothek"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Dictionaries"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"List-Comprehensions"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Statistics"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.8"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

View File

@ -0,0 +1,274 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# SQL - Injection\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Vorbereitung"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"# Falls noch nicht geschehen können die Pakte importiert werden\n",
"import psycopg2\n",
"import psycopg2.extras"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"# als nächstes bauen wir unsere Verbindung auf, legen eine Tabelle an und füllen diese mit zwei Usern (bitte eigene Datenbank auswählen):\n",
"conn = psycopg2.connect (\"dbname=7Wochen user=postgres password=postgres\")\n",
"\n",
"cursor = conn.cursor(cursor_factory=psycopg2.extras.RealDictCursor)\n",
"\n",
"cursor.execute(\"\"\"\n",
" DROP TABLE IF EXISTS users;\n",
" CREATE TABLE IF NOT EXISTS users (\n",
" id SERIAL PRIMARY KEY,\n",
" username VARCHAR(255) NOT NULL,\n",
" password VARCHAR(255) NOT NULL\n",
" )\n",
"\"\"\")\n",
"\n",
"cursor.execute(\"INSERT INTO users (username, password) VALUES (%s, %s)\", (\"user1\", \"password1\"))\n",
"cursor.execute(\"INSERT INTO users (username, password) VALUES (%s, %s)\", (\"user2\", \"password2\"))\n",
"conn.commit();"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[RealDictRow([('id', 1), ('username', 'user1'), ('password', 'password1')]),\n",
" RealDictRow([('id', 2), ('username', 'user2'), ('password', 'password2')])]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Kurz zum überprüfen, ob die Tabelle angelegt wurde\n",
"\n",
"cursor.execute(\"SELECT * FROM users;\")\n",
"result = cursor.fetchall()\n",
"result"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Angriffsszenario 1 - direkt Übermittlung von Zugangsdaten"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Login erfolgreich\n"
]
}
],
"source": [
"# gehen wir nun davon aus, dass sich ein User, zum Beispiel über ein Formularfeld anmelden möchte.\n",
"# Und zwar mit den folgenden Zugangsdaten:\n",
"username = \"user1\"\n",
"password = \"password1\"\n",
"\n",
"# Das würde dann so ablaufen:\n",
"try:\n",
" cursor.execute(f\"SELECT * FROM users WHERE username='{username}' AND password='{password}'\")\n",
"# Nun holen wir uns eine Ergebniszeile. Gibt es die waren wir mit unserer Anmeldung erfolgreich. Kommt keine Zeile waren unsere Zugangsdaten falsch.\n",
" user = cursor.fetchone()\n",
"\n",
" if user:\n",
" print(\"Login erfolgreich\")\n",
" else:\n",
" print(\"Login fehlgeschlagen\")\n",
"except Exception as e:\n",
" print(e)\n",
" conn.rollback()\n",
"\n",
"# Wir übergeben also die Zeichenkette aus der Python-Variable direkt an unsere SQL-Datenbank.\n",
"# Ändern wir das Passwort sind wir nicht erfolgreich.\n",
"# Um es schöner zu machen fügen wir noch ein Rollback ein"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Angriffszenario 2 - Übergabe von SQL-Befehlen, um Fehler zu hervorzurufen. "
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"FEHLER: Zeichenkette in Anführungszeichen nicht abgeschlossen bei »'''«\n",
"LINE 1: SELECT * FROM users WHERE username='user1' AND password='''\n",
" ^\n",
"\n"
]
}
],
"source": [
"# gehen wir nun davon aus, dass ein User SQL-Befehle eingibt. Zunächst nur ein einfaches Anführungszeichen als Passwort.\n",
"# Das Ergebnis ist ein erzeugter SQL-Fehler.\n",
"username = \"user1\"\n",
"password = \"'\"\n",
"\n",
"try:\n",
" cursor.execute(f\"SELECT * FROM users WHERE username='{username}' AND password='{password}'\")\n",
" user = cursor.fetchone()\n",
"\n",
" if user:\n",
" print(\"Login erfolgreich\")\n",
" else:\n",
" print(\"Login fehlgeschlagen\")\n",
"except Exception as e:\n",
" print(e)\n",
" conn.rollback()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Angriffszenario 3 - Übergabe von SQL-Befehlen, um einen erfolgreichen Login zu generieren."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Login erfolgreich\n"
]
}
],
"source": [
"# gehen wir nun davon aus, dass ein User SQL-Befehle eingibt. Diesmal die Übergabe eines echten Befehls.\n",
"# Dieser erzeugt eine wahre Aussage wodurch die Passwortüberprüfung erfolgreich wird.\n",
"username = \"user1\"\n",
"password = \"' OR 1=1 --\"\n",
"\n",
"try:\n",
" cursor.execute(f\"SELECT * FROM users WHERE username='{username}' AND password='{password}'\")\n",
" user = cursor.fetchone()\n",
"\n",
" if user:\n",
" print(\"Login erfolgreich\")\n",
" else:\n",
" print(\"Login fehlgeschlagen\")\n",
"except Exception as e:\n",
" print(e)\n",
" conn.rollback()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Abschliessend noch die Variante mit Platzhaltern, die sicherer wäre."
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Login fehlgeschlagen\n"
]
}
],
"source": [
"# hier würde nun die Zeichenkette aus der Passworteingabe übergeben und nicht als String direkt zu SQL-Code werden.\n",
"username = \"user1\"\n",
"password = \"' OR 1=1 --\"\n",
"\n",
"try:\n",
" cursor.execute(f\"SELECT * FROM users WHERE username=%s AND password=%s\", (username, password))\n",
" user = cursor.fetchone()\n",
"\n",
" if user:\n",
" print(\"Login erfolgreich\")\n",
" else:\n",
" print(\"Login fehlgeschlagen\")\n",
"except Exception as e:\n",
" print(e)\n",
" conn.rollback()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"interpreter": {
"hash": "a6b707a736c5fbba452b904aff207ddd250a7524df1f8c74db5bc52ff4a2560b"
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.8"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,361 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Zooverwaltung\n",
"\n",
"In diesem Beispiel wird ein System zur Verwaltung von Zoos implementiert. Hier gibt es eine Tabelle für Personen (TierplegerInnen) und eine Tabelle für Tiere. Eine Person kann mehrere Tiere betreuen, und ein Tier gehört einer Person.\n",
"\n",
"Im ersten Teil sollen Sie 5 Funktionen schreiben, die es Ihnen erlaubt, Personen anzulegen, zu lesen (einzeln und als Liste), zu ändern und zu löschen. Die Tabellen sind dabei vorgegeben und Sie finden im Notebook einige Testaufufe."
]
},
{
"cell_type": "code",
"execution_count": 140,
"metadata": {},
"outputs": [],
"source": [
"import psycopg2\n",
"import psycopg2.extras"
]
},
{
"cell_type": "code",
"execution_count": 141,
"metadata": {},
"outputs": [],
"source": [
"# Verbindung aufbauen\n",
"# TODO: hier müssen Ihre Verbindungsdaten eingetragen werden\n",
"# TODO: ggf. müssen Sie auch den Namen der Datenbank anpassen oder eine leere Datenbank 'zoo' anlegen\n",
"conn = psycopg2.connect(\"dbname=zoo host=/var/run/postgresql user=postgres password=sml12345\")"
]
},
{
"cell_type": "code",
"execution_count": 142,
"metadata": {},
"outputs": [],
"source": [
"# Diese Zelle löscht die Tabellen, falls sie bereits existieren, und legt sie neu an\n",
"sql = \"\"\"\n",
" DROP TABLE IF EXISTS animals;\n",
" DROP TABLE IF EXISTS zookeepers;\n",
"\n",
" CREATE TABLE zookeepers (\n",
" id SERIAL PRIMARY KEY,\n",
" name VARCHAR(255) NOT NULL,\n",
" email VARCHAR(255),\n",
" specialty VARCHAR(255)\n",
" );\n",
"\n",
" CREATE TABLE animals (\n",
" id SERIAL PRIMARY KEY,\n",
" name VARCHAR(255) NOT NULL,\n",
" species VARCHAR(255) NOT NULL,\n",
" zookeeper_id INTEGER,\n",
" FOREIGN KEY (zookeeper_id) REFERENCES zookeepers(id)\n",
" );\n",
"\"\"\"\n",
"\n",
"# SQL ausführen\n",
"cur = conn.cursor()\n",
"cur.execute(sql)\n",
"conn.commit()\n"
]
},
{
"cell_type": "code",
"execution_count": 143,
"metadata": {},
"outputs": [],
"source": [
"# TODO: Implementieren Sie hier die CRUD-Operationen für Zookeeper\n",
"\n",
"# TODO: Tierpleger anlegen, liefert die ID des neuen Tierpflegers zurück\n",
"def create_zookeeper(name, email, specialty):\n",
" try:\n",
" cur.execute(\"\"\"\n",
" INSERT INTO zookeepers (name, email, specialty)\n",
" VALUES (%s, %s, %s)\n",
" RETURNING id;\n",
" \"\"\", (name, email, specialty))\n",
" conn.commit()\n",
" return cur.fetchone()[0]\n",
" except:\n",
" conn.rollback()\n",
"\n",
"# TODO: Tierpfleger nach ID lesen, Tupel zurückgeben\n",
"def read_zookeeper(id):\n",
" cur.execute(\"SELECT * FROM zookeepers where id=%s\", (id,))\n",
" zookeeper = cur.fetchone()\n",
" return tuple(zookeeper) if zookeeper else None\n",
"\n",
"# TODO: Alle Tierpfleger lesen, liefert eine Liste von Tupeln zurück (nach ID sortiert)\n",
"def read_all_zookeepers():\n",
" cur.execute(\"SELECT * FROM zookeepers order by id\")\n",
" return [(zookeeper) for zookeeper in cur.fetchall()]\n",
"\n",
"# TODO: Tierpfleger aktualisieren\n",
"def update_zookeeper(id, name, email, specialty):\n",
" try:\n",
" cur.execute(\"\"\"\n",
" UPDATE zookeepers\n",
" SET name=%s, email=%s, specialty=%s\n",
" WHERE id=%s\n",
" \"\"\", (name, email, specialty, id))\n",
" conn.commit()\n",
" except:\n",
" conn.rollback()\n",
"\n",
"# TODO: Tierpfleger per ID löschen\n",
"def delete_zookeeper(id):\n",
" try:\n",
" cur.execute(\"\"\"\n",
" DELETE FROM zookeepers\n",
" WHERE id=%s\n",
" \"\"\", (id,))\n",
" conn.commit()\n",
" except:\n",
" conn.rollback()\n",
" raise"
]
},
{
"cell_type": "code",
"execution_count": 144,
"metadata": {},
"outputs": [],
"source": [
"# Tests - diese sollten alle erfolgreich durchlaufen werden und nicht verändert werden\n",
"\n",
"john = (\"John Doe\", \"john@example.com\", \"Elephants\")\n",
"jane = (\"Jane Doe\", \"jane@example.com\", \"Giraffes\")\n",
"\n",
"id = create_zookeeper(*john)\n",
"id2 = create_zookeeper(*jane)\n",
"\n",
"assert read_zookeeper(id) == (id, *john)\n",
"assert read_zookeeper(id2) == (id2, *jane)\n",
"\n",
"john = (\"John Smith\", \"john2@example.com\", \"Zebras\")\n",
"update_zookeeper(id, *john)\n",
"assert read_zookeeper(id) == (id, *john)\n",
"\n",
"all_zookeepers = read_all_zookeepers()\n",
"assert len(all_zookeepers) == 2\n",
"assert all_zookeepers[0] == (id, *john)\n",
"assert all_zookeepers[1] == (id2, *jane)\n",
"\n",
"delete_zookeeper(id)\n",
"delete_zookeeper(id2)\n",
"assert read_zookeeper(id) == None\n",
"assert read_zookeeper(id2) == None\n",
"\n",
"all_zookeepers = read_all_zookeepers()\n",
"assert len(all_zookeepers) == 0"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Nutzung eines ORMs\n",
"\n",
"Wie wir sehen, ist das manuelle Erstellen von Zugriffsfunktionen auf die Datenbank sehr aufwändig. Daher gibt es sogenannte Object-Relational-Mapper (ORMs), die uns diese Arbeit abnehmen. Ein bekanntes ORM für Python ist `SQLAlchemy`. Im zweiten Teil des Notebooks werden wir sehen, wie mit `SQLAlchemy` Daten eingefügt und gelesen werden können.\n",
"\n",
"Da Sie Anaconda nutzen, sollte `SQLAlchemy` bereits installiert sein. Falls nicht, können Sie es mit `conda` installieren.\n",
"\n",
"Wenn man `SQLAlchemy` verwendet, definiert man zunächst eine Klasse, die die Tabelle repräsentiert. Hier sind diese Klassen bereits für Personen und Tiere definiert. Sie können sich die Klassen ansehen, um zu verstehen, wie Tabellen in `SQLAlchemy` definiert werden."
]
},
{
"cell_type": "code",
"execution_count": 145,
"metadata": {},
"outputs": [],
"source": [
"## Nutzung von SQLAlchemy\n",
"from sqlalchemy import create_engine, Column, Integer, String, ForeignKey, select\n",
"from sqlalchemy.orm import Session, relationship, declarative_base, join, aliased\n",
"\n",
"Base = declarative_base()\n",
"\n",
"class Zookeeper(Base):\n",
" __tablename__ = 'zookeepers'\n",
" id = Column(Integer, primary_key=True)\n",
" name = Column(String, nullable=False)\n",
" email = Column(String)\n",
" specialty = Column(String)\n",
" animals = relationship(\"Animal\", back_populates=\"zookeeper\")\n",
"\n",
"class Animal(Base):\n",
" __tablename__ = 'animals'\n",
" id = Column(Integer, primary_key=True)\n",
" name = Column(String, nullable=False)\n",
" species = Column(String, nullable=False)\n",
" zookeeper_id = Column(Integer, ForeignKey('zookeepers.id'))\n",
" zookeeper = relationship(\"Zookeeper\", back_populates=\"animals\")\n",
"\n",
"# TODO: Verbingung zur Datenbank herstellen\n",
"engine = create_engine('postgresql://postgres:sml12345@localhost/zoo') "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Anlegen und Abfragen von Objekten in SQLAlchemy\n",
"\n",
"In diesem Teil sollen Sie 2 Personen und 5 Tiere anlegen und dann alle Personen und Tiere abfragen. Sie können sich an den Beispielen orientieren, die im Notebook gegeben sind.\n",
"\n",
"Ein kurzes und übersichtliches Tutorial zur Nutzung von `SQLAlchemy` finden Sie hier:\n",
"\n",
"https://docs.sqlalchemy.org/en/20/orm/session_basics.html\n",
"\n",
"Relevant sind vor allem folgende Abschnitte:\n",
"\n",
"https://docs.sqlalchemy.org/en/20/orm/session_basics.html#opening-and-closing-a-session\n",
"https://docs.sqlalchemy.org/en/20/orm/session_basics.html#adding-new-or-existing-items\n",
"https://docs.sqlalchemy.org/en/20/orm/session_basics.html#querying"
]
},
{
"cell_type": "code",
"execution_count": 146,
"metadata": {},
"outputs": [],
"source": [
"# TODO: zwei Zookeeper anlegen\n",
"with Session(engine) as session:\n",
" with session.begin():\n",
" john = Zookeeper(name=\"John Doe\", email=\"john@example.com\", specialty=\"Elephants\")\n",
" jane = Zookeeper(name=\"Jane Doe\", email=\"jane@example.com\", specialty=\"Giraffes\")\n",
" \n",
" session.add_all([john, jane])"
]
},
{
"cell_type": "code",
"execution_count": 147,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['John Doe', 'Jane Doe']\n"
]
}
],
"source": [
"# TODO: Alle Zookeeper ausgeben\n",
"with Session(engine) as session:\n",
" statement = select(Zookeeper.name)\n",
" print(session.scalars(statement).all())"
]
},
{
"cell_type": "code",
"execution_count": 148,
"metadata": {},
"outputs": [],
"source": [
"# TODO: 3 Elefanten anlegen, die John betreut\n",
"with Session(engine) as session:\n",
" with session.begin():\n",
" john_clause = select(Zookeeper.id).where(Zookeeper.name.like(\"%John%\"))\n",
" john_id = session.scalars(john_clause).first()\n",
"\n",
" session.add_all([Animal(name=animal, species=\"Elephant\", zookeeper_id=john_id) for animal in [\"Babar\", \"Dumbo\", \"Hathi\"]])\n",
" \n",
"# TODO: 2 Giraffen anlegen, die Jane betreut\n",
"with Session(engine) as session:\n",
" with session.begin():\n",
" jane_clause = select(Zookeeper.id).where(Zookeeper.name.like(\"%Jane%\"))\n",
" jane_id = session.scalars(jane_clause).first()\n",
" \n",
" session.add_all([Animal(name=animal, species=\"Giraffe\", zookeeper_id=jane_id) for animal in [\"Melman\", \"Gloria\"]])"
]
},
{
"cell_type": "code",
"execution_count": 149,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"--------------------------------\n",
"| Babar | Elephant | John Doe |\n",
"| Dumbo | Elephant | John Doe |\n",
"| Hathi | Elephant | John Doe |\n",
"| Melman | Giraffe | Jane Doe |\n",
"| Gloria | Giraffe | Jane Doe |\n",
"--------------------------------\n"
]
}
],
"source": [
"# Liste aller Tiere mit ihren Pflegern ausgeben:\n",
"with Session(engine) as session:\n",
" statement = select(Animal.name, Animal.species, Zookeeper.name).select_from(join(Animal, Zookeeper, Animal.zookeeper))\n",
" animals = session.execute(statement).all()\n",
"\n",
" col_widths = (\n",
" max([len(animal[0]) for animal in animals]),\n",
" max([len(animal[1]) for animal in animals]),\n",
" max([len(animal[2]) for animal in animals]),\n",
" )\n",
"\n",
" print(\"-\" * (sum(col_widths) + 10))\n",
" for animal in animals:\n",
" print(f\"| {animal[0]:{col_widths[0]}} | {animal[1]:{col_widths[1]}} | {animal[2]:{col_widths[2]}} |\")\n",
" print(\"-\" * (sum(col_widths) + 10))\n",
" \n",
"\n",
"# Beispielausgabe:\n",
"# \n",
"# ----------------------------------------\n",
"# | Babar | Elephant | John Doe |\n",
"# | Dumbo | Elephant | John Doe |\n",
"# | Hathi | Elephant | John Doe |\n",
"# | Melman | Giraffe | Jane Doe |\n",
"# | Gloria | Giraffe | Jane Doe |\n",
"# ----------------------------------------\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:base] *",
"language": "python",
"name": "conda-base-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.9"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

91
Aufgabe 2.sql Normal file
View File

@ -0,0 +1,91 @@
-- 1) Selektieren Sie die Employee ID, Vornamen und Nachname aller Angestellten - sortieren Sie absteigend nach Nachname und dann nach Vorname.
select emp_id "Employee ID", fname Vorname, lname Nachname
from employee
order by lname desc, fname;
-- 2) Holen Sie Kontonummer, Kundennummer und Kontostand für alle aktiven Konten mit mehr als 2500 Dollar (nutzen Sie als Kontostand avail_balance).
select account_id Kontonummer, cust_id Kundennummer, avail_balance Kontostand
from account
where status = 'ACTIVE'
and avail_balance > 2500;
-- 3) Holen Sie aus der Tabelle account alle IDs der Angestellten, die ein Konto eröffnet haben - geben Sie dabei jede ID nur einmal aus (Tipp: DISTINCT).
select distinct open_emp_id "ID des Angestellten"
from account;
-- 4) Zählen Sie die Zeilen in der account-Tabelle.
select count(*)
from account;
-- 5) Geben Sie eine Tabelle aus, in der in der ersten Spalte der Name des Kunden und in einer zweiten Spalte die Anzahl Konten dieses Kunden steht - Hinweis: hier reicht es aus, die Namen der Individualkunden zu verwenden (individual), Geschäftskunden dürfen ignoriert werden.
select individual.fname || ' ' || individual.lname "Name", count(*) "Anzahl Konten"
from customer
join individual on customer.cust_id = individual.cust_id
join account on customer.cust_id = account.cust_id
group by "Name";
-- 6) Wie 5), aber zeigen Sie nur Kunden an, die 2 oder mehr Konten haben.
select individual.fname || ' ' || individual.lname "Name", count(*) "Anzahl Konten"
from customer
join individual on customer.cust_id = individual.cust_id
join account on customer.cust_id = account.cust_id
group by "Name"
having count(*) >= 2;
-- 7) Geben Sie eine Query an, die alle Accounts findet, die im Jahr 2002 eröffnet wurden, ohne die Symbole > oder < zu verwenden.
select *
from account
where extract('year' from open_date) = '2002';
-- 8) Geben Sie eine Query an, die alle Kunden ("individual") findet, deren Nachname an der zweiten Stelle ein 'a' danach an beliebiger Stelle ein 'e' enthält.
select *
from individual
where individual.lname like '_a%e%';
-- 9) Schreiben Sie eine Query, die alle Account-IDs für jeden Nicht-Geschäftskunden holt, dazu die fed_id des Kunden und den Namen des Produkts, auf dem der Account basiert.
select account.account_id "Account-ID", customer.fed_id "fed_id des Kunden", product.name "Name des Produkts"
from account
join customer on customer.cust_id = account.cust_id
join product on product.product_cd = account.product_cd
where customer.cust_type_cd = 'I';
-- 10) Schreiben Sie eine Query, die alle Angestellten findet, deren Supervisor in einer anderen Abteilung (department) arbeitet. Selektieren Sie ID, Vor- und Nachname.
select emp.emp_id "ID", emp.fname "Vorname", emp.lname "Nachname"
from employee emp
join employee sup on sup.emp_id = emp.superior_emp_id
where emp.dept_id != sup.dept_id;
-- 11) (2 Punkte) Selektieren Sie alle Vornamen und Nachnamen in einer Tabelle (sowohl die der Individual-Kunden, als auch die der Angestellten). Tipp: Machen Sie sich mit der UNION-Anweisung vertraut.
select fname "Vorname", lname "Nachname"
from individual
union all
select fname "Vorname", lname "Nachname"
from employee;
-- 12) (2 Punkte) Selektieren Sie folgende Tabelle: Vorgesetzter (Name), komma-getrennte Liste der Mitarbeiter, die zu einem Vorgesetzten gehören (Tipp 1: superior_emp_id, Tipp 2: Recherchieren Sie per Internetsuche oder ChatGPT, wie man in einer Query zweimal dieselbe Tabelle nutzen kann.)
select sup.fname || ' ' || sup.lname "Vorgesetzter", array_agg(emp.fname || ' ' || emp.lname) "Mitarbeiter"
from employee sup
join employee emp on emp.superior_emp_id = sup.emp_id
group by "Vorgesetzter";
-- 13) (2 Punkte) Selektieren Sie alle Account-IDs und die dazugehörige Customer-ID. Wenn es ein Geschäftskunde ist, dann soll noch der Firmenname in der dritten Spalte stehen, sonst soll in der dritten Spalte der Vor- und Nachname des Privatkunden stehen (Tipp: COALESCE).
select a.account_id "Account-ID", c.cust_id "Customer-ID", coalesce(b.name, i.fname || ' ' || i.lname) "Name"
from account a
join customer c on c.cust_id = a.cust_id
left join individual i on i.cust_id = c.cust_id
left join business b on b.cust_id = c.cust_id;
-- 14) (2 Punkte) Selektieren Sie den Namen des Kunden mit dem höchsten Gesamtvermögen (nur eine Gesamt-Query - Subqueries dürfen genutzt werden)
select coalesce(b.name, i.fname || ' ' || i.lname) "Name"
from account a
join customer c on c.cust_id = a.cust_id
left join individual i on i.cust_id = c.cust_id
left join business b on b.cust_id = c.cust_id
order by a.avail_balance desc
limit 1;
-- 15) (2 Punkte) Selektieren Sie alle Namen der Bank-Produkte (Tabelle product, Verbindung product_cd) mit den Accounts (account_id), die auf diesem Produkt basieren. Dabei sollen alle Produkte auftauchen, auch die ohne Account.
select p.name "Name des Bank-Produkts", array_agg(a.account_id) "Accounts"
from product p
left join account a on a.product_cd = p.product_cd
group by "Name des Bank-Produkts";

27
Aufgabe 3 Normal file
View File

@ -0,0 +1,27 @@
-- UNION
select emp_id as person_id
from employee
union
select cust_id as person_id
from customer;
-- UNION ALL
select emp_id as person_id
from employee
union all
select cust_id as person_id
from customer;
-- INTERSECT
select emp_id as person_id
from employee
intersect
select cust_id as person_id
from customer;
-- EXCEPT
select emp_id as person_id
from employee
except
select cust_id as person_id
from customer;

BIN
Aufgabe 3.docx Normal file

Binary file not shown.

Binary file not shown.

965
Bank-Datenbank ERD.drawio Normal file
View File

@ -0,0 +1,965 @@
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/28.2.5 Chrome/138.0.7204.251 Electron/37.6.1 Safari/537.36" version="28.2.5">
<diagram name="Page-1" id="LcIpgzZ0pPKfpMyWdTyy">
<mxGraphModel dx="1522" dy="1943" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="fajgYWBjn6P_XPNBhK-K-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;endArrow=none;endFill=0;" parent="1" source="fajgYWBjn6P_XPNBhK-K-1" target="fajgYWBjn6P_XPNBhK-K-9" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="60" y="670" as="targetPoint" />
<Array as="points">
<mxPoint x="290" y="760" />
<mxPoint x="290" y="715" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;endFill=0;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-5" target="aLI5nJ7Lq4Vnoyky47xt-2" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-10" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="aLI5nJ7Lq4Vnoyky47xt-3" vertex="1" connectable="0">
<mxGeometry x="0.65" y="2" relative="1" as="geometry">
<mxPoint x="8" y="-3" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-55" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="fajgYWBjn6P_XPNBhK-K-1" target="fajgYWBjn6P_XPNBhK-K-6" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-56" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="fajgYWBjn6P_XPNBhK-K-1" target="fajgYWBjn6P_XPNBhK-K-7" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-57" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="fajgYWBjn6P_XPNBhK-K-1" target="fajgYWBjn6P_XPNBhK-K-8" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="fajgYWBjn6P_XPNBhK-K-1" value="Individual" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="740" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="fajgYWBjn6P_XPNBhK-K-6" value="fname" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="330" y="730" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="fajgYWBjn6P_XPNBhK-K-7" value="lname" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="330" y="781" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="fajgYWBjn6P_XPNBhK-K-8" value="birth_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="330" y="831" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="fajgYWBjn6P_XPNBhK-K-9" value="cust_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="330" y="681" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;endFill=0;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-2" target="aLI5nJ7Lq4Vnoyky47xt-16" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="60" y="540" />
<mxPoint x="60" y="320" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-2" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-2" target="aLI5nJ7Lq4Vnoyky47xt-17" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="60" y="540" />
<mxPoint x="60" y="370" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-3" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-2" target="aLI5nJ7Lq4Vnoyky47xt-19" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="60" y="540" />
<mxPoint x="60" y="420" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-4" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-2" target="aLI5nJ7Lq4Vnoyky47xt-18" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="60" y="540" />
<mxPoint x="60" y="470" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-5" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-2" target="aLI5nJ7Lq4Vnoyky47xt-20" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="60" y="540" />
<mxPoint x="60" y="520" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-45" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="0OrwQUruu8tLv63JVhKT-46" target="0OrwQUruu8tLv63JVhKT-44" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-50" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="0OrwQUruu8tLv63JVhKT-45" vertex="1" connectable="0">
<mxGeometry x="-0.0047" y="3" relative="1" as="geometry">
<mxPoint y="-13" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-2" value="Customer" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="520" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-8" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;endFill=0;" parent="1" source="fajgYWBjn6P_XPNBhK-K-1" target="aLI5nJ7Lq4Vnoyky47xt-5" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="200" y="400" as="sourcePoint" />
<mxPoint x="200" y="580" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-9" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="aLI5nJ7Lq4Vnoyky47xt-8" vertex="1" connectable="0">
<mxGeometry x="-0.6" relative="1" as="geometry">
<mxPoint x="10" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-12" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-5" target="0OrwQUruu8tLv63JVhKT-10" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-1" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="0OrwQUruu8tLv63JVhKT-12">
<mxGeometry x="0.8118" relative="1" as="geometry">
<mxPoint y="-10" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-5" value="is a" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="160" y="640" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-13" value="" style="endArrow=none;html=1;rounded=0;edgeStyle=orthogonalEdgeStyle;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-2" target="aLI5nJ7Lq4Vnoyky47xt-14" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="30" y="540" as="sourcePoint" />
<mxPoint x="20" y="450" as="targetPoint" />
<Array as="points">
<mxPoint x="60" y="540" />
<mxPoint x="60" y="220" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-14" value="cust_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="-80" y="200" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-15" value="fed_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-80" y="250" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-16" value="cust_type_cd" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-80" y="300" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-17" value="address" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-80" y="350" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-18" value="state" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-80" y="450" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-19" value="city" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-80" y="400" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-20" value="postal_code" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-80" y="500" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="aLI5nJ7Lq4Vnoyky47xt-22" value="" style="endArrow=none;html=1;rounded=0;edgeStyle=orthogonalEdgeStyle;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-2" target="aLI5nJ7Lq4Vnoyky47xt-15" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="190" y="600" as="sourcePoint" />
<mxPoint x="60" y="450" as="targetPoint" />
<Array as="points">
<mxPoint x="60" y="540" />
<mxPoint x="60" y="270" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-22" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="0OrwQUruu8tLv63JVhKT-23" target="0OrwQUruu8tLv63JVhKT-21" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-28" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="0OrwQUruu8tLv63JVhKT-22" vertex="1" connectable="0">
<mxGeometry x="0.5556" y="-4" relative="1" as="geometry">
<mxPoint y="-14" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-58" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-10" target="0OrwQUruu8tLv63JVhKT-13" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-60" y="715" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-59" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-10" target="0OrwQUruu8tLv63JVhKT-15" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-60" y="765" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-60" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-10" target="0OrwQUruu8tLv63JVhKT-16" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-60" y="815" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-61" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-10" target="0OrwQUruu8tLv63JVhKT-17" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-60" y="865" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-10" value="Business" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-110" y="640" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-13" value="cust_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="-1" y="695" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-15" value="name" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-1" y="745" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-16" value="state_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-1" y="795" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-17" value="incorp_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-1" y="845" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-62" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-21" target="0OrwQUruu8tLv63JVhKT-32" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-63" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-21" target="0OrwQUruu8tLv63JVhKT-29" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-64" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-21" target="0OrwQUruu8tLv63JVhKT-30" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-65" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-21" target="0OrwQUruu8tLv63JVhKT-31" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-66" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-21" target="0OrwQUruu8tLv63JVhKT-33" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-67" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-21" target="0OrwQUruu8tLv63JVhKT-34" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-68" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-21" target="0OrwQUruu8tLv63JVhKT-35" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-21" value="Officer" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-410" y="640" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-24" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="0OrwQUruu8tLv63JVhKT-10" target="0OrwQUruu8tLv63JVhKT-23" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="-670" y="880" as="sourcePoint" />
<mxPoint x="-500" y="880" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-27" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="0OrwQUruu8tLv63JVhKT-24" vertex="1" connectable="0">
<mxGeometry x="-0.0667" y="-3" relative="1" as="geometry">
<mxPoint x="3" y="-13" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-23" value="has" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="-240" y="640" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-29" value="cust_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-500" y="780" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-30" value="fname" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-500" y="830" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-31" value="lname" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-500" y="880" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-32" value="officer_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="-500" y="730" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-33" value="title" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-500" y="930" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-34" value="start_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-500" y="980" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-35" value="end_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-500" y="1030" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-81" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="0OrwQUruu8tLv63JVhKT-82" target="0OrwQUruu8tLv63JVhKT-80" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-85" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="0OrwQUruu8tLv63JVhKT-81" vertex="1" connectable="0">
<mxGeometry x="0.1029" y="4" relative="1" as="geometry">
<mxPoint x="6" y="89" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-85" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-63" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="400" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-86" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-62" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="350" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-87" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-61" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="300" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-88" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-60" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="250" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-89" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-59" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="200" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-90" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-58" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="150" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-91" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-57" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="100" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-92" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-56" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="50" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-93" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-53" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-94" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-52" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="-50" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-95" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-51" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="-100" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-97" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="p0bx4gPseoiS8_Lzheli-96" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-119" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-97" vertex="1" connectable="0">
<mxGeometry x="-0.7778" y="2" relative="1" as="geometry">
<mxPoint x="-10" y="-8" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-120" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-97" vertex="1" connectable="0">
<mxGeometry x="0.7778" y="2" relative="1" as="geometry">
<mxPoint x="10" y="-8" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-124" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-125" target="p0bx4gPseoiS8_Lzheli-123" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-148" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-124" vertex="1" connectable="0">
<mxGeometry x="0.55" y="-1" relative="1" as="geometry">
<mxPoint x="9" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-44" value="Account" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="430" y="520" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-47" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;" parent="1" source="aLI5nJ7Lq4Vnoyky47xt-2" target="0OrwQUruu8tLv63JVhKT-46" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="250" y="540" as="sourcePoint" />
<mxPoint x="400" y="540" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-49" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="0OrwQUruu8tLv63JVhKT-47" vertex="1" connectable="0">
<mxGeometry x="-0.2412" y="-1" relative="1" as="geometry">
<mxPoint y="-11" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-46" value="owns" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="290" y="520" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-51" value="account_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="150" y="-120" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-52" value="product_cd" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="-70" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-53" value="cust_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="-20" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-56" value="open_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="30" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-57" value="close_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="80" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-58" value="last_activity_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="130" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-59" value="status" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="180" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-60" value="open_branch_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="230" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-61" value="open_emp_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="280" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-62" value="avail_balance" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="330" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-63" value="pending_balance" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="150" y="380" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-1" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1070" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-13" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-3" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1110" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-14" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-4" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1160" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-15" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-5" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1210" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-16" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-6" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1261" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-17" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-7" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1310" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-18" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-8" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1360" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-19" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-9" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1410" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-20" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-11" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="740" y="1070" />
<mxPoint x="740" y="1460" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-28" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-29" target="p0bx4gPseoiS8_Lzheli-27" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-32" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-28" vertex="1" connectable="0">
<mxGeometry x="0.1707" y="2" relative="1" as="geometry">
<mxPoint x="8" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-39" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-40" target="p0bx4gPseoiS8_Lzheli-38" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="680" y="850" />
<mxPoint x="680" y="850" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-84" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-39" vertex="1" connectable="0">
<mxGeometry x="0.6026" relative="1" as="geometry">
<mxPoint x="10" y="-7" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-80" value="Employee" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="460" y="1040" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-83" value="N" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;exitX=0.25;exitY=1;exitDx=0;exitDy=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="0OrwQUruu8tLv63JVhKT-82" edge="1">
<mxGeometry x="-0.9273" y="-15" relative="1" as="geometry">
<mxPoint x="480" y="560" as="sourcePoint" />
<mxPoint x="480" y="690" as="targetPoint" />
<mxPoint as="offset" />
<Array as="points">
<mxPoint x="455" y="660" />
<mxPoint x="510" y="660" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="0OrwQUruu8tLv63JVhKT-82" value="opens" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="470" y="780" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-1" value="emp_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="920" y="1040" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-3" value="fname" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="1090" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-4" value="lname" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="1140" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-5" value="start_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="1190" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-6" value="end_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="919" y="1241" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-7" value="superior_emp_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="1290" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-8" value="dept_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="1340" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-9" value="title" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="1390" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-11" value="assigned_branch_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="1440" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-24" value="N" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.174;entryY=-0.008;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;entryPerimeter=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-22" target="0OrwQUruu8tLv63JVhKT-80" edge="1">
<mxGeometry x="0.7777" y="-7" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-81" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.75;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-22" target="0OrwQUruu8tLv63JVhKT-80" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="370" y="1070" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-171" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-81" vertex="1" connectable="0">
<mxGeometry x="0.375" y="-2" relative="1" as="geometry">
<mxPoint x="28" y="-12" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-22" value="supervises" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="330" y="1000" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-36" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-27" target="p0bx4gPseoiS8_Lzheli-33" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-37" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-27" target="p0bx4gPseoiS8_Lzheli-35" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-27" value="Department" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="460" y="1201" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-30" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-29" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="510" y="1080" as="sourcePoint" />
<mxPoint x="510" y="1201" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-9" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="p0bx4gPseoiS8_Lzheli-30">
<mxGeometry x="-0.55" y="5" relative="1" as="geometry">
<mxPoint x="5" y="1" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-29" value="works in" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="470" y="1120" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-33" value="dept_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="400" y="1360" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-35" value="name" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="520" y="1360" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-43" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-38" target="p0bx4gPseoiS8_Lzheli-44" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-49" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-38" target="p0bx4gPseoiS8_Lzheli-45" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-50" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-38" target="p0bx4gPseoiS8_Lzheli-48" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-51" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-38" target="p0bx4gPseoiS8_Lzheli-47" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-52" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-38" target="p0bx4gPseoiS8_Lzheli-46" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-53" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-38" target="p0bx4gPseoiS8_Lzheli-42" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-38" value="Branch" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="630" y="795" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-41" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-80" target="p0bx4gPseoiS8_Lzheli-40" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="460" y="1060" as="sourcePoint" />
<mxPoint x="230" y="1060" as="targetPoint" />
<Array as="points">
<mxPoint x="550" y="940" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-82" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-41" vertex="1" connectable="0">
<mxGeometry x="-0.8339" y="4" relative="1" as="geometry">
<mxPoint x="14" y="-4" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-40" value="assigns" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="640" y="920" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-42" value="branch_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="921" y="710" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-44" value="name" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="921" y="760" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-45" value="address" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="921" y="810" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-46" value="city" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="921" y="860" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-47" value="state" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="911" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-48" value="zip" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="921" y="960" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-111" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-110" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-112" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-108" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-113" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-109" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-114" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-107" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-115" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-106" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-116" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-105" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-117" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-104" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-118" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-102" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="_Gp69ajdkHd3nP33if5o-11">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="790" y="680" />
<mxPoint x="1050" y="680" />
<mxPoint x="1050" y="1020" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-16" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="_Gp69ajdkHd3nP33if5o-13">
<mxGeometry x="-0.9616" y="5" relative="1" as="geometry">
<mxPoint x="5" y="-9" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-96" value="Transaction" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="710" y="520" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-98" value="has" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="580" y="520" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-99" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-100" target="p0bx4gPseoiS8_Lzheli-38" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-122" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-99" vertex="1" connectable="0">
<mxGeometry x="0.695" relative="1" as="geometry">
<mxPoint x="10" y="5" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-101" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0.375;entryDx=0;entryDy=0;entryPerimeter=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-96" target="p0bx4gPseoiS8_Lzheli-100" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="760" y="560" as="sourcePoint" />
<mxPoint x="680" y="810" as="targetPoint" />
<Array as="points">
<mxPoint x="720" y="600" />
<mxPoint x="680" y="600" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-121" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-101" vertex="1" connectable="0">
<mxGeometry x="-0.8316" y="1" relative="1" as="geometry">
<mxPoint x="9" y="-6" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-100" value="executes" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="640" y="655" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-102" value="txn_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="919" y="270" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-104" value="txn_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="918" y="320" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-105" value="account_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="918" y="370" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-106" value="txn_type_cd" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="918" y="420" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-107" value="amount" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="918" y="470" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-108" value="teller_emp_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="918" y="520" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-109" value="execution_branch_id" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="570" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-110" value="funds_avail_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="920" y="620" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-133" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-123" target="p0bx4gPseoiS8_Lzheli-127" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-134" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-123" target="p0bx4gPseoiS8_Lzheli-130" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-135" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-123" target="p0bx4gPseoiS8_Lzheli-131" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-136" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-123" target="p0bx4gPseoiS8_Lzheli-132" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-137" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-123" target="p0bx4gPseoiS8_Lzheli-129" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-139" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-144" target="p0bx4gPseoiS8_Lzheli-138" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-146" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-139" vertex="1" connectable="0">
<mxGeometry x="0.55" y="-2" relative="1" as="geometry">
<mxPoint x="8" y="-4" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-123" value="Product" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="480" y="310" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-126" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="p0bx4gPseoiS8_Lzheli-125" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="480" y="520" as="sourcePoint" />
<mxPoint x="530" y="350" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-149" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-126" vertex="1" connectable="0">
<mxGeometry x="-0.7458" y="-4" relative="1" as="geometry">
<mxPoint x="6" y="5" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-125" value="defines" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="490" y="410" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-127" value="product_cd" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="680" y="240" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-129" value="name" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="680" y="290" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-130" value="product_type_cd" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="680" y="340" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-131" value="date_offered" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="680" y="390" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-132" value="date_retired" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="680" y="440" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-142" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-138" target="p0bx4gPseoiS8_Lzheli-141" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="650" y="120" />
<mxPoint x="650" y="120" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-143" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-138" target="p0bx4gPseoiS8_Lzheli-140" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-138" value="Product Type" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="480" y="100" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-140" value="product_type_cd" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="680" y="50" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-141" value="name" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="680" y="100" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-145" value="" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-123" target="p0bx4gPseoiS8_Lzheli-144" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="530" y="310" as="sourcePoint" />
<mxPoint x="530" y="140" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-147" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="p0bx4gPseoiS8_Lzheli-145" vertex="1" connectable="0">
<mxGeometry x="-0.4929" y="1" relative="1" as="geometry">
<mxPoint x="11" y="8" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-144" value="categorizes" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="490" y="200" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-152" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-151" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-60" y="1110" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-162" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-161" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-163" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-159" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-165" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-158" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-166" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-154" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-167" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-157" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-168" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-155" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-169" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-160" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-170" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-150" target="p0bx4gPseoiS8_Lzheli-156" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-150" value="Person" style="whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-110" y="1000" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-151" value="person_id" style="ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;" parent="1" vertex="1">
<mxGeometry x="-200" y="1090" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-164" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=none;endFill=0;" parent="1" source="p0bx4gPseoiS8_Lzheli-153" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="-60" y="1040" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-153" value="gender" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-20" y="1140" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-154" value="street" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-20" y="1190" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-155" value="state" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-20" y="1241" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-156" value="postal_code" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-20" y="1290" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-157" value="city" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-200" y="1241" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-158" value="birth_date" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-200" y="1190" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-159" value="lname" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-200" y="1140" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-160" value="country" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-200" y="1290" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="p0bx4gPseoiS8_Lzheli-161" value="fname" style="ellipse;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="-20" y="1090" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-5" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="0OrwQUruu8tLv63JVhKT-44" target="_Gp69ajdkHd3nP33if5o-3">
<mxGeometry relative="1" as="geometry">
<mxPoint x="480" y="560" as="sourcePoint" />
<mxPoint x="630" y="815" as="targetPoint" />
<Array as="points">
<mxPoint x="510" y="640" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-8" value="N" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="_Gp69ajdkHd3nP33if5o-5">
<mxGeometry x="-0.7091" y="-1" relative="1" as="geometry">
<mxPoint x="11" y="-6" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="_Gp69ajdkHd3nP33if5o-3" target="p0bx4gPseoiS8_Lzheli-38">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="580" y="815" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-7" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="_Gp69ajdkHd3nP33if5o-6">
<mxGeometry x="0.8341" y="2" relative="1" as="geometry">
<mxPoint y="-12" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-3" value="opened in" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="540" y="620" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.25;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="_Gp69ajdkHd3nP33if5o-11" target="0OrwQUruu8tLv63JVhKT-80">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-15" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="_Gp69ajdkHd3nP33if5o-14">
<mxGeometry x="0.8118" y="-2" relative="1" as="geometry">
<mxPoint x="4" y="-8" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="_Gp69ajdkHd3nP33if5o-11" value="carries out" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="700" y="1000" width="80" height="40" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

BIN
Bank-Datenbank ERD.pdf Normal file

Binary file not shown.

BIN
Bank-Datenbank ERD.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 KiB

1
ERD Bank-Datenbank Normal file

File diff suppressed because one or more lines are too long

265
PostgreSQL-Python.ipynb Normal file
View File

@ -0,0 +1,265 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "b53d472a-14d4-42bb-a0ee-38eb8c9c24a8",
"metadata": {},
"source": [
"Zunächst muss ein Paket zur Anbindung installiert werden. Wir verwenden psycopg 2 (psycopg.org).\n",
"Dies kann über den Reiter \"Environment\" im Anaconda Navicator installiert werden.\n",
"Ist dies geschehen können wir das Paket importieren."
]
},
{
"cell_type": "code",
"execution_count": 26,
"id": "0d3fea87-d2a6-4da8-9327-4c08bb70ef9e",
"metadata": {},
"outputs": [],
"source": [
"import psycopg2, psycopg2.extras"
]
},
{
"cell_type": "markdown",
"id": "bedf4588-60dc-4169-9295-21f6b3317e9f",
"metadata": {},
"source": [
"Nun sind wir bereit, um eine Verbindung zur Datenbank aufzubauen. Nehmen wir zum Beispiel die \"bank\" Datenbank. Da wir die Installation local haben, muss keine URL angegeben werden. Dafür legen wir eine Variable mit dem connect Befehl an."
]
},
{
"cell_type": "code",
"execution_count": 27,
"id": "62b5a0b5-bafd-4125-8b62-4a2aa493a061",
"metadata": {},
"outputs": [],
"source": [
"conn = psycopg2.connect(\"dbname=bank host=/var/run/postgresql user=postgres password=sml12345\")"
]
},
{
"cell_type": "markdown",
"id": "8861806c-5786-42fb-81d3-1ba5283b1d2b",
"metadata": {},
"source": [
"Als nächstes führen wir eine einfache SELECT Abfrage aus.\n",
"Zunächst werden wir verbunden, dann stellen wir die Abfrage, dann rufen wir das Ergebnis der Abfrage ab und lassen es uns anzeigen.\n",
"Dazu benötigen wir ein cursor Objekt, das uns die Abfrage aber auch die Rücklieferung der Daten liefert. Dieses kommt in die Variable cursor.\n",
"Die Variable result speichert uns die Ergebnisse. fetchall wartet bis alle Ergebniszeilen geliefert sind und ermöglicht dann die Anzeige."
]
},
{
"cell_type": "code",
"execution_count": 28,
"id": "09dbc41c-0ed7-449a-853d-3a18fbb1d97e",
"metadata": {},
"outputs": [],
"source": [
"cursor = conn.cursor(cursor_factory=psycopg2.extras.DictCursor)\n",
"cursor.execute(\"SELECT * FROM account;\")\n",
"result = cursor.fetchall()"
]
},
{
"cell_type": "markdown",
"id": "81c22552-4d3c-4824-82c7-5b8a0c74402c",
"metadata": {},
"source": [
"Pro Klammer bekommen wir nun ein Tupel angezeigt. Das ist noch nicht so schön. Mit einer kleinen Schleife können wir uns die Tupel zeilenweise anzeigen lassen."
]
},
{
"cell_type": "code",
"execution_count": 29,
"id": "dba24620-fe85-4feb-8109-59a3d7c5e3b3",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1, 'CHK', 1, datetime.date(2000, 1, 15), None, datetime.date(2005, 1, 4), 'ACTIVE', 2, 10, 1057.75, 1057.75]\n",
"[2, 'SAV', 1, datetime.date(2000, 1, 15), None, datetime.date(2004, 12, 19), 'ACTIVE', 2, 10, 500.0, 500.0]\n",
"[3, 'CD', 1, datetime.date(2004, 6, 30), None, datetime.date(2004, 6, 30), 'ACTIVE', 2, 10, 3000.0, 3000.0]\n",
"[4, 'CHK', 2, datetime.date(2001, 3, 12), None, datetime.date(2004, 12, 27), 'ACTIVE', 2, 10, 2258.02, 2258.02]\n",
"[5, 'SAV', 2, datetime.date(2001, 3, 12), None, datetime.date(2004, 12, 11), 'ACTIVE', 2, 10, 200.0, 200.0]\n",
"[7, 'CHK', 3, datetime.date(2002, 11, 23), None, datetime.date(2004, 11, 30), 'ACTIVE', 3, 13, 1057.75, 1057.75]\n",
"[8, 'MM', 3, datetime.date(2002, 12, 15), None, datetime.date(2004, 12, 5), 'ACTIVE', 3, 13, 2212.5, 2212.5]\n",
"[10, 'CHK', 4, datetime.date(2003, 9, 12), None, datetime.date(2005, 1, 3), 'ACTIVE', 1, 1, 534.12, 534.12]\n",
"[11, 'SAV', 4, datetime.date(2000, 1, 15), None, datetime.date(2004, 10, 24), 'ACTIVE', 1, 1, 767.77, 767.77]\n",
"[12, 'MM', 4, datetime.date(2004, 9, 30), None, datetime.date(2004, 11, 11), 'ACTIVE', 1, 1, 5487.09, 5487.09]\n",
"[13, 'CHK', 5, datetime.date(2004, 1, 27), None, datetime.date(2005, 1, 5), 'ACTIVE', 4, 16, 2237.97, 2897.97]\n",
"[14, 'CHK', 6, datetime.date(2002, 8, 24), None, datetime.date(2004, 11, 29), 'ACTIVE', 1, 1, 122.37, 122.37]\n",
"[15, 'CD', 6, datetime.date(2004, 12, 28), None, datetime.date(2004, 12, 28), 'ACTIVE', 1, 1, 10000.0, 10000.0]\n",
"[17, 'CD', 7, datetime.date(2004, 1, 12), None, datetime.date(2004, 1, 12), 'ACTIVE', 2, 10, 5000.0, 5000.0]\n",
"[18, 'CHK', 8, datetime.date(2001, 5, 23), None, datetime.date(2005, 1, 3), 'ACTIVE', 4, 16, 3487.19, 3487.19]\n",
"[19, 'SAV', 8, datetime.date(2001, 5, 23), None, datetime.date(2004, 10, 12), 'ACTIVE', 4, 16, 387.99, 387.99]\n",
"[21, 'CHK', 9, datetime.date(2003, 7, 30), None, datetime.date(2004, 12, 15), 'ACTIVE', 1, 1, 125.67, 125.67]\n",
"[22, 'MM', 9, datetime.date(2004, 10, 28), None, datetime.date(2004, 10, 28), 'ACTIVE', 1, 1, 9345.55, 9845.55]\n",
"[23, 'CD', 9, datetime.date(2004, 6, 30), None, datetime.date(2004, 6, 30), 'ACTIVE', 1, 1, 1500.0, 1500.0]\n",
"[24, 'CHK', 10, datetime.date(2002, 9, 30), None, datetime.date(2004, 12, 15), 'ACTIVE', 4, 16, 23575.12, 23575.12]\n",
"[25, 'BUS', 10, datetime.date(2002, 10, 1), None, datetime.date(2004, 8, 28), 'ACTIVE', 4, 16, 0.0, 0.0]\n",
"[27, 'BUS', 11, datetime.date(2004, 3, 22), None, datetime.date(2004, 11, 14), 'ACTIVE', 2, 10, 9345.55, 9345.55]\n",
"[28, 'CHK', 12, datetime.date(2003, 7, 30), None, datetime.date(2004, 12, 15), 'ACTIVE', 4, 16, 38552.05, 38552.05]\n",
"[29, 'SBL', 13, datetime.date(2004, 2, 22), None, datetime.date(2004, 12, 17), 'ACTIVE', 3, 13, 50000.0, 50000.0]\n"
]
}
],
"source": [
"for entry in result:\n",
" print(entry)"
]
},
{
"cell_type": "markdown",
"id": "b975ba44-de7e-4337-a2f9-a4fa06fc59b1",
"metadata": {},
"source": [
"Wollen wir nur eine bestimmte Spalte geht dies über die Angabe der Spaltennummer."
]
},
{
"cell_type": "code",
"execution_count": 32,
"id": "6159012d-ea9c-44da-bec0-5d073d210bd3",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1057.75\n",
"500.0\n",
"3000.0\n",
"2258.02\n",
"200.0\n",
"1057.75\n",
"2212.5\n",
"534.12\n",
"767.77\n",
"5487.09\n",
"2237.97\n",
"122.37\n",
"10000.0\n",
"5000.0\n",
"3487.19\n",
"387.99\n",
"125.67\n",
"9345.55\n",
"1500.0\n",
"23575.12\n",
"0.0\n",
"9345.55\n",
"38552.05\n",
"50000.0\n"
]
}
],
"source": []
},
{
"cell_type": "markdown",
"id": "b3180855-e952-4d4a-86b5-a27c9d326f69",
"metadata": {},
"source": [
"Spaltennummern zählen ist nun etwas aufwendig und unschön. Mit einer Erweituerung des Pakets können wir den cursor anpassen und dann auch Spaltennamen angeben. Wir wählen psycopg2.extras und dann einen DictCursor."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "75b7a5c8-4677-4546-a461-e7b36b97ff5e",
"metadata": {},
"outputs": [],
"source": [
"for entry in result:\n",
" print(entry['avail_balance'])"
]
},
{
"cell_type": "markdown",
"id": "3b90228d-bbc6-40ca-bf18-abb698318603",
"metadata": {},
"source": [
"Problembehandlung Transaktion: Da wir Abfragen durchführen sollten wir diese auch korrekt starten und abschliessen. Vor allem wenn es zu einem Fehler (z.B. einem Tippfehler) kommt. Anosnten laufen wir auf eine Fehlermeldung und eine offen Transaktion.\n",
"Die Lösung ist unseren SQL Befehl in einen try, except bzw finally Block zu setzen.\n",
"MIt conn.commit() wird die Durchführung der Transaktion bestätigt."
]
},
{
"cell_type": "code",
"execution_count": 35,
"id": "2e24b6bb-4773-4652-b027-7ee4faf6db92",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1 1057.75\n",
"3 3000.0\n",
"4 2258.02\n",
"7 1057.75\n",
"8 2212.5\n",
"12 5487.09\n",
"13 2237.97\n",
"15 10000.0\n",
"17 5000.0\n",
"18 3487.19\n",
"22 9345.55\n",
"23 1500.0\n",
"24 23575.12\n",
"27 9345.55\n",
"28 38552.05\n",
"29 50000.0\n"
]
}
],
"source": [
"try:\n",
" cursor.execute(\n",
" 'select * from account where avail_balance > 1000;'\n",
" )\n",
" result = cursor.fetchall()\n",
" result\n",
"\n",
" for row in result:\n",
" print(row[0], row['avail_balance'])\n",
" \n",
" conn.commit()\n",
"except:\n",
" conn.rollback()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4e2f6948-9a18-421c-b64c-85ed9743b28f",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:base] *",
"language": "python",
"name": "conda-base-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.9"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

View File

@ -0,0 +1,386 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Python - Kurzwiederholung\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Elementare Datentypen"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# eine Variable mit einem int-Wert\n",
"i = 10\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Python kann sher grosse Zahlen verarbeiten:\n",
"j = 123456395823842193412376429384\n",
"j+1"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# int-Zahlen sind richtige Objekte - sie brauchen mehr Speicher, \n",
"# haben aber auch mehr Fähigkeiten als in anderen Sprachen\n",
"import sys\n",
"\n",
"print(sys.getsizeof(10)) # Specherverbrauch einer einzelnen Zahl\n",
"print(i.bit_length()) # Methoden, hier Bitlänge der Zahl"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# ein Float \n",
"f = 5.0\n",
"\n",
"# auch Floats haben Methoden\n",
"print(f.is_integer())"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Floats haben so ihre Probleme...\n",
"0.1 + 0.2"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Strings, Konkatenation\n",
"s = \"Hello\" + \" \" + \"World\"\n",
"s"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Boolsche Werte\n",
"a = True\n",
"b = False\n",
"\n",
"print(a and b)\n",
"print(a or b)\n",
"type(a)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Umwandlung von Datentypen"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# zahl in string umwandeln\n",
"i = 5\n",
"str(i)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# string in zahl umwandeln\n",
"s = \"55\"\n",
"float(s)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Kontrollstrukturen: if, while, for, range-Funktion"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"i = 10\n",
"\n",
"if i > 5:\n",
" print(\"i ist grösser 5\")\n",
" \n",
"while i > 0:\n",
" print(i)\n",
" i = i - 1"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"for i in range(5):\n",
" print(i)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# rückwärts zählen\n",
"for i in range(10, 4, -1):\n",
" print(i)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Beispiele für Funktionen"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"def add(i, j):\n",
" return i+j"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print(add(2, 3))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Listen, Indizierung, Slicing"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Platznummern\n",
"# 0 1 2 3 4 5 6\n",
"l = [1, 2, 3, 4, 5, 6, 7]\n",
"\n",
"# slicing\n",
"l[1::2]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# enumerate: Aufzählen einer Liste (Tupelbildung mit Index)\n",
"list(enumerate([5,9,42]))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"l = [\"test\", 1, 5.5, True] # Listen können gemischte Werte enthalten"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Tupel"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"t = (4, 5) # Tupel einpacken\n",
"a, b = t # Tupel auspacken\n",
"\n",
"print(a)\n",
"print(b)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"builtin-Funktionen, Standardbibliothek"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# builtin-Funktion\n",
"# range, list, int, float, len, sum, bool, tuple "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# ein Import - hier math\n",
"import math"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"math.exp(2.0)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Dictionaries"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"d = { 'eins': 'one', 'zwei': 'two' }\n",
"\n",
"d.keys(), d.values()\n",
"\n",
"for key, value in d.items():\n",
" print(key, '->', value)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"List-Comprehensions"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Quadratzahlen mit gerader Basis\n",
"[ x*x for x in range(0,21) if x % 2 == 0 ]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Statistics"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"a = [3,4,5,6,7]\n",
"mean(a), variance(a)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"b = [0, 2, 4, 6, 8, 10]\n",
"mean(b), variance(b)"
]
}
],
"metadata": {
"interpreter": {
"hash": "a6b707a736c5fbba452b904aff207ddd250a7524df1f8c74db5bc52ff4a2560b"
},
"kernelspec": {
"display_name": "Python [conda env:base] *",
"language": "python",
"name": "conda-base-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.9"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

174
Python Wiederholung.ipynb Normal file
View File

@ -0,0 +1,174 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Python - Kurzwiederholung\n",
"\n",
"Hier werden wir einige Beispiele betrachten, um noch einmal einige Python-Konzepte zu wiederholen. Sie können mitschreiben, oder am Ende mein fertiges Notebook herunterladen."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Elementare Datentypen"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Umwandlung von Datentypen"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Kontrollstrukturen: if, while, for, range-Funktion"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Beispiele für Funktionen"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Listen, Indizierung, Slicing"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Tupel"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"builtin-Funktionen, Standardbibliothek"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Dictionaries"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"List-Comprehensions"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Statistics"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:base] *",
"language": "python",
"name": "conda-base-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.9"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

View File

@ -0,0 +1,287 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# SQL - Injection\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Vorbereitung"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"# Falls noch nicht geschehen können die Pakte importiert werden\n",
"import psycopg2\n",
"import psycopg2.extras"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"ename": "OperationalError",
"evalue": "connection to server on socket \"/tmp/.s.PGSQL.5432\" failed: No such file or directory\n\tIs the server running locally and accepting connections on that socket?\n",
"output_type": "error",
"traceback": [
"\u001b[31m---------------------------------------------------------------------------\u001b[39m",
"\u001b[31mOperationalError\u001b[39m Traceback (most recent call last)",
"\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[2]\u001b[39m\u001b[32m, line 2\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;66;03m# als nächstes bauen wir unsere Verbindung auf, legen eine Tabelle an und füllen diese mit zwei Usern (bitte eigene Datenbank auswählen):\u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m2\u001b[39m conn = \u001b[43mpsycopg2\u001b[49m\u001b[43m.\u001b[49m\u001b[43mconnect\u001b[49m\u001b[43m \u001b[49m\u001b[43m(\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mdbname=7Wochen user=postgres password=postgres\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[32m 4\u001b[39m cursor = conn.cursor(cursor_factory=psycopg2.extras.RealDictCursor)\n\u001b[32m 6\u001b[39m cursor.execute(\u001b[33m\"\"\"\u001b[39m\n\u001b[32m 7\u001b[39m \u001b[33m DROP TABLE IF EXISTS users;\u001b[39m\n\u001b[32m 8\u001b[39m \u001b[33m CREATE TABLE IF NOT EXISTS users (\u001b[39m\n\u001b[32m (...)\u001b[39m\u001b[32m 12\u001b[39m \u001b[33m )\u001b[39m\n\u001b[32m 13\u001b[39m \u001b[33m\"\"\"\u001b[39m)\n",
"\u001b[36mFile \u001b[39m\u001b[32m~/anaconda3/lib/python3.13/site-packages/psycopg2/__init__.py:122\u001b[39m, in \u001b[36mconnect\u001b[39m\u001b[34m(dsn, connection_factory, cursor_factory, **kwargs)\u001b[39m\n\u001b[32m 119\u001b[39m kwasync[\u001b[33m'\u001b[39m\u001b[33masync_\u001b[39m\u001b[33m'\u001b[39m] = kwargs.pop(\u001b[33m'\u001b[39m\u001b[33masync_\u001b[39m\u001b[33m'\u001b[39m)\n\u001b[32m 121\u001b[39m dsn = _ext.make_dsn(dsn, **kwargs)\n\u001b[32m--> \u001b[39m\u001b[32m122\u001b[39m conn = \u001b[43m_connect\u001b[49m\u001b[43m(\u001b[49m\u001b[43mdsn\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mconnection_factory\u001b[49m\u001b[43m=\u001b[49m\u001b[43mconnection_factory\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43m*\u001b[49m\u001b[43m*\u001b[49m\u001b[43mkwasync\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 123\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m cursor_factory \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[32m 124\u001b[39m conn.cursor_factory = cursor_factory\n",
"\u001b[31mOperationalError\u001b[39m: connection to server on socket \"/tmp/.s.PGSQL.5432\" failed: No such file or directory\n\tIs the server running locally and accepting connections on that socket?\n"
]
}
],
"source": [
"# als nächstes bauen wir unsere Verbindung auf, legen eine Tabelle an und füllen diese mit zwei Usern (bitte eigene Datenbank auswählen):\n",
"conn = psycopg2.connect (\"dbname=7Wochen user=postgres password=postgres\")\n",
"\n",
"cursor = conn.cursor(cursor_factory=psycopg2.extras.RealDictCursor)\n",
"\n",
"cursor.execute(\"\"\"\n",
" DROP TABLE IF EXISTS users;\n",
" CREATE TABLE IF NOT EXISTS users (\n",
" id SERIAL PRIMARY KEY,\n",
" username VARCHAR(255) NOT NULL,\n",
" password VARCHAR(255) NOT NULL\n",
" )\n",
"\"\"\")\n",
"\n",
"cursor.execute(\"INSERT INTO users (username, password) VALUES (%s, %s)\", (\"user1\", \"password1\"))\n",
"cursor.execute(\"INSERT INTO users (username, password) VALUES (%s, %s)\", (\"user2\", \"password2\"))\n",
"conn.commit();"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[RealDictRow([('id', 1), ('username', 'user1'), ('password', 'password1')]),\n",
" RealDictRow([('id', 2), ('username', 'user2'), ('password', 'password2')])]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Kurz zum überprüfen, ob die Tabelle angelegt wurde\n",
"\n",
"cursor.execute(\"SELECT * FROM users;\")\n",
"result = cursor.fetchall()\n",
"result"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Angriffsszenario 1 - direkt Übermittlung von Zugangsdaten"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Login erfolgreich\n"
]
}
],
"source": [
"# gehen wir nun davon aus, dass sich ein User, zum Beispiel über ein Formularfeld anmelden möchte.\n",
"# Und zwar mit den folgenden Zugangsdaten:\n",
"username = \"user1\"\n",
"password = \"password1\"\n",
"\n",
"# Das würde dann so ablaufen:\n",
"try:\n",
" cursor.execute(f\"SELECT * FROM users WHERE username='{username}' AND password='{password}'\")\n",
"# Nun holen wir uns eine Ergebniszeile. Gibt es die waren wir mit unserer Anmeldung erfolgreich. Kommt keine Zeile waren unsere Zugangsdaten falsch.\n",
" user = cursor.fetchone()\n",
"\n",
" if user:\n",
" print(\"Login erfolgreich\")\n",
" else:\n",
" print(\"Login fehlgeschlagen\")\n",
"except Exception as e:\n",
" print(e)\n",
" conn.rollback()\n",
"\n",
"# Wir übergeben also die Zeichenkette aus der Python-Variable direkt an unsere SQL-Datenbank.\n",
"# Ändern wir das Passwort sind wir nicht erfolgreich.\n",
"# Um es schöner zu machen fügen wir noch ein Rollback ein"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Angriffszenario 2 - Übergabe von SQL-Befehlen, um Fehler zu hervorzurufen. "
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"FEHLER: Zeichenkette in Anführungszeichen nicht abgeschlossen bei »'''«\n",
"LINE 1: SELECT * FROM users WHERE username='user1' AND password='''\n",
" ^\n",
"\n"
]
}
],
"source": [
"# gehen wir nun davon aus, dass ein User SQL-Befehle eingibt. Zunächst nur ein einfaches Anführungszeichen als Passwort.\n",
"# Das Ergebnis ist ein erzeugter SQL-Fehler.\n",
"username = \"user1\"\n",
"password = \"'\"\n",
"\n",
"try:\n",
" cursor.execute(f\"SELECT * FROM users WHERE username='{username}' AND password='{password}'\")\n",
" user = cursor.fetchone()\n",
"\n",
" if user:\n",
" print(\"Login erfolgreich\")\n",
" else:\n",
" print(\"Login fehlgeschlagen\")\n",
"except Exception as e:\n",
" print(e)\n",
" conn.rollback()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Angriffszenario 3 - Übergabe von SQL-Befehlen, um einen erfolgreichen Login zu generieren."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Login erfolgreich\n"
]
}
],
"source": [
"# gehen wir nun davon aus, dass ein User SQL-Befehle eingibt. Diesmal die Übergabe eines echten Befehls.\n",
"# Dieser erzeugt eine wahre Aussage wodurch die Passwortüberprüfung erfolgreich wird.\n",
"username = \"user1\"\n",
"password = \"' OR 1=1 --\"\n",
"\n",
"try:\n",
" cursor.execute(f\"SELECT * FROM users WHERE username='{username}' AND password='{password}'\")\n",
" user = cursor.fetchone()\n",
"\n",
" if user:\n",
" print(\"Login erfolgreich\")\n",
" else:\n",
" print(\"Login fehlgeschlagen\")\n",
"except Exception as e:\n",
" print(e)\n",
" conn.rollback()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Abschliessend noch die Variante mit Platzhaltern, die sicherer wäre."
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Login fehlgeschlagen\n"
]
}
],
"source": [
"# hier würde nun die Zeichenkette aus der Passworteingabe übergeben und nicht als String direkt zu SQL-Code werden.\n",
"username = \"user1\"\n",
"password = \"' OR 1=1 --\"\n",
"\n",
"try:\n",
" cursor.execute(f\"SELECT * FROM users WHERE username=%s AND password=%s\", (username, password))\n",
" user = cursor.fetchone()\n",
"\n",
" if user:\n",
" print(\"Login erfolgreich\")\n",
" else:\n",
" print(\"Login fehlgeschlagen\")\n",
"except Exception as e:\n",
" print(e)\n",
" conn.rollback()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"interpreter": {
"hash": "a6b707a736c5fbba452b904aff207ddd250a7524df1f8c74db5bc52ff4a2560b"
},
"kernelspec": {
"display_name": "Python [conda env:base] *",
"language": "python",
"name": "conda-base-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.9"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

File diff suppressed because one or more lines are too long

82
ViewsundTrigger.sql Normal file
View File

@ -0,0 +1,82 @@
-- Views und Trigger
-- SQL Tabellen
-- Tabelle Pilot
CREATE TABLE pilot (
personalnr INTEGER PRIMARY KEY,
name VARCHAR NOT NULL,
alter INTEGER,
flugstunden NUMERIC
);
-- Tabelle Flugszeugtype
CREATE TABLE flugzeugtyp (
typbezeichnung VARCHAR PRIMARY KEY,
reisegeschwindigkeit NUMERIC,
typflugstunden NUMERIC
);
-- Tabelle Fliegt
CREATE TABLE fliegt (
personalnr INTEGER REFERENCES pilot(personalnr),
typbezeichnung VARCHAR REFERENCES flugzeugtyp(typbezeichnung),
fliegtflugstunden NUMERIC,
PRIMARY KEY(personalnr, typbezeichnung)
);
-- Befüllen der Tabellen pilot und flugzeugtyp
INSERT INTO pilot (personalnr, name, alter, flugstunden) VALUES (1007, 'James', 44, 20012);
INSERT INTO pilot (personalnr, name, alter, flugstunden) VALUES (1008, 'Zoe', 33, 10020);
INSERT INTO pilot (personalnr, name, alter, flugstunden) VALUES (1009, 'Walther', 27, 5020);
INSERT INTO flugzeugtyp (typbezeichnung, reisegeschwindigkeit, typflugstunden) VALUES ('Airbus A320', 800, 50821);
INSERT INTO flugzeugtyp (typbezeichnung, reisegeschwindigkeit, typflugstunden) VALUES ('Airbus A370', 800, 20312);
INSERT INTO flugzeugtyp (typbezeichnung, reisegeschwindigkeit, typflugstunden) VALUES ('Boing B737', 800, 30021);
-- View
CREATE VIEW pflugstunden AS
SELECT personalnr, name , SUM (flugstunden)
FROM pilot
GROUP BY personalnr, name;
CREATE VIEW typflugstunden AS
SELECT typbezeichnung, SUM (typflugstunden)
FROM flugzeugtyp
GROUP BY typbezeichnung;
SELECT *
FROM pflugstunden;
-- Trigger
CREATE OR REPLACE FUNCTION AktualisiereFlugstunden ( ) RETURNS TRIGGER AS
'
BEGIN
-- aktualisiere die Flugstunden des Piloten
UPDATE pilot SET flugstunden = flugstunden + NEW.fliegtflugstunden WHERE personalnr = NEW.personalnr;
-- aktualisiere die Flugstunden des Flugzeugtyps
UPDATE flugzeugtyp SET typflugstunden = typflugstunden + NEW.fliegtflugstunden WHERE typbezeichnung = NEW.typbezeichnung;
RETURN NEW;
END;
' LANGUAGE 'plpgsql';
CREATE TRIGGER pflugstunden
AFTER INSERT ON fliegt
FOR EACH ROW EXECUTE PROCEDURE AktualisiereFlugstunden ( );
INSERT INTO fliegt (personalnr, typbezeichnung, fliegtflugstunden) VALUES (1007, 'Airbus A320', 10000);
INSERT INTO fliegt (personalnr, typbezeichnung, fliegtflugstunden) VALUES (1008, 'Airbus A320', 1000);
SELECT *
FROM pflugstunden;

361
Zoo-Aufgabe.ipynb Normal file
View File

@ -0,0 +1,361 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Zooverwaltung\n",
"\n",
"In diesem Beispiel wird ein System zur Verwaltung von Zoos implementiert. Hier gibt es eine Tabelle für Personen (TierplegerInnen) und eine Tabelle für Tiere. Eine Person kann mehrere Tiere betreuen, und ein Tier gehört einer Person.\n",
"\n",
"Im ersten Teil sollen Sie 5 Funktionen schreiben, die es Ihnen erlaubt, Personen anzulegen, zu lesen (einzeln und als Liste), zu ändern und zu löschen. Die Tabellen sind dabei vorgegeben und Sie finden im Notebook einige Testaufufe."
]
},
{
"cell_type": "code",
"execution_count": 140,
"metadata": {},
"outputs": [],
"source": [
"import psycopg2\n",
"import psycopg2.extras"
]
},
{
"cell_type": "code",
"execution_count": 141,
"metadata": {},
"outputs": [],
"source": [
"# Verbindung aufbauen\n",
"# TODO: hier müssen Ihre Verbindungsdaten eingetragen werden\n",
"# TODO: ggf. müssen Sie auch den Namen der Datenbank anpassen oder eine leere Datenbank 'zoo' anlegen\n",
"conn = psycopg2.connect(\"dbname=zoo host=/var/run/postgresql user=postgres password=sml12345\")"
]
},
{
"cell_type": "code",
"execution_count": 142,
"metadata": {},
"outputs": [],
"source": [
"# Diese Zelle löscht die Tabellen, falls sie bereits existieren, und legt sie neu an\n",
"sql = \"\"\"\n",
" DROP TABLE IF EXISTS animals;\n",
" DROP TABLE IF EXISTS zookeepers;\n",
"\n",
" CREATE TABLE zookeepers (\n",
" id SERIAL PRIMARY KEY,\n",
" name VARCHAR(255) NOT NULL,\n",
" email VARCHAR(255),\n",
" specialty VARCHAR(255)\n",
" );\n",
"\n",
" CREATE TABLE animals (\n",
" id SERIAL PRIMARY KEY,\n",
" name VARCHAR(255) NOT NULL,\n",
" species VARCHAR(255) NOT NULL,\n",
" zookeeper_id INTEGER,\n",
" FOREIGN KEY (zookeeper_id) REFERENCES zookeepers(id)\n",
" );\n",
"\"\"\"\n",
"\n",
"# SQL ausführen\n",
"cur = conn.cursor()\n",
"cur.execute(sql)\n",
"conn.commit()\n"
]
},
{
"cell_type": "code",
"execution_count": 143,
"metadata": {},
"outputs": [],
"source": [
"# TODO: Implementieren Sie hier die CRUD-Operationen für Zookeeper\n",
"\n",
"# TODO: Tierpleger anlegen, liefert die ID des neuen Tierpflegers zurück\n",
"def create_zookeeper(name, email, specialty):\n",
" try:\n",
" cur.execute(\"\"\"\n",
" INSERT INTO zookeepers (name, email, specialty)\n",
" VALUES (%s, %s, %s)\n",
" RETURNING id;\n",
" \"\"\", (name, email, specialty))\n",
" conn.commit()\n",
" return cur.fetchone()[0]\n",
" except:\n",
" conn.rollback()\n",
"\n",
"# TODO: Tierpfleger nach ID lesen, Tupel zurückgeben\n",
"def read_zookeeper(id):\n",
" cur.execute(\"SELECT * FROM zookeepers where id=%s\", (id,))\n",
" zookeeper = cur.fetchone()\n",
" return tuple(zookeeper) if zookeeper else None\n",
"\n",
"# TODO: Alle Tierpfleger lesen, liefert eine Liste von Tupeln zurück (nach ID sortiert)\n",
"def read_all_zookeepers():\n",
" cur.execute(\"SELECT * FROM zookeepers order by id\")\n",
" return [(zookeeper) for zookeeper in cur.fetchall()]\n",
"\n",
"# TODO: Tierpfleger aktualisieren\n",
"def update_zookeeper(id, name, email, specialty):\n",
" try:\n",
" cur.execute(\"\"\"\n",
" UPDATE zookeepers\n",
" SET name=%s, email=%s, specialty=%s\n",
" WHERE id=%s\n",
" \"\"\", (name, email, specialty, id))\n",
" conn.commit()\n",
" except:\n",
" conn.rollback()\n",
"\n",
"# TODO: Tierpfleger per ID löschen\n",
"def delete_zookeeper(id):\n",
" try:\n",
" cur.execute(\"\"\"\n",
" DELETE FROM zookeepers\n",
" WHERE id=%s\n",
" \"\"\", (id,))\n",
" conn.commit()\n",
" except:\n",
" conn.rollback()\n",
" raise"
]
},
{
"cell_type": "code",
"execution_count": 144,
"metadata": {},
"outputs": [],
"source": [
"# Tests - diese sollten alle erfolgreich durchlaufen werden und nicht verändert werden\n",
"\n",
"john = (\"John Doe\", \"john@example.com\", \"Elephants\")\n",
"jane = (\"Jane Doe\", \"jane@example.com\", \"Giraffes\")\n",
"\n",
"id = create_zookeeper(*john)\n",
"id2 = create_zookeeper(*jane)\n",
"\n",
"assert read_zookeeper(id) == (id, *john)\n",
"assert read_zookeeper(id2) == (id2, *jane)\n",
"\n",
"john = (\"John Smith\", \"john2@example.com\", \"Zebras\")\n",
"update_zookeeper(id, *john)\n",
"assert read_zookeeper(id) == (id, *john)\n",
"\n",
"all_zookeepers = read_all_zookeepers()\n",
"assert len(all_zookeepers) == 2\n",
"assert all_zookeepers[0] == (id, *john)\n",
"assert all_zookeepers[1] == (id2, *jane)\n",
"\n",
"delete_zookeeper(id)\n",
"delete_zookeeper(id2)\n",
"assert read_zookeeper(id) == None\n",
"assert read_zookeeper(id2) == None\n",
"\n",
"all_zookeepers = read_all_zookeepers()\n",
"assert len(all_zookeepers) == 0"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Nutzung eines ORMs\n",
"\n",
"Wie wir sehen, ist das manuelle Erstellen von Zugriffsfunktionen auf die Datenbank sehr aufwändig. Daher gibt es sogenannte Object-Relational-Mapper (ORMs), die uns diese Arbeit abnehmen. Ein bekanntes ORM für Python ist `SQLAlchemy`. Im zweiten Teil des Notebooks werden wir sehen, wie mit `SQLAlchemy` Daten eingefügt und gelesen werden können.\n",
"\n",
"Da Sie Anaconda nutzen, sollte `SQLAlchemy` bereits installiert sein. Falls nicht, können Sie es mit `conda` installieren.\n",
"\n",
"Wenn man `SQLAlchemy` verwendet, definiert man zunächst eine Klasse, die die Tabelle repräsentiert. Hier sind diese Klassen bereits für Personen und Tiere definiert. Sie können sich die Klassen ansehen, um zu verstehen, wie Tabellen in `SQLAlchemy` definiert werden."
]
},
{
"cell_type": "code",
"execution_count": 145,
"metadata": {},
"outputs": [],
"source": [
"## Nutzung von SQLAlchemy\n",
"from sqlalchemy import create_engine, Column, Integer, String, ForeignKey, select\n",
"from sqlalchemy.orm import Session, relationship, declarative_base, join, aliased\n",
"\n",
"Base = declarative_base()\n",
"\n",
"class Zookeeper(Base):\n",
" __tablename__ = 'zookeepers'\n",
" id = Column(Integer, primary_key=True)\n",
" name = Column(String, nullable=False)\n",
" email = Column(String)\n",
" specialty = Column(String)\n",
" animals = relationship(\"Animal\", back_populates=\"zookeeper\")\n",
"\n",
"class Animal(Base):\n",
" __tablename__ = 'animals'\n",
" id = Column(Integer, primary_key=True)\n",
" name = Column(String, nullable=False)\n",
" species = Column(String, nullable=False)\n",
" zookeeper_id = Column(Integer, ForeignKey('zookeepers.id'))\n",
" zookeeper = relationship(\"Zookeeper\", back_populates=\"animals\")\n",
"\n",
"# TODO: Verbingung zur Datenbank herstellen\n",
"engine = create_engine('postgresql://postgres:sml12345@localhost/zoo') "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Anlegen und Abfragen von Objekten in SQLAlchemy\n",
"\n",
"In diesem Teil sollen Sie 2 Personen und 5 Tiere anlegen und dann alle Personen und Tiere abfragen. Sie können sich an den Beispielen orientieren, die im Notebook gegeben sind.\n",
"\n",
"Ein kurzes und übersichtliches Tutorial zur Nutzung von `SQLAlchemy` finden Sie hier:\n",
"\n",
"https://docs.sqlalchemy.org/en/20/orm/session_basics.html\n",
"\n",
"Relevant sind vor allem folgende Abschnitte:\n",
"\n",
"https://docs.sqlalchemy.org/en/20/orm/session_basics.html#opening-and-closing-a-session\n",
"https://docs.sqlalchemy.org/en/20/orm/session_basics.html#adding-new-or-existing-items\n",
"https://docs.sqlalchemy.org/en/20/orm/session_basics.html#querying"
]
},
{
"cell_type": "code",
"execution_count": 146,
"metadata": {},
"outputs": [],
"source": [
"# TODO: zwei Zookeeper anlegen\n",
"with Session(engine) as session:\n",
" with session.begin():\n",
" john = Zookeeper(name=\"John Doe\", email=\"john@example.com\", specialty=\"Elephants\")\n",
" jane = Zookeeper(name=\"Jane Doe\", email=\"jane@example.com\", specialty=\"Giraffes\")\n",
" \n",
" session.add_all([john, jane])"
]
},
{
"cell_type": "code",
"execution_count": 147,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['John Doe', 'Jane Doe']\n"
]
}
],
"source": [
"# TODO: Alle Zookeeper ausgeben\n",
"with Session(engine) as session:\n",
" statement = select(Zookeeper.name)\n",
" print(session.scalars(statement).all())"
]
},
{
"cell_type": "code",
"execution_count": 148,
"metadata": {},
"outputs": [],
"source": [
"# TODO: 3 Elefanten anlegen, die John betreut\n",
"with Session(engine) as session:\n",
" with session.begin():\n",
" john_clause = select(Zookeeper.id).where(Zookeeper.name.like(\"%John%\"))\n",
" john_id = session.scalars(john_clause).first()\n",
"\n",
" session.add_all([Animal(name=animal, species=\"Elephant\", zookeeper_id=john_id) for animal in [\"Babar\", \"Dumbo\", \"Hathi\"]])\n",
" \n",
"# TODO: 2 Giraffen anlegen, die Jane betreut\n",
"with Session(engine) as session:\n",
" with session.begin():\n",
" jane_clause = select(Zookeeper.id).where(Zookeeper.name.like(\"%Jane%\"))\n",
" jane_id = session.scalars(jane_clause).first()\n",
" \n",
" session.add_all([Animal(name=animal, species=\"Giraffe\", zookeeper_id=jane_id) for animal in [\"Melman\", \"Gloria\"]])"
]
},
{
"cell_type": "code",
"execution_count": 149,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"--------------------------------\n",
"| Babar | Elephant | John Doe |\n",
"| Dumbo | Elephant | John Doe |\n",
"| Hathi | Elephant | John Doe |\n",
"| Melman | Giraffe | Jane Doe |\n",
"| Gloria | Giraffe | Jane Doe |\n",
"--------------------------------\n"
]
}
],
"source": [
"# Liste aller Tiere mit ihren Pflegern ausgeben:\n",
"with Session(engine) as session:\n",
" statement = select(Animal.name, Animal.species, Zookeeper.name).select_from(join(Animal, Zookeeper, Animal.zookeeper))\n",
" animals = session.execute(statement).all()\n",
"\n",
" col_widths = (\n",
" max([len(animal[0]) for animal in animals]),\n",
" max([len(animal[1]) for animal in animals]),\n",
" max([len(animal[2]) for animal in animals]),\n",
" )\n",
"\n",
" print(\"-\" * (sum(col_widths) + 10))\n",
" for animal in animals:\n",
" print(f\"| {animal[0]:{col_widths[0]}} | {animal[1]:{col_widths[1]}} | {animal[2]:{col_widths[2]}} |\")\n",
" print(\"-\" * (sum(col_widths) + 10))\n",
" \n",
"\n",
"# Beispielausgabe:\n",
"# \n",
"# ----------------------------------------\n",
"# | Babar | Elephant | John Doe |\n",
"# | Dumbo | Elephant | John Doe |\n",
"# | Hathi | Elephant | John Doe |\n",
"# | Melman | Giraffe | Jane Doe |\n",
"# | Gloria | Giraffe | Jane Doe |\n",
"# ----------------------------------------\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:base] *",
"language": "python",
"name": "conda-base-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.9"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

25
create_movies.sql Normal file
View File

@ -0,0 +1,25 @@
CREATE TABLE genres (
name text UNIQUE,
position integer
);
CREATE TABLE movies (
movie_id SERIAL PRIMARY KEY,
title text,
genre cube
);
CREATE TABLE actors (
actor_id SERIAL PRIMARY KEY,
name text
);
CREATE TABLE movies_actors (
movie_id integer REFERENCES movies NOT NULL,
actor_id integer REFERENCES actors NOT NULL,
UNIQUE (movie_id, actor_id)
);
CREATE INDEX movies_actors_movie_id ON movies_actors (movie_id);
CREATE INDEX movies_actors_actor_id ON movies_actors (actor_id);
CREATE INDEX movies_genres_cube ON movies USING gist (genre);

19040
movies_data.sql Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,180 @@
-- postgreSQL Volltext und Mehrdimensionales
-- Volltext --------Intro ergänzen ---------
-- Als eine Übung zum Spielen mit Multidimensionalität sehen wir uns die cube extension (https://www.postgresql.org/docs/current/cube.html) in postgreSQL an.
-- Als Grundlage dient uns das Buch "7 Wochen, 7 Datenbanken" auf den Seiten 39 bis 41 (Vorbereitung), 41-51 (Volltext) und 51-53 (Mehrdimensionales).
-------------------------------------------------
-- Zunächst in PostgeSQL eine neue Datenbank mit dem Namen "7Wochen" anlegen.
-- dort zunächst die notwendigen Extensions einbinden.
-- Sollten bestimmte extensions in der Installation nicht vorhanden sein müssen diese zunächst in folgendes Verzeichnis kopiert werden: ...\PostgreSQL\17\share\extension
-- Der Befehle zum Hinterlegen der extensions lauten (Query Tool benutzen):
CREATE EXTENSION
IF NOT EXISTS
tablefunc;
CREATE EXTENSION
IF NOT EXISTS
dict_xsyn;
CREATE EXTENSION
IF NOT EXISTS
fuzzystrmatch;
CREATE EXTENSION
IF NOT EXISTS
pg_trgm;
ALTER EXTENSION pg_trgm SET SCHEMA pg_catalog;
CREATE EXTENSION
IF NOT EXISTS
cube;
-------------------------------------------------
-- Anlegen der nötigen Tabellen:
-- Hierzu verwenden wir die Datei create_movies.sql, die in Moodle zu finden ist.
-------------------------------------------------
-- Als nächstes müssen die Tabellen befüllt werden.
-- Hierzu verwenden wir die Datei movies_data.sql, die in Moodle zu finden ist.
-- Nun ist alles bereit und wir können die Aufgaben durchgehen.
-------------------------------------------------
-- Volltext
-- Genauere Beschreibungen im Buch Seiten 41-51
-- UNSCHARFE SUCHE
-- LIKE und ILIKE
SELECT title FROM movies WHERE title ILIKE 'stardust%';
SELECT title FROM movies WHERE title ILIKE 'stardust_%';
-- Reguläre Ausdrücke
-- ~ Regulärer Ausdruck, hier 'the', ^ steht für am Anfang und .* entspricht dem % aus LIKE, also eine beliebige Kette von Zeichen.
-- ! steht für "nicht" und * für "schreibungsunabhängig, also nicht case sensitive.
SELECT COUNT(*) FROM movies WHERE title !~* '^the.*';
-- oder
SELECT title FROM movies WHERE title !~* '^the.*';
-- Levenshtein (extension: fuzzystrmatch)
SELECT levenshtein('bat', 'fads');
SELECT levenshtein('bat', 'fad') fad,
levenshtein('bat', 'fat') fat,
levenshtein('bat', 'bat') bat;
SELECT movie_id, title
FROM movies
WHERE levenshtein(lower(title), lower('a hard day nght')) <= 3;
-- Trigramm (extension: pg_trgm)
SELECT show_trgm('Avatar'); -- a hard day nght
CREATE INDEX movies_title_trigram ON movies
USING gist (title gist_trgm_ops);
SELECT title
FROM movies
WHERE title % 'Avatre';
-- VOLLTEXTSUCHE
-- TSVector, TSQuery
SELECT title
FROM movies
WHERE title @@ 'night & day';
-- Beispiel für Aufteilung in Vectoren und Queries:
SELECT to_tsvector('A Hard Day''s Night'), to_tsquery('english', 'night & day');
-- Beispiel für Anpassungen der Wörterbücher
SELECT to_tsvector('english','A Hard Day''s Night');
SELECT to_tsvector('simple','A Hard Day''s Night');
-- METAPHONE
-- Erster Versuch
SELECT *
FROM actors
WHERE name = 'Broos Wils';
-- Mit Hilfe von Triagramm
SELECT *
FROM actors
WHERE name % 'Broos Wils';
SELECT *
FROM actors
WHERE metaphone(name, 6) = metaphone('jaunie tep', 6);
select metaphone('Luc Julian Peyer', 6);
-- Mit Metaphone, 6 ist hier die Länge des Ausgabestrings in Lautsprache
SELECT title
FROM movies NATURAL JOIN movies_actors NATURAL JOIN actors
WHERE metaphone(name, 6) = metaphone('Broos Wils', 6);
-- Beispiel für verschiedene Umwandlungen
SELECT name, dmetaphone(name), dmetaphone_alt(name), metaphone (name, 8), soundex(name)
FROM actors;
-- STRING-MATCHES KOMBINIEREN
-- Beispiel:
SELECT *
FROM actors
WHERE metaphone(name, 8) % metaphone('Robin Williams', 8)
ORDER BY levenshtein(lower('Robin Williams'), lower(name));
-------------------------------------------------
-- Mehrdimensionales
-- Genauere Beschreibungen im Buch Seiten 51-53
-- cube_ur_coord ist ein Befehl aus der cube-extension (https://www.postgresql.org/docs/current/cube.html)
-- Jeder movie hat also einen Wert bei insgesamt 18 genres
SELECT name, cube_ur_coord('(0,7,0,0,0,0,0,0,0,7,0,0,0,0,10,0,0,0)', position) as score
FROM genres g
WHERE cube_ur_coord('(0,7,0,0,0,0,0,0,0,7,0,0,0,0,10,0,0,0)', position) >0;
-- Hier werden Distanzen berechnet und danach sortiert
SELECT *, cube_distance(genre, '(0,7,0,0,0,0,0,0,0,7,0,0,0,0,10,0,0,0)') dist
FROM movies
ORDER BY dist;
-- Beispiel cube_enlarge:
-- Ausgangspunkt ist (1,1), es wird um 1 erweitert und das für 2 Dimensionen
SELECT cube_enlarge('(1,1)', 1, 2);
-- Nun wird das ganze um die 18 genres aufgebaut mit einer Erweiterung um 5 in 18 dimensionen
SELECT title, cube_distance(genre, '(0,7,0,0,0,0,0,0,0,7,0,0,0,0,10,0,0,0)') dist
FROM movies
WHERE cube_enlarge('(0,7,0,0,0,0,0,0,0,7,0,0,0,0,10,0,0,0)'::cube, 6,18) @> genre
ORDER BY dist;
-- Hier wird nun noch eine Unterabfrage integriert, die es erlaubt über den Filmnamen zu suchen
SELECT m.movie_id, m.title
FROM movies m,
(SELECT genre, title
FROM movies
WHERE title = 'Mad Max') s
WHERE cube_enlarge(s.genre, 5, 18) @> m.genre AND s.title <> m.title
ORDER BY cube_distance(m.genre, s.genre)
LIMIT 10;
-- The end
select * from movies where title % 'Rocky'
select * from actors where name = 'Leonard Nimoy'
select actor_id, count(*) from movies_actors where movie_id in (
'426',
'427',
'430',
'431',
'432'
) group by actor_id;
SELECT actor_id, count(*)
FROM movies_actors
where movie_id in (select movie_id from movies_actors where actor_id = 2887) and actor_id <> 2887 group by actor_id having count(*) > 3 order by count(*) desc;

45
Übungen aus den Folien Normal file
View File

@ -0,0 +1,45 @@
-- Übungen zu Outer joins
/*
Geben Sie eine Query für folgende Tabelle an:
erste Spalte: Name eines Kunden
zweite Spalte: Anzahl Bestellungen (bei Kunden, die keine
Bestellungen haben, soll hier 0 stehen)
*/
select kunde.name, count(bestellung.id)
from kunde
left join bestellung on bestellung.kunde_id = kunde.id
group by kunde.id;
/*
Geben Sie eine Query für folgende Tabelle an:
erste Spalte: Name des Kunden
zweite Spalte: Gesamtbetrag, den der Kunde bezahlen muss
*/
select k.name, sum(p.preis * bp.anzahl)
from kunde k
left join bestellung b on b.kunde_id = k.id
left join bestellung_produkt bp on bp.bestellung_id = b.id
left join produkt p on p.id = bp.produkt_id
group by k.id;
/*
Geben Sie eine Query für folgende Tabelle an:
erste Spalte: Produktname
zweite Spalte: Anzahl wieviele Produkte müssen geliefert werden?
dritte Spalte: wie viele Produkte sind auf Lager?
*/
select p.name, sum(bp.anzahl) bestellt, p.anzahl auf_lager
from produkt p
join bestellung_produkt bp on bp.produkt_id = p.id
group by p.id;
/*
Wie müsste man die Query verändern, damit man nur die Produkte
sieht, die ausverkauft sind?
*/
select p.name, sum(bp.anzahl) bestellt, p.anzahl auf_lager
from produkt p
join bestellung_produkt bp on bp.produkt_id = p.id
group by p.id
having sum(bp.anzahl) >= p.anzahl;