Database Guide
  A key component of TrackMyTrains.com is its application database. This Database Guide presents the underlying application database structure, the individual data elements or fields, and the intended uses for these. Proper understanding and use of the database is essential to getting the most out of the system.
 
  Database Guide Topics:
  Database Guide Overview

Database Structure

The Item Database

The Inventory Database

Edit Tables

Technical Term Definitions

Reference Summary

 
   
  Database Guide Overview
  The purpose of this guide is to describe the databases underlying the TrackMyTrains.com application and the intended use of the data elements, or "fields", in the system. It starts with an overview of the two-segment structure and then goes on to describe the details of each data element within these two segments. Following these data field descriptions, it describes the purpose, utilization, and maintenance of the "Edit Tables" used to facilitate the maintenance of many of the database fields. The Database Guide wraps up with some definitions of technical terms and a reference summary of all data elements.

The actual process of entering data into TrackMyTrains.com is covered in the Application Guide preceding this section.
 
 
 
  Database Structure
  The primary application database of TrackMyTrains.com is a two-segment relational database. The first is the Item segment and the second is the Inventory (Invty.) segment.

These two segments are related in a "one-to-many" relationship. This means that for any item record, there could be zero, one, or more inventory records related to that item.

Consider the example where a collector owns three Micro-Trains 50' Standard Box Cars with a Manufacturer Model Number of 75070, identical markings, and that are otherwise indistinguishable as items. The user would enter this kind of item information once as an item record. Then, the user would enter the information for each physical car into three inventory records related to the common item record. This information could include different purchase dates, conditions, storage locations or other things that might differ across the three different physical occurrences of the same item. In this way, our system treats these three almost identical cars as a single occurrence of item and three occurrences of the inventory information.

The item record describes the item in its entirety and refers to items that you own or want to own. The inventory section allows you to put specific information about an item such as its condition, location, value, cost, and sale information. If you own more than one of each item, the inventory section allows you to keep track of each individual piece without having to enter all common information more than once.

You could have an item record without an inventory record, such as an item you have never acquired and have not yet chosen to put on your wish list. But you could never have an inventory record without an item record describing what it is that is being inventoried.

The design of the system is such that any physical items that are identical in every field contained in the item segment should have one item record and as many related inventory records as there are occurrences of that item (even if this inventory information is also identical for each piece.) The only slight exception to this is for "wish list" items. For these, an inventory record is added to the item record and the wish list field is clicked on to indicate a wish list item.

One final concept associated with our database structure is that of the record key. The system assigns a unique sequential item number to each record so that each item record can be uniquely identified or (named) internally. Users have no control of this item number assignment process, but they can use it to find and specify an exact record that could in every other way be identical to another item record. Within this application, the item key is an 8-digit number (so we can theoretically accommodate collections with up to 100 million different items!) For every inventory record associated with an item, an additional sequence number is added to the end of the item number to give a unique key to each inventory record associated with an item.

 
 
 
  The Item Database
  The Item Database maintains all the information describing a particular product that is independent of an actual occurrence of the item. This includes most descriptive and catalog type of information. Information that pertains to condition, acquisition, sales or storage location, that is, information that could vary across different physical occurrences of an item, is stored in the Inventory Database Segment. In this part of the Database Guide we will describe each data element in the Item Segment.
   
 
  CONTROL
 

The item key is a system assigned control field.

 

Item Key

 
8-digit number uniquely identifying the database record
System assigned, not maintainable by user
Example: 0000-0237
Comment: This is the most reliable field for specifying the exact record for maintenance, etc. as it can never be ambiguous.
   
   
  CLASSIFICATION
 

Three table edited classification fields allow for increasing levels of detail in classifying your items. A fourth free-format field allows additional descriptive information.

  Item Category (** Displays on "View / Find List" **)
 
Broadest item classification group, used for organization of collection
User assigned, table edited
Examples: Locomotive - Diesel, Car - Freight, Structure - Bridge, Signal
Comment: Most important organizational field
Recommend not varying values far from intended usage as suggested in the initially provided edit table.
 
  Item Type (** Displays on "View / Find List" **)
 
