Database - Creating

From TNG_Wiki
Jump to navigation Jump to search


Creating your TNG Database



Article Under Construction


The Database - Creating article provides instructions on creating your TNG database. On a localhost WampServer installation, you may be able to use the TNG readme.html to create the database, but most hosting services require that you create your database before you install TNG.

You should consider using MySQL 5 if you have a choice since MySQL 4 went off support at the end of 2008. Because MySQL 5 uses utf8 definitions for its fields you may want to consider creating the database as UTF-8 from the start and avoid a future conversion. However, you should consider whether you have all the tools you need to maintain and support your data in UTF-8 encoding.

Considerations

Desktop genealogy program

Will you be using your desktop genealogy program as your master source?

If yes, then does it support exporting a gedcom in UTF-8 encoding? Reunion on Macintosh and PAF on Windows are two that have a UTF-8 encoding option on export.

ASCII Editor

Do you have an ASCII editor that supports UTF-8 encoding? TextWrangler on Macintosh and the latest version of Notepad++ on Windows both have options for Converting to UTF-8 without BOM (byte order mark) and for doing Save As in UTF-8 encoding without BOM.

Accented characters

Will you be using languages or names from languages that use accented characters? While it is possible to display accented characters in ANSI or ISO-8859-1, provided your database is using latin1, and your gedcom is exported as ANSI, it would be better at the outset to use UTF-8 if this is possible.

Defining your database

The following are a couple of examples of how to create your database as UTF-8:

Simply Hosting

On Simply Hosting you can select MySQL Databases Wizard to create the database. Enter the database name you want to use and click the Create Database button.

Create Database Wizard

Change collation sequence

Because you cannot specify the collation sequence, after the database is created you need to change the collation sequence by clicking on the pull down collation sequence list and selecting the appropriate collation sequence in phpMyAdmin before you add any tables and data to the database as shown in the image.

ICDSoft

On ICDSoft, you can specify both the database name and collation sequence in MySQL Database Manager screen. If you have a choice of using MySQL 5 or MySQL 4, you should chose MySQL 5 to avoid having to convert your database later. You should be aware that MySQL 4 went off support at the end of 2008.

ICDSoft Create Database

Local WampServer

creating database in readme.html

On a local WampServer environment, you can use the TNG readme.html file to create the TNG database as shown in the image.

When you click the Save and Verify button, you should get the following message. If you do not get this message, then you will need to create the database using phpMyAdmin.

Database created

You should verify with phpMyAdmin that the database was created verify and change collation sequence
Once in phpMyAdmin, you will need to change the collation sequence to utf8_unicode_ci before you define the TNG tables, because it defaults to latin1_swedish_ci in WampServer, just as most hosting companies have their server set to default to using latin1_swedish_ci.

change collation sequence

which should return an updated collation message when you click the Go button update collation sequence

Related Links