Answer the question
In order to leave comments, you need to log in
How is XML + XSD in SQL?
Tell me how you can automate the process of creating a database table, according to the existing XSD schema?
Example: There is xml with the data of the Unified State Register of Legal Entities or EGRIP, and there is an XSD schema for these files. How can I automatically generate field names in a table to fill with data?
Answer the question
In order to leave comments, you need to log in
It depends on what field names you need. You can, for example, parse an XSD, generate a query text for creating tables based on its data, and execute it. Or you can stupidly create a table with field names FIELD_1 ... FIELD_N. It all depends on your task.
Let's start by explaining why you need to cram data into one table.
In your table, there will be as many records as there are activities of one company, for each type of activity one record. For example:
godtable:
compani_id, company_name, ... (any more fields of company) ... ,
id_activity, name_activity, is_base, grnip, record_date
1. Юрлица (companies): id. name, и т.д.
2. Виды деятельности юрлиц (compani_activity): id_company, id_activity, is_base, grnip, record_date
3. Реестр видов деятельности: (activities): id, name
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question