Refines the classification of an item within its Category
User assigned, table edited by a table sensitive to the Category
Examples: SD 40, Box Car, Railroad Double Track (Bridge), Single Head
Comment: Important organizational field.
 
  Item Sub Type (** Displays on "View / Find List" **)
 
Further refines classification of an item within its Category and Type
User assigned, table edited by a table sensitive to Category and Type
Examples: Phase II High Nose w/ Dynamic Brakes, 50-foot double plug door, Warren Truss - 260 foot, 3 color searchlight
Comment: Using in conjunction with Type to provide details about the item rather than creating too many item types will result in more organized collection information.
   
  Item Description
 
Additional field to provide optional descriptive details about an item
User maintained, free format, not edited
Examples: With ditch lights, short ladders w/o roof walk, operational airplane warning light, with relay box
   
 
  IDENTIFICATION
  The identification fields, primarily used for locomotives and other rolling stock, let you identify your items the same way the railroads do.
  Railroad Abbreviation (** Displays on "View / Find List" **)
 
Abbreviation of the Railroad Name (used for reports and searches)
User assigned, table edited in association with the railroad name
Examples: ATSF, B & O, SP, SSW
Comment: The edit table for this field is shared with the edit table for the railroad name to ensure consistency. For convenience, it is sorted by railroad abbreviation, regardless of Railroad Name.
 
  Railroad Name
 
Name of the Railroad
User assigned, table edited in association with the railroad abbreviation
Examples: Atchison, Topeka & Santa Fe; Baltimore & Ohio; Southern Pacific, Cotton Belt
Comment: The edit table look-up is alphabetical by Railroad Name regardless of the Railroad Abbreviation.
 
  Road Number (** Displays on "View / Find List" **)
 
Identification number assigned by the railroad
User maintained, free format
Examples: 6342, 34593345, PBC 1234
Comment: While usually just a number in the context of the railroad, we recommend incorporating fictitious railroad names into the road number rather than cluttering up the railroad edit table with these names. PBC 1234 could stand for Pepsi-cola Bottling Company on a novelty car as in the third example above.
 
   
  DETAILS
  Details let you keep other useful information about your collection items.
  Item Color
 
Color or color scheme of the item
User maintained, free format
Examples: Dark Brown, Black Widow, War Bonnet: Red over Silver
 
  Item Markings
 
Special markings, heralds, graffiti, and the like
User maintained, free format
Examples: Large UP Shield, SP Speed Lettering, Hershey Bar
 
  Item Coupler
 
Type of coupler on locomotive or car
User assigned, table edited
Examples: Standard Lionel, Rapido, MT - body-mounted
Comment: For easier entry, only keep the coupler types you care about in the edit table.
It is helpful for compatibility purposes when making up trains or doing coupler upgrades on your roster.
 
  Item Truck
 
Truck type on a locomotive or car
User assigned, table edited
Examples: Bettendorf, Barber Roller Bearing
Comment: Many collectors don't care about this field and may use it for other purposes of their own devising.
 
  Item Scale
 
Modeling Scale
User assigned, table edited
Examples: O, HO, HOn3, N
Comment: Delete the scales you don't need from the edit for faster entry.
 
  Item Material
 
Primary construction material for the item
User assigned, table edited
Examples: Plastic, Wood, Brass, Hydrocal
 
 
  MANUFACTURER INFORMATION
  Manufacturer information relates your item information to the manufacturer's
  Item Manufacturer (** Displays on "View / Find List" **)
 
Name of the manufacturer of the Item
User assigned, table edited
Examples: Lionel, Atlas, Walthers, MicroTrains
Comment: Make sure to use names corresponding to the preloaded or example values for future features coordinating your information with the manufacturer's information.
 
  Item Manufacturer Product Line
 
Name of the product line for manufacturers with multiple product lines
User assigned, table edited by a table sensitive to the Item Manufacturer
Examples: Cornerstone Series, Dream Designs
Comment: This can also be used to designate the original manufacturer for items obtained from custom detailers or after market painters.
 
  Item Manufacturer Model Number (** Displays on "View / Find List" **)
 
