Difference between revisions of "Database - Creating"

From TNG_Wiki
Jump to navigation Jump to search
(fixed image display issues)
Line 93: Line 93:
 
|}
 
|}
  
 +
==== Verify Collation Sequence ====
  
 
{|
 
{|

Revision as of 09:46, 14 October 2011

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

Create Database Wizard

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.

Change collation sequence

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

GoDaddy

The following link provides the tutorial for creating a database on GoDaddy. Provided by Scotty on the TNG Forum

The following is a recap of the steps for creating a database on GoDaddy.COM

  • LOGIN on your account at godaddy.com
  • On "Hosting" drop-down list, select/goto "My Hosting Account"
  • Click "Manage Account" link to go to Control Panel
  • On "Databases" drop-down list, select "MySQL"
  • Click "Create Database" button and enter
1)description,
2)MySQL Database/User Name,
3)password,
4)confirm password
  • select radio button for php version (defaults to 4.1), click OK to create database
  • Arriving back on previous screen with database(s) listed, click the "Edit" icon to view details needed for TNG.
  • You can ignore the Open Manager link and/or button, as you will not typically need to set anything there. Encoding defaults to UTF-8.

Provided by Doug on the TNG Forum

Local WampServer

Using TNG readme.html

It might be possible on a WampServer environment that TNG can create your TNG database, but you will not be able to provide the collation sequence. The following steps show creating a database from the Database Tables section of the TNG readme.html file:

  • enter your WampServer MySQL credentials for the WampServer environment
  • click the Save and Verify button
  • verify the database was created
  • update the collation sequence using phpMyAdmin
  • use the TNG readme.html to create the tables

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.

Verify Collation Sequence

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

Using phpMyAdmin

The following are the steps used to create a new TNG database using phpMyAdmin on a WampServer environment:

  • launch phpMyAdmin from the WampServer icon in the system tray
  • enter the database name in the Create new database field
  • select the collation sequence from the pull down
  • click the Create button
  • use the TNG readme.html to create the tables

Using phpMyAdmin to create your TNG database

create new database

which should return the database created message

create new database

Related Links