Skip to Main Content
Database Modeling with Microsoft® Visio for Enterprise Architects
book

Database Modeling with Microsoft® Visio for Enterprise Architects

by Terry Halpin, Ken Evans, Pat Hallock, Bill Maclean
September 2003
Intermediate to advanced content levelIntermediate to advanced
425 pages
16h 30m
English
Morgan Kaufmann
Content preview from Database Modeling with Microsoft® Visio for Enterprise Architects
If SQL Server is the target DBMS, each of these constraints is mapped to a stored
procedure, which you can view in the Code Editor. The constraint code generated
(minus comments) is as follows.
Create Procedure sp_Parenthood_freq1 as
if (not exists (select
*
from “Parenthood”
group by “Parenthood”.”childld”
having count(
*
) > 2))
return 1
else return 2
Create Procedure sp_Parenthood_ring2 as
if (not exists (select
*
from “Parenthood” X, “Parenthood” Y
where X.”parentld” = Y.”childld” and X.”childld” = Y.”parentld”)
and
not exists (select
*
from “Parenthood” X, “Parenthood” Y, “Parenthood” Z
where X.”childld” = Y.”parentld” and Y.”childld” = Z.”childld”
and X.”parentld” ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Data Modeling: A User-Driven Approach

Mastering Data Modeling: A User-Driven Approach

John Carlis
Architecting Data-Intensive SaaS Applications

Architecting Data-Intensive SaaS Applications

William Waddington, Kevin McGinley, Pui Kei Johnston Chu, Gjorgji Georgievski, Dinesh Kulkarni
Limitless Analytics with Azure Synapse

Limitless Analytics with Azure Synapse

Saranya Ravichander, Prashant Kumar Mishra

Publisher Resources

ISBN: 9781558609198