Skip to content
This repository has been archived by the owner on Apr 12, 2019. It is now read-only.

Latest commit

 

History

History
61 lines (51 loc) · 4.62 KB

2.x.md

File metadata and controls

61 lines (51 loc) · 4.62 KB

GurbaniDB 2.x Documentation

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.

Web API (api.sikher.com)

MySQL

Setup MySQL

  1. 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 just mysql.
  2. Make sure you know your MySQL username, password and hostname. If working locally, your hostname will usually just be localhost.
  3. Find out the link to your PhpMyAdmin installation. Again if using XAMPP, this will usually be http://localhost/phpmyadmin/.

Installing GurbaniDB using PhpMyAdmin and the MySQL command-line

  1. Download and unzip the file gurbanidb_v2.mysql.sql.zip which gives you all the tables you need WITH data
  2. Use phpmyadmin to create a new database with the collation utf8_unicode_ci. You can name the database anything you want, but a suggestion would be gurbanidb.
  3. Open up a new terminal or command prompt and cd into the directory your gurbanidb_v2.sql file is located in
  4. 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 -u username -ppassword -h hostname database < gurbanidb_v2.sql
  5. 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)

MSSQL (Microsoft SQL Server)

Setup MSSQL

Converting MySQL to MSSQL (Microsoft SQL Server)

  • Using MySQL Workbench, select Data 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

Upgrading from 2.0 to 2.x?

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