[Spring boot] Member 테이블과 product 테이블 엮어보기
JAVA/- Spring·2022. 4. 18.
하나의 유저가 여러개의 물품을 가지고 있는것을 DB에 저장하려고 합니다. 이를 위해서는 다대일 구조로 만들어보는것을 생각했습니다. 일단 Product 테이블을 만들어봅니다. create table product( productid int not null auto_increment comment 'PK', memberid int not null comment '회원id', product_name varchar(50) not null comment '물품 이름', auction_price int default 0 comment '경매가격', product_price int not null comment '즉시거래가격', image_namesrc varchar(100) comment '이미지', product..