BusReservationSystemDemo
Tables (5)
Bus (버스)
- id (PK) — int(8) — Primary key — NOT NULL
- bus_name (버스 이름) — varchar(20)
BusDriver (버스 기사)
- id (PK) — int(8) — Primary key — NOT NULL
- bus_id (FK) — int(8) — Foreign key → Bus.id — NOT NULL
- user_id (PK2) — int(8) — Foreign key → User.id — NOT NULL
BusSeat (버스 좌석)
- id (PK) — int(8) — Primary key — NOT NULL
- bus_id (FK) — int(8) — Foreign key → Bus.id — NOT NULL
- busSeat_name (좌석 이름) — varchar(20)
- busSeat_status (예약 여부 - 0: 예약 가능 / 1: 예약 완료) — int(8)
BusSeatGet (좌석 예약 중간 테이블)
- id (PK) — int(8) — Primary key — NOT NULL
- user_id (FK) — int(8) — Foreign key → User.id — NOT NULL
- busSeat_id (FK2) — int(8) — Foreign key → BusSeat.id — NOT NULL
- bus_id (FK3) — int(8) — Foreign key → BusSeat.bus_id — NOT NULL
User (승객)
- id (PK) — int(8) — Primary key — NOT NULL
- user_name (승객 이름) — varchar(20)
- user_age (승객 나이) — int(8)
- user_sex (승객 성별) — int(8)
- user_phone (승객 전화번호) — int(11)
- user_status (중복 예약 방지 - 0: 예약 가능 / 1: 예약 불가) — int(8)