본문 바로가기

매핑4

[JPA] 상속관계 매핑 복습 https://shins99.tistory.com/114 [JPA] 연관관계 매핑 정리 복습 https://shins99.tistory.com/113 [JPA] 양방향과 단방향 매핑, 연관관계의 주인(mappedBy) 복습 http://shins99.tistory.com/112 [JPA] 기본 키(primary key)와 매핑 복습 https://shins99.tistory.com/111 [Spring Boot] 페이징(paging shins99.tistory.com 상속관계 매핑 - @Inheritance - 관계형 DB는 상속 관계라는 개념이 없고, 슈퍼 타입, 서브 타입 관계라는 모델링 기법이 객체 상속과 유사 - JPA는 객체의 상속 구조와 DB의 슈퍼타입 서브타입 관계를 매핑할 수 있는 상.. 2023. 10. 26.
[JPA] 연관관계 매핑 정리 복습 https://shins99.tistory.com/113 [JPA] 양방향과 단방향 매핑, 연관관계의 주인(mappedBy) 복습 http://shins99.tistory.com/112 [JPA] 기본 키(primary key)와 매핑 복습 https://shins99.tistory.com/111 [Spring Boot] 페이징(paging) 복습 https://shins99.tistory.com/109 [JPA] 영속성 컨텍스트 영속성 컨텍스트란? 영속성 shins99.tistory.com @ManyToOne 다대일 (N : 1) 매핑 - 연관관계 매핑 시 가장 많이 사용하는 매핑 방법 - 다대일은 외래키(FK)를 갖고 있는 "다"쪽이 연관관계의 주인 단방향 매핑 @Entity public cla.. 2023. 10. 25.
[JPA] 양방향과 단방향 매핑, 연관관계의 주인(mappedBy) 복습 http://shins99.tistory.com/112 [JPA] 기본 키(primary key)와 매핑 복습 https://shins99.tistory.com/111 [Spring Boot] 페이징(paging) 복습 https://shins99.tistory.com/109 [JPA] 영속성 컨텍스트 영속성 컨텍스트란? 영속성 컨텍스트는 엔티티를 영구 저장하는 환경이라는 뜻이다. 영 shins99.tistory.com 양방향, 단방향 매핑 양방향 : 두 객체 모두가 각각 참조용 필드를 갖고 참조 단방향 : 두 객체 사이에 하나의 객체만 참조용 필드를 갖고 참조 데이터베이스에서 양방향과 단반향 - 데이터베이스에는 양방향과 단방향이라는 개념 없음 - 외래키(FK) 하나면 양쪽의 연관관계를 알 수 있음.. 2023. 10. 24.
[JPA] 기본 키(primary key)와 매핑 복습 https://shins99.tistory.com/111 [Spring Boot] 페이징(paging) 복습 https://shins99.tistory.com/109 [JPA] 영속성 컨텍스트 영속성 컨텍스트란? 영속성 컨텍스트는 엔티티를 영구 저장하는 환경이라는 뜻이다. 영속성 컨텍스트는 애플리케이션과 DB 사이에서 객체를 shins99.tistory.com 기본 키(Primary key)? - 주 키 또는 프라이머리 키라고 하며, 관계형 데이터베이스에서 레코드의 식별자로 가장 적합한 것으로 선택, 정의된 후보 키 기본키(primary key) 매핑하는 방법 - 총 2가지로 직접 할당과 자동 생성이 존재 직접 할당 : @Id 어노테이션만 사용하여 Id값을 직접할당 자동 생성 : @Id와 @Gene.. 2023. 10. 23.