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

Implementing Generalization & specialization #341

Closed
Jannik-dev opened this issue Mar 20, 2023 · 2 comments
Closed

Implementing Generalization & specialization #341

Jannik-dev opened this issue Mar 20, 2023 · 2 comments

Comments

@Jannik-dev
Copy link

Hi, I am quite new to dbml and I was searching for generalization & specialization in the documentation and couldn't find it.

Can you specify it and if so how?

@nguyenalter
Copy link
Contributor

We don't have a corresponding syntax for generalization & specialization concepts. However, you can write the DBML based on these concepts. For example:

  Table person {
    id int [pk]
    role varchar
    name varchar
    email varchar
  }
  
  Table student {
    studentID int [pk]
    intake varchar
    major varchar
    personID int [ref: - person.id]
  }
  
  Table lecturer {
    lecturerID int [pk]
    skill varchar
    qualification varchar
    personID int [ref: - person.id]
  }

Result:
image

@Jannik-dev
Copy link
Author

Thanks for the quick response. I will use that approach

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