인프런 커뮤니티 질문&답변
시퀀스 전략에 대해 질문이 있습니다
작성
·
309
퀴즈
A class using the `@Entity` annotation for JPA mapping must basically meet these important conditions: 1. It must have a no-argument constructor (default constructor). 2. It must have a field representing the primary key, usually marked with the `@Id` annotation. 3. The class itself cannot be `final`. 4. It cannot be an `enum` or an `interface`.
All fields must be public
must be a final class
Must have a public or protected default constructor
must include at least one static method
답변 1
2
안녕하세요. 해마님, 공식 서포터즈 OMG입니다.
키 생성전략에서 시퀀스 방식과 테이블 방식이 나뉘어져 있는데,
테이블 방식은 시퀀스를 모방한 '테이블'을 생성하여 키를 추출하는 것이고,
테이블이란 개념은 모든(?) 관계형 DB에서 사용하는 개념이니 강의에서 설명하는 장점인 모든 데이터베이스에서 사용하다는 뜻으로 설명하신 것이고
단점으로 성능을 얘기하셨는데
채번 테이블 성능 관련 아래 링크를 참고해주세요.
http://www.gurubee.net/lecture/4253
감사합니다.






감사합니다! 설명이 자세히 나와있네요!