Item number assigned by the manufacturer to the item
User maintained, free format
Examples: 147K, 57073
Comment: This can also be used to designate the original manufacturer for items obtained from custom detailers or after market painters.
 
  Item UPC
 
Universal Product Code used for retail sales and bar code scanning
User maintained, free format
Examples: 95140 02745, 32573 49536 (typically 10 digit, the first part of which identifies the manufacturer and the second part of which identifies the item)
Comment: UPC coding of products varies greatly by manufacturer. Some retailers assign their own "UPC like" codes for scanning purposes that do not correspond to any widely known manufacturer related numbering scheme.
 
 
  CATALOG INFORMATION
  Two sets of catalog fields connect your collection items with the numbering schemes of other catalog publishers.
  Item Catalog 1
 
Name of the publisher of a catalog
User assigned, table edited
Examples: Walthers, Greenberg, The Freight Yard
Comment: For consistency with future capabilities, use the initial values in the edit tables or see the demo examples for the proper spelling.
 
  Item Catalog 1 Number
 
The number the item is known as in the Catalog specified in Catalog 1
User maintained, free format
Examples: 982-8355
Comment: Be sure to store the number in the exact same format as used by the catalog publisher to get greatest use of this field in future automated processes. If in doubt, check with the catalog publisher for how they store the number in electronic media.
 
  Item Catalog 2
 
Similar to Item Catalog 1 (accommodates an alternate catalog system)
User assigned, table edited
Examples: Walthers, Greenberg, The Freight Yard
Comment: For consistency with future capabilities, use the initial values in the edit tables or see the demo examples for the proper spelling.
 
  Item Catalog 2 Number
 
The number the item is known as in the Catalog specified in Catalog 2
User maintained, free format
Examples: LGB-09339
Comment: Be sure to store the number in the exact same format as used by the catalog publisher to get greatest use of this field in future automated processes. If in doubt, check with the catalog publisher for how they store the number in electronic media.
 
 
  MISCELLANEOUS INFORMATION
  Keep additional information about the model or prototype item.
  Item Notes
 
Multipurpose notes field for recording miscellaneous information
User maintained, free format
Examples: Prototype built in August 1951, Bethlehem, PA Steam / Diesel Transition Era
Part of a 6-hopper set sold as item 777-23423
This is a fantasy car. No prototype ever existed
Comment: Field can be used for all kinds of information including grouping or tagging the item so it can be retrieved in searches. (See Tips & Techniques.) Use the return (enter) key to force different groups of notes information onto different lines of the field.
 
 
  The Inventory Database
  The Inventory database tracks all the information about a physical item in your collection or on your wish list. Inventory records are in a many-to-one relationship with the item database records. That is, there can be zero, one, or more than one inventory record for each item record in the database. An inventory record should be maintained for each occurrence of an item in your collection or when you wish to add an item to your wish list. This part of the Database Guide describes these inventory records.
 
  CONTROL INFORMATION
  The inventory sequence number labels the different inventory records for an item.
  Inventory Sequence Number (** Appears in Inventory List Table **)
 
Uniquely identifies inventory records associated with an item number
System assigned, not user maintainable
Examples: The first inventory record associated with item 0000-1234 would be given a suffix of 1. (0000-1234 1) The next would be a '2' and so on
Comment: The sequence number is assigned to be one greater than the highest currently occurring sequence number for the item, even if a lower sequenced inventory record has been deleted. This explains why there may be some missing intermediate sequence numbers over time.
 
 
  PURCHASE INFORMATION
  Purchase information tracks the acquisition details.
  Inventory Purchase Date (** Appears in Inventory List Table **)
 
The date this occurrence of the item (the piece) was physically acquired
User maintained, valid date in "mm/dd/yyyy" format
Examples: 02/20/1988, 12/04/2001
Comment: Maintaining this field is important to indicating you have actually acquired a particular item. Many beginning users who may have no idea when they actually purchased an item should still pick some nominal date for this and enter it anyway. This is the best way to indicate an occurrence of that item is, or was at one time, in your collection.
 
  Inventory Purchased From
 
