class Name
Up: Object-Oriented Access to Database Records
This class is derived from Record to implement the logical interface to a record in the Name table (Names or tblNX). Each entry in this table contains the description of a Name by which a Person was known.
This record presents the following fields:
name | description | synonyms |
---|---|---|
'idnx' | unique numeric identifier | 'id' |
'idir' | reference to instance of Person | |
'surname' | surname. This is the key of the associated instance of Surname | |
'soundslike' | SOUNDEX code for the surname | |
'givenname' | given names | |
'prefix' | text which appears before name | |
'title' | text which appears after name | 'suffix' |
'userref' | user defined reference | |
'type' |
Name::PRIMARY or Name::MARRIED or integer -1, 0, or positive. In the original implementation this field was called 'order' but this conflicts with an SQL reserved word. To support application code which references this field under its original name a synonym is provided. |
'order' |
'marriednamecreatedby' | married name created by: 0 = not a married name, 1 = rule generated married name, 2 = user created married name | 'createdby' |
'birthsd' | not used by this implementation because it violates 3rd Normal Form. | |
'preferredaka' | 1 if this is the preferred "also known as" name. | |
'akanote' | extended textual notes about the name | 'namenote', 'notes' |
'idmr' | the unique numeric key of the associated instance of Family . The synonym is provided for backwards compatibility with Legacy Family Tree. | 'marriednamemaridid' |
'treename' | tree name to permit implementing alternate views of the family tree for independent research projects. |
This class defines the following constants which indicate the purpose to which the record is put:
constant | description | value |
---|---|---|
Name::PRIMARY | primary name | 0 |
Name::MARRIED | married name | -1 |
Name::NAME_INCLUDE_DATES | name_include_dates | 1 |
Name::NAME_SURNAME_FIRST | name_surname_first | 2 |
Name::NAME_INCLUDE_LOCS | name_include_locs | 4 |
The design of this table in the original implementation was not compliant with 3rd Normal Form for relational databases in that the information was replicated in the Persons (tblIR), and Families (tblMR) tables and the values needed to be synchronized across changes. The only values of GivenName and Surname for an individual that are now guaranteed to be maintained are those in this table.
Furthermore this table contained two unique keys for identifying the associated record in the Surnames (tblNR) table. The redundant field IDNR is deprecated, is no longer guaranteed to be maintained, and is hidden from external view.
The field that provided a link to the associated record in the Families (tblMR) table is renamed to IDMR
to clarify its meaning.
- new Name($parms)
- $name->getName($options, $options2)
- $name->get($fieldname)
- $name->set($fieldname, $value)
- $name->save($xml)
- $name->getPerson()
- $name->getFamily()
- $name->getSurnameRec()
Next: class NickName