Skip to content

34쪽. Entity란?  #2

@craftsangjae

Description

@craftsangjae

링크드인 이력서가 아래와 같이 구성되어 있다고 생각해보자.

{
"user_id": 251,
"first_name": "Bill",
"last_name": "Gates",
"summary": "Co-chair of the Bill & Melinda Gates... Active blogger.", "region_id": "us:91",
"industry_id": 131,
"photo_url": "/p/7/000/253/05b/308dd6e.jpg",
"organization": "Microsoft"
}

현재 organization은 문자열로 저장되어 있다. 이 정보도 문자열 대신 엔티티로 참조하면 어떨까? 엔티티로 참조한다는 것은, 각 organizationschool_name에 대한 여러 정보들(조직의 로고, 조직원의 수 등)과 관련을 맺을 수 있음을 의미한다. 예를 들어 organization에 대한 엔티티가 아래와 같이 구성되어 있다고 생각해보자.

{
  "Name":  "Microsoft",
  "ISIN" : "US5949181045",
  "Founded": "April 4, 1975", 
  "Founders": "Bill Gates"
}

이력서 json에서 organization 엔티티를 참조한다면, 아래와 같이 될 것이다.

{
"user_id": 251,
"first_name": "Bill",
"last_name": "Gates",
"summary": "Co-chair of the Bill & Melinda Gates... Active blogger.", "region_id": "us:91",
"industry_id": 131,
"photo_url": "/p/7/000/253/05b/308dd6e.jpg",
"organization": {
  "Name":  "Microsoft",
  "ISIN" : "US5949181045",
  "Founded": "April 4, 1975", 
  "Founders": "Bill Gates"
}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions