mpope9 / nba-sql

:basketball: An application to build an NBA database backed by MySQL, Postgres, or SQLite
Apache License 2.0
171 stars 20 forks source link

How are we supposed to access the data? #94

Closed mvgary094 closed 11 months ago

mvgary094 commented 11 months ago

Hey All,

I have downloaded the data for the 22-23 season but for some reason I cannot figure out how to import it into mysql or sqlite. I'm not sure if I'm supposed to ssh into a docker container, import the data into a mysql server, or query the data with the nba script. Can someone explain what I'm supposed to do with the .db file after I download the data?

CC: @mpope9

mpope9 commented 11 months ago

Hi. You can open that up with sqlite like this:

>sqlite3
SQLite version 3.38.2 2022-03-26 13:51:10
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .open nba_sql.db
sqlite> select * from player limit 1;
2544|LeBron James|None|USA|2003|1|1
mvgary094 commented 11 months ago

Thank you for clearing that up!