The name of the retailer or supplier from whom the piece was bought
User assigned, table edited
Examples: Joe's Hobby Store, Manufacturer Direct
Comment: Allows you to track the amount of business you do with a supplier over time as well as where to take the item if a problem occurs. It also could be good for further verification for insurance purposes.
 
  Inventory Base Cost
 
The base cost of the inventoried piece
User maintained, numeric with two decimal places
Examples: 79.95 or 3,249.99
Comment: This is intended to record the acquisition cost at time of purchase.
 
  Inventory Other Cost
 
Additional costs incurred in the acquisition of the item
User maintained, numeric with two decimal places
Examples: 7.43
Comment: This can be used to record sales tax, shipping or a combination of all other costs in addition to the base cost.
 
 
  STATUS INFORMATION
  Maintain additional information about the location, condition, and value of the piece.
  Inventory Condition (** Appears in Inventory List Table **)
 
The current condition or state of the inventory piece
User assigned, table edited
Examples: Mint, New, Damaged, Unassembled, Assembled
Comment: For collectors tracking their items to collector catalogs, it may be best to use the same terminology for condition on those items as the catalogs use.
This field is also good for tracking the assembly status of kits.
 
  Inventory Location (** Appears in Inventory List Table **)
 
The location identifier for where the piece is located or stored
User assigned, table edited
Examples: Shelf 3 Center, Engine Box 2, On Layout, Loaned to Club
Comment: Be sure to look at Tips & Techniques for some creative suggestions on making the most of this field.
 
  Inventory Serial Number (** Appears in Inventory List Table **)
 
A manufacturer's serial number for the piece
User Maintained, free format
Examples: NSD456-12231A
Comment: Good for record keeping or identification in case of theft.
 
  Inventory Value (** Appears in Inventory List Table **)
 
The current monetary value of the piece
User maintained, numeric with two decimal places
Examples: 125.00
Comment: Good to maintain this field as high quality pieces age and grow in value.
Also useful for keeping target prices on wish list items.
 
  Inventory Wish List Flag
 
Flag marking an item for inclusion on the "Wish" list
User maintained, check box
Examples: Checked (data value is Y or T) or Not Checked
Comment: Checking this box will cause the item to appear on the Subscriber's Wish List.
On reports and download specifications, checking for the value of either Y or T includes checked items. They are excluded by checking for the value of N or F.
 
  Inventory For Sale Flag
 
Flag marking an item for inclusion on the "For Sale" list
User maintained, check box
Examples: Checked (data value is Y or T) or Not Checked
Comment: Checking this box will cause the item to appear on the Subscriber's For Sale List.
On reports and download specifications, checking for the value of either Y or T includes checked items. They are excluded by checking for the value of N or F.
 
  Inventory Price Offer (** Appears in Inventory List Table **)
 
The amount of money the subscriber is willing to pay for the piece on a "wish" list or the amount of money for which the subscriber is willing to sell the piece on a "for sale" list.
User maintained, numeric with two decimal places
Examples: 149.95
Comment: Leave this field blank if you don't want pricing information to show on your Internet Wish or For Sale lists.
 
 
  SALES INFORMATION
  Sales information tracks the disposition of pieces.
  Inventory Sales Date (** Appears in Inventory List Table **)
 
The date this piece was sold or otherwise disposed of
User maintained, valid date in "mm/dd/yyyy" format
Examples: 04/15/1993, 01/09/2002
Comment: Maintaining this field is important to indicating you have actually disposed of a particular piece. This keeps a more accurate history of your collection than deleting the item or inventory records. Disposed of items can be kept off of reports and downloads of current pieces by screening records for which this field is not blank. This is the best way to indicate an occurrence of that item was, at one time, in your collection.
This field is also good to use to indicate a group item such as a 6-pack of hopper cars has been broken up into six individual items. Basically you sell the original item to your collection and purchase the individual items from your collection. See Tips & Techniques.
 
  Inventory Sold To
 
