Natural gas is burned off next to water reservoirs used for fracking at an oil well site August 23, 2011 near Tioga, North Dakota. A new oil boom in western North Dakota has produced thousands of jobs as the Bakken formation is tapped for the liquid commodity. - 

Oil production is in full swing in the Bakken shale of North Dakota, but there's still no pipeline to move it. And there won't be for several years. That means a boom for another industry: railroads. Trains have played a big role in the hydraulic fracturing boom, since it started a few years ago. The basic need they fill?

"Bringing sand in and then taking the oil out," says rail industry analyst Bill Rennicke, at consulting firm Oliver Wyman. Tons of sand get hauled in, and mixed with water to do the fracturing.

As more oil's been produced by fracking, big orders for tanker cars and locomotives have followed. The railroads haven't had any problem keeping up so far, Rennicke says, because, "the rail system has a lot more capacity than it uses on any given day."

Plus, there have been more trains free to head north for oil due to a slowdown in coal. Coal's been the mainstay of U.S. freight rail. The coal industry hit a slump as fracking took off.

Pipelines are much more efficient than trains, for transporting oil. And they'll come, says energy analyst Stephen Schork. But for now, rail has one big benefit: flexibility.

"So if you go ahead and build a pipeline, then you're locked in," says Schork. "That pipeline is going to be connected to a market. You have to be sure that market will be able to sustain in the years ahead."

Right now trains from North Dakota take oil to the east, west, and Gulf coasts. Oil companies are not yet sure which of those areas will need the most oil in the long term.

Follow Eve Troeh at @evetroeh