본문 바로가기

dev

[mysql] mysql sample db

반응형

mysqltutorial.org 에서 제공하는 mysql sample db

http://www.mysqltutorial.org/mysql-sample-database.aspx 


샘플 DB 스키마는 아래와 같다.


MySQL Sample Database Schema

The MySQL sample database schema consists of the following tables:


  • Customers: stores customer’s data
  • Products: stores a list of scale model cars.
  • ProductLines: stores a list of product line category.
  • Orders: stores orders placed by customers.
  • OrderDetails: stores order line items in each order.
  • Payments: stores payments made by customers based on their account.
  • Employees: stores all employee information include organization unit structure such as who reports to whom.
  • Offices: stores sale office data.




위 사이트에서 제공되는 스키마 파일을 다운 로드받은후, 그대로 인서트 시킨다.

제공되는 스키마 파일의 DB명은 'classicmodels' 이므로, 사용하는 DB명에 맞게 편집후 그대로 인서트!


mysql -u[아이디] -p[패스워드] [디비명] < 스키마파일명


좀더 확장된 mysql sample db 파일을 원한다면..

http://dev.mysql.com/doc/employee/en/index.html

http://www.ntu.edu.sg/home/ehchua/programming/sql/SampleDatabases.html

반응형