There is a lot of variation in the way milposts are assigned and the track is identified. Due to mergers, realignments, etc, even the mileages on a given line are sometimes inconsistent.
In many cases, mileposts were assigned based on distance from the origin point when the line was first built. In some cases, these mile markers have survived many mergers and realignments. It is more the exception than the rule, at least in my area, for mileposts to be changed when a line is reconfigured by a new owner.
Locations may be designated by the name of the line or by the particular subdivision based on a particular railroad's practices.
For example, Penn Central and Conrail kept the original "Chicago Line" designation of mileposts begining from NY City for the New York -Buffalo "Water Level Route" as built by the New York Central. CSX contined this with the prefix "QC" for this line.
The ex NYC West Shore Line has mile posts beginning at Weehawken, NJ but much of the line was removed years ago. The surviving part in the Rochester, NY area is the CSX West Shore Subdivision which begins with MP QW347.4 (at QC359.2 on the Chicago Line/Rochester Sub) and continues to MP QW368.8 which rejoins the Chicago Line at QC382.6.
But, see the discussion about D&H mileposts on this thread, for another policy:
http://www.railroad.net/forums/viewtopic.php?t=27147
I think the best descripion is that there is no standard other than the combination of a particular line or subdivion designator and a mile post location should identify a unique point on that particular railroad.
Actual mileages may not correspond to milepost due to realignments. For example, PennCentral 1974 timetable for the Chicago Line had the notation:
"The distance from MP 286 to MP 294 is 8.8 miles (the distance between each milepost is 5827 feet)"
Certainly not an ideal situation for a national database. You will probably need to compile a lot of specific data from individual railroads.