Is there a central database for all airline reservation information?
The simplest answer is that United and Thai have a codeshare arrangement, so United booked a ticket on all 4 segments using its own reservation system. United's reservation system communicated with Thai's to reserve your place, and the ticket was issued by United. 

that being said, there are a number of GDSs (Global Distribution Systems), which are multi-airline reservation systems, all of which communicate with each other. Complete information on GDSs can be found in Wikipedia.