Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you free-text search an XML file using SQL Server?

I have an XML feed of a resume. Each part of the resume is broken down into its constituent parts. For example <employment_history>, <education>, <skills>.

I am aware that I could save each section of the XML file into a database. For example columnID = employment_history | education | skills & then conduct a free text search just on those individual columns. However I would prefer not to do this because it would create duplication of data that is already contained within the XML file and may put extra strain on indexing.

Therefore I wondered if it is possible to conduct a free text search of an XML file within the <employment_history></employment_history> using SQL Server.

If so an example would be appreciated.

like image 932
Geoff Newman Avatar asked Feb 23 '26 10:02

Geoff Newman


1 Answers

Are you aware that SQL Server supports columns with the data type of "XML"? These can contain an entire XML document.

You can also index these columns and you can use XQuery to perform query and data manipulation tasks on those columns.


See Designing and Implementing Semistructured Storage (Database Engine)

like image 164
John Saunders Avatar answered Feb 25 '26 06:02

John Saunders



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!