The name of the collector to whom you sold the piece or other disposition of the piece
User maintained, free format
Examples: Bill Jones, Tom Smith, Set split to individual cars, Broken
Comment: Allows you to track item disposition. See also Tips & Techniques.
 
  Inventory Sales Base
 
The amount for which the inventoried piece was sold
User maintained, numeric with two decimal places
Examples: 49.95 or 5,000.01
Comment: This, in conjunction with cost fields can be used to figure profitability of sales.
 
  Inventory Sales Tax
 
Amount of sales tax collected with sale, if any
User maintained, numeric with two decimal places
Examples: 4.57
Comment: This can be used to record sales tax collected separate from what the piece was sold for.
 
 
  INVENTORY NOTES
  Use notes for all kinds of useful purposes.
  Inventory Notes
 
Large free format field for keeping various notes and data tags for a piece
User maintained, free format
Examples: "Item has minor rust on wheels", "Maintenance Group A", or "Holiday train car"
Comment: Keep notes about the item or insert data tags to later find and select the piece for special purposes or reports.
Use return (enter) key to keep different groups of notes information on different lines of the notes field.
See Tips & Techniques for more purposes.
 
 
 
  Edit Tables
  Many fields in TrackMyTrains.com are table edited for faster and more consistent input. The consistency of data fields is particularly important with organizational elements and for those fields that might relate to information in other databases.

All edit tables in TrackMyTrains.com can be completely customized to the needs of the individual subscriber. This section explains more about the edit tables and how they should be maintained.

Creating and maintaining edit tables is a relatively easy matter. Certain of these are partially loaded when you start your subscription to get you started on the right track. Also, the demonstration databases show some uses. While you can change these anyway you choose, we caution you to stay to the spirit of the design, particularly on the organizational fields and those that could relate to outside entities.

To add an entry to a table, simply click on "Add/Delete". This will display all values and a place will appear at the bottom to specify the new entry. Key in the value you want, click "OK" and you are done. If you choose not to add an entry, or see that the one you want is already there, click instead on the desired entry and then click "OK".

If you want to delete an entry, first start as if you were going to add one. Then select the entry, highlight it, and click delete. Note that to maintain data integrity, the system will not let you delete any value that occurs in any record. First, you should find all records containing the value you wish to delete using a select statement. Then change the field value to some value you choose or blank it out by clicking the blank row of the edit table. When the value has been removed from all data records, you can then delete it from the edit table.

The edit tables associated with certain fields are "context sensitive." This means that the table used for editing the field depends upon the value of another data element. One example is the Item Type field edit table. It is context sensitive to the value of the Item Category and there is a different Item Type edit table for each value in the Item Category table. Other relationships are listed below. Note that you cannot specify the value of a dependent field until you have done so for the field its edit table depends on. Also, if you change the value of a field that provides the context for a dependent field, the dependent field will be blanked-out as there is no context for selecting the proper value.

Multiple field edit tables control the values in certain related fields. This means that when you specify a particular table entry for one field, it forces a value in the related field. The Item Railroad Abbreviation and the Item Railroad Name are coupled in this manner. By having two separate data fields, it is easier to select records and choose data to appear on reports than it would be if both parts were kept in the same field. The table selections are each organized alphabetically. So for example, both SSW and Cotton Belt appear alphabetically in their respective look up tables, yet you need only pick one field to have the other properly filled in.

 
  The fields utilizing edit tables and the relationships with other fields is as follows:
 
Item Category    
Item Type   (Dependent on Item Category)
Item Sub Type   (Dependent on Item Category and Type)
Item Railroad Abbreviation   (Coupled with Railroad Name)
Railroad Name   (Coupled with Railroad Abbreviation)
Item Coupler    
Item Truck    
Item Scale    
Item Material    
Item Manufacturer    
Item Manufacturer Product Line   (Dependent on Item Manufacturer)
Item Catalog 1    
Item Catalog 2    
Invty Purch From
Invty Condition
Invty Location
 
 
 
  Technical Term Definitions
  Context Sensitive: As used with edit tables, context sensitive means that the values of the edit table for a field in a segment depend upon the value in another field. The field that determines which edit table should be used is the "context-establishing" field and the edit table for the dependent field is said to be context sensitive.

