Thread: [Modeling-cvs] ProjectModeling/Modeling/doc/UserGuide DefiningaModel.tex,1.10,1.11
Status: Abandoned
Brought to you by:
sbigaret
|
From: <sbi...@us...> - 2003-07-04 17:05:17
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide
In directory sc8-pr-cvs1:/tmp/cvs-serv27258/Modeling/doc/UserGuide
Modified Files:
DefiningaModel.tex
Log Message:
Commented out sections on PyModels until PyModels are integrated into the main trunk
Index: DefiningaModel.tex
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide/DefiningaModel.tex,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** DefiningaModel.tex 31 May 2003 15:13:39 -0000 1.10
--- DefiningaModel.tex 4 Jul 2003 17:05:14 -0000 1.11
***************
*** 14,20 ****
Models may be specified in one of two equivalent formats -- in python or in XML.
Both ways are detailed in this chapter.
! The next section revies the main concepts of Entity-Relationship Modeling,
with the rest of the chapter dedicated to how such models map onto
! the python description, or PyModel, and the XML description.
Some included tools may help you with the design and management of
--- 14,21 ----
Models may be specified in one of two equivalent formats -- in python or in XML.
Both ways are detailed in this chapter.
! The next section reviews the main concepts of Entity-Relationship Modeling,
with the rest of the chapter dedicated to how such models map onto
! %the python description, or PyModel, and
! the XML description.
Some included tools may help you with the design and management of
***************
*** 22,26 ****
command-line scripts. Thus, the easiest way to define a model would be to use the
ZModelizationTool inside a Zope instance. However, you do not {\em need} a
! Zope instance to design models, as both PyModels and XML models may be
designed in your favorite editor.
Both tools includes some validation logic, so that
--- 23,28 ----
command-line scripts. Thus, the easiest way to define a model would be to use the
ZModelizationTool inside a Zope instance. However, you do not {\em need} a
! Zope instance to design models, as %both PyModels and
! XML models may be
designed in your favorite editor.
Both tools includes some validation logic, so that
***************
*** 102,185 ****
! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
! \section{PyModels}
!
! A PyModel is a python module that defines a variable \var{model}
! that is of type \var{Model}. Objects of type \var{Model} collect
! all information about their entities, as a list of objects of
! type \var{Entity}. Similarly, entities collect objects defining
! attributes and relationships. A \var{model} instance may also
! define bi-directional relationships as associations. The python
! classes for each of these is described below. To reduce boilerplate
! code, PyModels allow defaults to be specified for all values.
! Furthermore, sub-types for frequently used constructs are provided,
! and others may of course be defined as necessary.
!
! \subsection{A sample PyModel}
!
! Before dealing with all teh details, here is an overview of
! a PyModel. Note the the \var{id} default property for entities,
! as well as the predefined \var{Attribute} sub-types,
! \var{APrimaryKey} and \var{AString}.
!
! \begin{verbatim}
! from Modeling.PyModel import *
!
! Entity.defaults['properties'] = [
! APrimaryKey('id', isClassProperty=0, isRequired=1, doc='Primary key!')
! ]
! AString.defaults['width'] = 30
!
! model = Model('StoreEmployees',adaptorName='Postgresql',
! connDict={'database': 'STORE_EMPLOYEES'} )
!
! model.entities = [
! Entity('Employee',
! properties = [
! AString('corporateName', isRequired=1),
! ]
! ),
! Entity('SalesClerk', parent='Employee',
! properties = [ ... ]
! ),
! Entity('Mark',
! properties = [ ... ]
! )
! Entity('Store',
! properties = [ ... ]
! )
! ]
! model.associations = [
! Association('Employee', 'Store'),
! Association('Mark', 'Employee'),
! ]
! \end{verbatim}
!
! \subsection{PyModel types in detail}
!
! \subsubsection{Model}
!
! tbd.
!
! \subsubsection{Entity}
!
! tbd.
!
! \subsubsection{Attribute}
!
! AInteger, AString, AFloat, ADateTime, APrimaryKey, AForeignKey
!
! \subsubsection{Relationship}
!
! RToOne, RToMany
!
! \subsubsection{Association}
!
! tbd.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
! \section{Description of the {\sc xml} format}
! \subsection{Overview of the xml}
Before going into details, here is the skeleton of an xml-model:
--- 104,187 ----
! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
! %\section{PyModels}
! %
! %A PyModel is a python module that defines a variable \var{model}
! %that is of type \var{Model}. Objects of type \var{Model} collect
! %all information about their entities, as a list of objects of
! %type \var{Entity}. Similarly, entities collect objects defining
! %attributes and relationships. A \var{model} instance may also
! %define bi-directional relationships as associations. The python
! %classes for each of these is described below. To reduce boilerplate
! %code, PyModels allow defaults to be specified for all values.
! %Furthermore, sub-types for frequently used constructs are provided,
! %and others may of course be defined as necessary.
! %
! %\subsection{A sample PyModel}
! %
! %Before dealing with all teh details, here is an overview of
! %a PyModel. Note the the \var{id} default property for entities,
! %as well as the predefined \var{Attribute} sub-types,
! %\var{APrimaryKey} and \var{AString}.
! %
! %\begin{verbatim}
! %from Modeling.PyModel import *
! %
! %Entity.defaults['properties'] = [
! % APrimaryKey('id', isClassProperty=0, isRequired=1, doc='Primary key!')
! %]
! %AString.defaults['width'] = 30
! %
! %model = Model('StoreEmployees',adaptorName='Postgresql',
! % connDict={'database': 'STORE_EMPLOYEES'} )
! %
! %model.entities = [
! % Entity('Employee',
! % properties = [
! % AString('corporateName', isRequired=1),
! % ]
! % ),
! % Entity('SalesClerk', parent='Employee',
! % properties = [ ... ]
! % ),
! % Entity('Mark',
! % properties = [ ... ]
! % )
! % Entity('Store',
! % properties = [ ... ]
! % )
! %]
! %model.associations = [
! % Association('Employee', 'Store'),
! % Association('Mark', 'Employee'),
! %]
! %\end{verbatim}
! %
! %\subsection{PyModel types in detail}
! %
! %\subsubsection{Model}
! %
! %tbd.
! %
! %\subsubsection{Entity}
! %
! %tbd.
! %
! %\subsubsection{Attribute}
! %
! % AInteger, AString, AFloat, ADateTime, APrimaryKey, AForeignKey
! %
! %\subsubsection{Relationship}
! %
! % RToOne, RToMany
! %
! %\subsubsection{Association}
! %
! %tbd.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
! \section{Description of the {\sc xml} format\label{model-xml-format}}
! \subsection{Overview of the xml\label{model-xml-format-overview}}
Before going into details, here is the skeleton of an xml-model:
***************
*** 351,355 ****
! \subsubsection{Primary keys}
Primary keys are attributes/columns that an {\sc rdbms} uses to uniquely
--- 353,357 ----
! \subsubsection{Primary keys\label{entity-props-primary-keys}}
Primary keys are attributes/columns that an {\sc rdbms} uses to uniquely
***************
*** 499,503 ****
\end{description}
! \subsection{Relationship}
--- 501,505 ----
\end{description}
! \subsection{Relationship\label{relationships-props}}
***************
*** 630,634 ****
! \subsubsection{Joins}
A join has no equivalent in the object model. In fact, it is one the rare
--- 632,636 ----
! \subsubsection{Joins\label{joins-props}}
A join has no equivalent in the object model. In fact, it is one the rare
***************
*** 949,955 ****
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
! \section{Tools}
! \subsection{The ZModeler}
The ZModelization is a tool to help you design a model.
--- 951,957 ----
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
! \section{Tools\label{model-design-tools}}
! \subsection{The ZModeler\label{model-design-tools-ZModeler}}
The ZModelization is a tool to help you design a model.
***************
*** 978,982 ****
Tool' where appropriate (for example, in the root directory). That's it.
! \subsection{Scripts}
(requires review)
--- 980,984 ----
Tool' where appropriate (for example, in the root directory). That's it.
! \subsection{Scripts\label{model-design-tools-scripts}}
(requires review)
|