Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Think the logical model #3

Open
ogom opened this issue Aug 30, 2015 · 1 comment
Open

Think the logical model #3

ogom opened this issue Aug 30, 2015 · 1 comment
Assignees

Comments

@ogom
Copy link
Member

ogom commented Aug 30, 2015

映画の上映日時を決めて、その上映日時のチケットが発行されれば予約されたとみなす。

movie(映画)
 |
schedule(スケジュール)
 |
ticket(チケット)
@iyuuya iyuuya self-assigned this Aug 30, 2015
@ogom
Copy link
Member Author

ogom commented Aug 30, 2015

Cross Modelling

論理モデルを軽量マークアップ言語で記述する記法に十字型を利用する。

One-to-many

-|-||- は One-to-many を示す。

house -|-||- hall
  • house has many halls
  • hall belongs to house

Many-to-many

-+- は Many-to-many を示す。

seat -+- schedule
      |
    ticket
  • seat has many tickets
  • seat has many schedules through tickets
  • schedule has many tickets
  • schedule has many seats through tickets

Schema

-|- は Schema を示す。

movie | resource
------|---------
id    | name
      | address

Examples

  • 場所
house(映画館) -|-||- hall(ホール) -|-||- seat(席)
  • 時間
movie(映画) -|-||- schedule(スケジュール) -|-||- ticket(チケット)
  • 場所 + 時間 = 空間
seat(席) -+- schedule(スケジュール)
          |
        ticket(チケット)
  • 映画
movie | resource
------|---------
id    | name
      | address

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants