Skip to content

class Name

James Cobban edited this page Jan 10, 2022 · 19 revisions

class Name

Up: Object-Oriented Access to Database Records

Source Code

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.

Fields

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.

Constants

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.

Table of Contents

Next: class NickName

Clone this wiki locally