Edit Table: An edit table is a list of values or contents that may be contained in a field. Rather than keying in the value for a table-edited field, its contents are established by selecting a value from its edit table.

Flag: A flag is a data field that can represent two values. Typically these values are referred to as "Yes" or "No", "True" or "False", or "On" or "Off". In this applications, flags are displayed as check boxes with the check or dot representing the value of 'Y' (Yes) or interchangeably, in the record selection features, 'T' (True).

Record Key: A record key is a string of characters that uniquely identifies a particular database record or segment.

Segment: A segment is a group of data elements that constitute a database record. Segment is sometimes used interchangeably with the word "record."

Table Edited: A field is said to be table edited if it is only permitted to contain values that are specified as valid. The list of valid values for a data field is called its edit table.

Tagging Records: Tagging records refers to the technique of entering a string of characters in one or more of the fields of a record so that the record can be retrieved along with other records containing the same "tag" by system reports and inquiries. The Notes fields of the Item and Inventory segments are good places for entering tags that can be used to associate multiple records with a common identifying theme. One can retrieve these records as a group by specifying a record selection statement in which the tag field "contains" the tag value.

 
 
 
  Reference Summary
 
Official Name
Length
Display Screen Selection Tables
Item Key 8 Key Item # (Key)
Item Category 31 Category Item Category
Item Type 31 Type Item Ctgy Type
Item Sub Type 31 Sub Type Item Ctgy Sub Type
Item Description 31 Description Item Description
Railroad Abbreviation 8 Rail Road Item RR Abrev
Railroad Name 28 Rail Road Item RR Name
Road Number 10 Road Nbr Item RR Road Nbr
Item Color 31 Color Item Color
Item Markings 31 Markings Item Markings
Item Coupler 31 Coupler Item Coupler
Item Truck 31 Truck Item Truck
Item Scale 6 Scale Item Scale
Item Material 16 Material Item Material
Item Manufacturer 31 Manufacturer Item Mfg Name
Item Manufacturer Product Line 31 Product Line Item Mfg Prod Line
Item Manufacturer Model Number 15 Mfg Mod Nbr Item Mfg Mod Nbr
Item UPC 18 UPC Item UPC
Item Catalog 1 16 Catlg 1 Item Catlg 1 Name
Item Catalog 1 Number 16 Nbr Item Catlg 1 Nbr
Item Catalog 2 16 Catlg 2 Item Catlg 2 Name
Item Catalog 2 Number 16 Nbr Item Catlg 2 Nbr
Item Notes 250 Item Notes Item Notes
Inventory Sequence Number 3 Seq Nbr Invty # (Seq Nbr)
Inventory Purchase Date 10 Purch Date Invty Purch Date
Inventory Purchased From 31 Purch From Invty Purch From
Inventory Base Cost 10 Base Cost Invty Purch Cost
Inventory Other Cost 10 Other Cost Invty Purch Other Cost
Inventory Condition 31 Condition Invty Condition
Inventory Location 31 Location Invty Location
Inventory Serial Number 16 Serial Nbr Invty Serial Nbr
Inventory Value 10 Value Invty Value
Inventory Wish List Flag 1 Wish List Invty Flag Wish List
Inventory For Sale Flag 1 For Sale Invty Flag For Sale
Inventory Price Offer 10 Price Offer Invty Price Offer
Inventory Sales Date 10 Sales Date Invty Sales Date
Inventory Sold To 31 Sold To Invty Sold To
Inventory Sales Base 10 Sale Base Invty Sale Base
Inventory Sales Tax 10 Sales Tax Invty Sales Tax
Inventory Notes 250 Inventory Notes Invty Notes
 
 
 
copyright © 2001- 2002 TrackMyTrains.com