Tags
- 트리
- 쟝고
- Article & User
- Django
- Tree
- stack
- migrations
- Vue
- 스택
- 통계학
- distinct
- Queue
- 큐
- outer join
- 그리디
- 뷰
- drf
- create
- update
- 백트래킹
- ORM
- 완전검색
- N:1
- delete
- count
- 이진트리
- DB
- regexp
- SQL
- M:N
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Notice
Recent Posts
Link
목록중개모델 (1)
데이터 분석 기술 블로그

1. 예약 모델 생성환자 모델의 외래 키를 삭제하고 별도의 예약 모델을 새로 생성합니다.예약 모델은 의사와 환자에 각각 N:1 관계를 갖습니다.# hospitals/models.py# 외래 키 삭제class Patient(models.Model): name = models.TextField() def __str__(self): return f'{self.pk}번 환자 {self.name}'# 중개모델 작성class Reservation(models.Model): doctor = models.ForeignKey(Doctor, on_delete=models.CASCADE) patient = models.ForeignKey(Patient, on_delete=models..
DB
2024. 4. 29. 21:34