1. 程式人生 > >資料庫練習一:安裝Employees 測試資料庫

資料庫練習一:安裝Employees 測試資料庫

介紹

  • Employees Sample Database 是官方自帶的資料庫。裡面有幾百萬條資料。
  • 所以我就借用該資料庫進行SQL語句的練習以及對資料庫的優化

表結構圖

image.png

image.png

安裝資料庫

  1. git 下載地址。
  2. 進入到專案
  3. 輸入該命令,匯入employees.sql檔案mysql -u root -p < employees.sql
  4. 驗證是否成功 mysql -u root -p < test_employees_md5.sql
INFO
TESTING INSTALLATION
table_name
expected_records expected_crc employees 300024 4ec56ab5ba37218d187cf6ab09ce1aa1 departments 9 d1af5e170d2d1591d776d5638d71fc5f dept_manager 24 8720e2f0853ac9096b689c14664f847e dept_emp 331603 ccf6fe516f990bdaa49713fc478701b7 titles 443308 bfa016c472df68e70a03facafa1bc0a8 salaries 2844047 fd220654e95aea1b169624ffe3fca934
table_name found_records found_crc employees 300024 4ec56ab5ba37218d187cf6ab09ce1aa1 departments 9 d1af5e170d2d1591d776d5638d71fc5f dept_manager 24 8720e2f0853ac9096b689c14664f847e dept_emp 331603 ccf6fe516f990bdaa49713fc478701b7 titles 443308 bfa016c472df68e70a03facafa1bc0a8 salaries 2844047
fd220654e95aea1b169624ffe3fca934 table_name records_match crc_match employees OK ok departments OK ok dept_manager OK ok dept_emp OK ok titles OK ok salaries OK ok computation_time 00:00:13 summary result CRC OK count OK

則匯入成功,可以開始玩了。