burton image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Visitor Counter:

                                visitor counter

The Stock Table.

Details of vehicles in ERD are contained in the stock table which is named locos.

As well as details of vehicles, their owners, locations and their numbers this table also contains your own personal information such as whether you have seen or been hauled by the loco. When and where you saw it and even where the system can find a photograph of it.

All of the data can be edited but five of the fields are very important and form what is known as the primary key. Taken together these five fields uniquly identify the vehicle and they should not be changed. It is for that reason that if a vehicle is renumbered a new vehicle altogether is added to the database and the old vehicle marked with the letter "r" in the depot code.

The fields are shown in the following table and the primary key fields are: class, wks_number, number, type, country.

ERD is a relational database system which means that the tables can be related so that a depot code in the locos table can be used to get information about the depot from the depots table. Information such as the depot name and region etc which therefore does not have to be stored with every vehicle record and so makes the database smaller and more efficient. Being a relational database system also means that if a country is deleted from the countries table all vehicles of that country will also be deleted.

 

Fields in the LOCOS Table.

Field Description Example Record Data
class A code which designates the class of the vehicle. Related to the same code in the class table which contains full information on the classes in ERD. 1275
alpha_prefix The non-numeric part of the vehicles number. For French "Y" shunters this field would have a value of "Y". Y
year_built The year the vehicle was built. Normally only used for privately owned vehicles. 2011
wks_number The manufacturers works number. Normally only used for privately owned vehicles. 5001991
number The vehicle running number which where possible is a shortened version of the full UIC number. 1275016
suffix Normally used for the check digits. -4
private_number The number given the vehicle by a private operator. Normally only present for privately owned vehicles. DH 751
orig_number The number originally carried by the vehicle where known. Mostly used for UK locos and DB diesel locos. D6842
prev_number A list of numbers previously carried by the vehicle. 47043,47462
depot A code denoting the depot where the vehicle is allocated. For museum locos this would be a code denoting the museum location. Withdrawn vehicles are identified by a depot code of "w" and renumbered vehicles with a depot code of "r." This field is related to the depots table. LH1
set_number The set number for diesel multiple units and electric units. 175021
type The type of vehicle. This field is related to the types table. EMU
country The country where the vehicle is most likely to be found. Related to the countries table. Part of the primary key. BELGIUM
status Users information on the status of the vehicle. If seen has a value of "c". If hauled has a value of "h". If needed has a value of "n". n
owner A code denoting whether the vehicle is state owned ("S"), privately owned ("P") or museum ("M"). P
name The name carried by the vehicle. Mallard
wdn_date Some vehicles in the UK have this field filled in with the date the vehicle was withdrawn. 12/68
date_first_seen Users information on the date the vehicle was seen. 12/10/2004
location_seen Users information on the location where the vehicle was first seen. Berlin HBF.
times_seen Users information containing information on the number of times the vehicle has been seen. 4
date_first_hauled Users information on the date the user was hauled by the vehicle. 15/08/1985
notes Users notes about the vehicle which can contain any information you wished such as details on subsequent sightings. Hauled from Kings Cross to Leeds on 17/06/1982. Failed at Doncaster.
comments Information about the vehicle which cannot be changed by the user. Ex DB266013-2
photo A link to a file on your system which is a photographic image of the vehicle. C:\My Documents\UKPhotos\66052
operator_code A code which represents the vehicle operator. Related to the operators table. ACTS
pool_code The pool code of the vehicle. UK only. WAWN
livery_code A code which describes the livery of the vehicle. UK only. FE