Model Basics


Skippers main functionality is ORM models management. Each ORM model consists of several basic elements. In this article, you will find overview of these elements. All elements are created using Skipper Model tools.

Skipper example model for Doctrine

Skipper Model Tools

Project and Modules

Project represents one specific application. Each project is defined by ORM framework and MVC framework and contain one or more modules.

Skipper Visual model of Doctrine project Atlantic18 and its modules (Contacts, sfDoctrineGuardPlugin, pluginRest)

Modules are used to represent stand-alone parts of your model. Based on ORM and MVC framework you can use module to represent plugins, packages or modules itself. Depending on ORM framework modules represent either individual schema files or directories.

Regions and comments

Those two element types serve for better visual orientation in ORM model. Regions can be created anywhere inside the modules. You can then position entities and comments inside the regions for easier model readability. Comments can be placed anywhere in the module or region to write down important notes.

Skipper regions & comments for better model readability

Note: Regions and comments don’t influence the exported schema files.

Entities

Main element of ORM model is entity. Each entity represents one serializable object from user’s code. It’s up to ORM framework how the entity is stored to database or other storage. The entities are visualized using the extended ER diagram relational notation.

Entities with several types of fields in Skipper visual model ER diagram

Associations

Association element is used to define relation between two entities. Skipper uses owner and inverse terminology to define relationship sides. Owner entity owns the associations as well as association field. Each association leads from owner entity to inverse one. Inverse entity is entity on the opposite side of association, in some terminology also called ‘parent’.

Several types of associations displayed in Skipper extended ER diagram

Note: Skipper supports all available types of associations*: one-to-one, one-to-many, many-to-many.

Inheritance

Another type of relationship between two entities is inheritance. Inheritance is a way how to derive entities (known as subclasses or child classes) from other entities (known as base class, superclass or parent class).

Inheritance between parent and child created in Skipper extended ER diagram

Note: Based on ORM framework Skipper offers several inheritance types (e.g. single table, joined, mapped superclass).

Indexes

Indexes are used to optimize access speed to data storage through selected fields. Apart from previous model elements indexes aren’t currently displayed in visual model. Indexes can be displayed in project tree or inside the entity dialog.

Indexes displayed in Skipper project tree

See also

For detailed description of how to edit model elements see Editing model.

Video Tutorials

Explaining modules

Associations


Inheritance

Property editor