We've made some awesome improvements in 2.x, compared to 1.0:
- Getting rid of old columns which are no longer required
- Standardizing and simplifying the table and column names
- Moving to just one language table
These improvements should make this database easier to consume in software.
- JSON API routes which you can access: https://github.com/sikher/gurbanidb#api-routes
- Rolling your own JSON Web API: https://github.com/sikher/gurbanidb
- Make sure you first know the path to your MySQL command-line. On Windows, if you have XAMPP installed this may be:
C:\xampp\mysql\bin\mysql.exe
. On Linux, this will usually be justmysql
. - Make sure you know your MySQL username, password and hostname. If working locally, your hostname will usually just be
localhost
. - Find out the link to your PhpMyAdmin installation. Again if using XAMPP, this will usually be
http://localhost/phpmyadmin/
.
- Download and unzip the file
gurbanidb_v2.mysql.sql.zip
which gives you all the tables you need WITH data - Use
phpmyadmin
to create a new database with the collationutf8_unicode_ci
. You can name the database anything you want, but a suggestion would begurbanidb
. - Open up a new terminal or command prompt and
cd
into the directory yourgurbanidb_v2.sql
file is located in - Then run the following command in the terminal or command prompt, replacing the values with your MySQL connection details (and using the path to mysql we defined earlier in the Setup):
mysql
-uusername
-ppassword
-hhostname
database
< gurbanidb_v2.sql
- That's it you're done! Please check your database. It should have the following records:
- authors - 38
- languages - 76
- melodies - 61
- scriptures - 60403
- translations - 3,201,359 (Divided by 60403 = 53 Translations)
- transliterations - 1,328,866 (Divided by 60403 = 22 Transliterations)
- Unzip the file
gurbanidb_v2.mssql.bak.zip
which is a backup file - Restore the contents of this backup by following these instructions: https://msdn.microsoft.com/en-us/library/ms186390(v=sql.90).aspx
- Using
MySQL Workbench
, selectData Import / Restore
, select the GurbaniDB database and it will be created in MySQL OR follow the instructions in the MySQL section above - For
MSSQL Server
, please ensure that the SQL server agent is running on your database instance. If not then either try to start the agent from the management studio or go in Configuration Tools -> Sql server configuration manager and start service from there. - Install
Microsoft SQL Server Migration Assistant for MySQL
(https://www.microsoft.com/en-us/download/details.aspx?id=43688), you can ignore the warnings of drivers while installing. It gives these messages for untested drivers. Migration will still work. - Start
Microsoft SQL Server Migration Assistant for MySQL
and create a new project. - First connect to MySQL using your password. Please ensure that you choose Unicode Driver instead of ANSI driver otherwise migration will not work.
- Next connect to MSSQL. You will have to choose some database also. If you don't want to select any existing one then type a new dummy name. It will prompt to create, go ahead with that, you can delete it later.
- Choose GurbaniDB from MySQL and first click on convert schema to create an empty database structure in MSSQL
- Once that is done, go into the MSSQL window, right click on the newly created schema and choose "Synchronize with database", this will create the empty database in MSSQL
- Once this is done, again choose GurbaniDB in MySQL and click on
Migrate Data
to finally start the migration process. - It will take some time (around 10 minutes) as there are a lot of rows. Once migration is done, a report will be shown with record count for each table, compare it with what is given here:
- authors - 38
- languages - 76
- melodies - 61
- scriptures - 60403
- translations - 3,201,359 (Divided by 60403 = 53 Translations)
- transliterations - 1,328,866 (Divided by 60403 = 22 Transliterations)
Note: Additional instructions may be found here: https://msdn.microsoft.com/en-us/library/hh313137(v=sql.110).aspx
If you are upgrading from the 2.0 database to the current database you may also want to delete your old tables from your database. Since all the table names have changed in 2.1, your existing tables will not be overwritten, but the new API will only work against these new tables