Similarities between XML and SQL:
XML and SQL share many common features. Here are a few of them:
1) Focus on description: Focus of XML is on each element of a document structure. It doesn’t specify how to process the document. SQL also focuses on which data is requested and not on how to retrieve the data.
2) Document type: XML defines a document based on real world document types. Similarly tables in SQL are composed of real world entities.
3) Building block: XML is build by using elements and attributes. SQL is built by using tables and columns.
Difference between XML and SQL:
Here are the differences between XML and SQL:
|1.||Concept is based on the document structure||Concept is based on the data processing record structure|
|2.||It is text centric||It is data centric|
|3.||Structure of XML is hierarchical.||Structure of SQL is tabular.|
|4.||It is used for representing objects.||It is used for manipulating objects.|