[0920] DB설계및구현2
An online bookstore hires you to develop a database for its book selling information system. The database should record data about its customers and books. Each customer has a unique Customer ID, name(First and Last), address (Street, city, State, Zip code), and phone number. A book has its title, unique ISBN, author(s), publisher, and price. When a customer purchases books, data of purchase and the number of copies of the book purchased should be recorded.
설명:
온라인 서점이 책 판매 정보 시스템에 대한 데이터베이스를 개발하려 합니다. 데이터베이스는 고객과 책에 관한 데이터를 기록해야 합니다. 각 고객은 고유한 고객 ID, 이름(이름 및 성), 주소(거리, 도시, 주, 우편 번호) 및 전화 번호를 가지고 있습니다. 책에는 제목, 고유한 ISBN, 저자, 출판사, 가격이 있습니다. 고객이 책을 구매할 때 구매 데이터와 구매한 책의 수량을 기록해야 합니다.
테이블:
- 고객 (Customers):
- 책 (Books):
- 구매 (Purchases):
이렇게 3개의 테이블로 데이터베이스를 설계할 수 있습니다. "구매" 테이블에서 "고객ID"와 "ISBN"은 각각 "고객" 및 "책" 테이블을 참조하는 외래 키(Foreign Key)입니다.
primary key 밑줄 안 침. -> 주의할 점 ! 밑줄 쳐야함.
NCAA BASKETBALL EACH UNIVERSITY BASKETBALL TEAM HAS AN INTERNAL ID In the conference that uniquely identifies it. Each team also has a name and carries its current rank with it. Each team has 12 players. A player has SSN, name (First and Last), height, weight and position they play. A player may play multiple positions. Each team also has a head coach. The coach's SSN, name (First and Last), and salary will be stored in the database. Each team plays against other teams. For each game, the date of the game and the place of the game are recorded.
엔터티, 속성 및 관계
1. 팀 (Team)
2. 선수 (Player)
3. 감독 (Coach)
4. 게임 (Game)
관계
- 팀은 여러 선수들을 가집니다. (팀 - 12명의 선수들)
- 팀은 하나의 감독을 가집니다. (팀 - 감독)
- 팀은 다른 팀과 대전합니다. 게임 엔터티를 통해 두 팀 간의 경기를 기록합니다.
위의 설계는 간략한 버전입니다. 실제 데이터베이스 설계에서는 더 많은 상세한 속성과 엔터티, 그리고 복잡한 관계를 고려해야 할 수도 있습니다.