Datový model newsletteru
DM je jazyk pro popis datových modelů pro GENiE. DM popisuje entity, jejich atributy a vzájemné vztahy. Entity, atributy i vztahy mohou mít speciální vlastnosti, které jsou uvedené v hranatých závorkách.
Zpět na stránce o GENiE se dozvíte co lze s tohoto popisu generovat.
Takto vypadá v jazyce DM datový model jednoduchého newsletteru:
model "Newsletter" "Ondřej Jirman"; (Site news item.) entity news_item [auto_timestamps] { (Mail subject, rss feed title, ...) title text; (Repeats info from the title with more detail.) content text; (News category this item belongs to.) category --> news_category [shared]; } (Newsletter subscriber.) entity news_subscriber [auto_timestamps] { (Subscriber's e-mail.) email text; (Subscriber's real name.) realname *text; (Categories subscriber wants to receive.) categories --> *news_category [shared]; } (News item category.) entity news_category { (Category name.) name text; (Category description.) description text; }
Tento popis odpovídá následujícímu ER diagramu.

