안녕하세요
제가 프로그램을 잘못다루는데 이번에 데이터 베이스 수업이 있네요
그래서 죄송하지만 질문이 좀 있습니다 ^^;
제가 er diagram을 그려야하는데요...
그전에 정규화로 틀좀 잡을라고 했는데
영 잘모르겠어요,,
제가 primary key 와 foreign key 를 맞게썼는지 궁굼하네요
그리고 정규화도 맞게했는지 부탁좀 드려요
그리고 여기서 staffNo, Appointment No 그리고 Invoice No 는 primary key로 좋을것 같은데요...
다른 테이블과 연결이 안되있으면 primary key로 쓸수없는거죠?^^;
감사합니다
primary key는 아래 바 이구요
foreign key 는 * 표시에요
|
|
|
|
Pet treatment
|
Pet owner
|
|
|
* Examination No and data
|
Owner No
|
|
|
|
* Pet NO
|
|
Owner name
|
|
|
Treatment No
|
Adress
|
|
|
|
Description
|
|
Home telephone No
|
|
|
Quantity of each type of treatment
|
|
|
|
|
The data the treatment is to begin and end
|
|
|
|
|
Additional comment
|
Pets
|
|
|
|
|
|
Pet No
|
|
|
|
|
|
Pet name
|
|
|
|
Treatment
|
Type of pet
|
|
|
* Treatment No.
|
Description
|
|
|
|
Full description of the treatment
|
D.O.B
|
|
|
|
Cost to the pet owner
|
Data registrated
|
|
|
|
|
* Detail of pet owner (Owner No)
|
|
|
|
|
|
|
|
Appointment
|
|
|
|
|
Appointment No
|
Staff
|
|
|
|
* Owner No.
|
Staff No
|
|
|
|
* Pet No
|
|
Name
|
(Name+Postion=the name of vet) |
|
|
Appointment data and time
|
Position
|
compound primary key
|
|
|
Address
|
|
|
|
|
|
Telephone No
|
|
|
Invoice
|
|
D.O.B
|
|
|
|
Invoice No
|
|
Gender
|
|
|
|
Invoice date
|
National insurance No
|
|
|
* Owner No
|
Current annual salary
|
|
|
* Pet No
|
|
|
|
|
|
Detail of treatment
|
|
|
|
|
Cost of each type of treatment
|
Examination
|
|
|
Total cost
|
|
Examination No
|
|
|
payment of invoice
|
Date and time of examination
|
|
The data the invoice paid
|
*The name of vet
|
|
|
Method of payment
|
* Pet No.
|
|
|
|
|
|
Full description of examination results
|
|
|
future treatment
|
|
|
|
|
|