I had about 100 feet of tables set up in my former home when I first entered the hobby. They were built of 1/2" plywood and 1 x 4 pine lumber. In the square corners I added 45 degree triangles. They were easy to build and add to hold the 90 degree turns of curved of track.
As the back of each table was screwed to the wall studs, I was able to use 2 inch, black ABS plastic pipes for the front legs. The pipes were easy to cut with a chop saw. Small squares of lumber drilled out with a 2" hole saw were fastened under the tables where they joined to hold the top of the pipes. Any shimming could be done by adding 2" washers above the pipes. I could remove the pipes one at a time when I wanted to paint the basement floor.
My worse mistake was adding ballast with diluted white glue. Later I removed a 12 x 15 foot oval of double tracks to make room for a small train work shop. I had buy a wide heavy duty scraper to break the tracks free. The track and switches were almost impossible to clean. But worse was sanding of the remaining small stones from the table tops so they could be used for work and tool benches. I bought a belt sander, a lot of 40 grit sand paper belts, hearing protection ear muffs, and an industrial filtered mask. I had to wait for the boss to leave because of the noise and dust. It would take about 20 minutes to sand down each 2 x 8 foot table top, and the entire basement would fill with a cloud of fine stone dust.
Over the years the railway shrank as the space was needed for other things. Eventually all that was left was a 2 x 30 foot length of tables. As I found it was noisy running trains, I carpeted the top with black and gray carpet. I did not need ballast as the carpet held the track from moving and added a stone and cinder look to the yard. When I got bored I could change the track plan. They were all used like time saver layouts during the winter months to pass the time or test the latest locomotive project. Eventually all the large scale cars remained at Fred’s to be used for our Saturday morning operations. However the shelf was later used to build an ON30 layout. It was disassembled when we moved four years later.