Home > Back-end >  Consult a DELPHI will customize structure variables into SQL
Consult a DELPHI will customize structure variables into SQL

Time:09-17

Such as I've defined an arbitrary structure, and the variable assignment later, how will this variable into a SQL database, and the other with the same structure of the software can be read from the SQL and restore the data?

Novice, thanks to the great god grant instruction!

CodePudding user response:

1, the structure, transformed into XML format, and logging data, read, by the XML back,
2, converts structure, flow, to flow into data, read, by working backward flow back,

CodePudding user response:

The data are saved to the database, and can't query, also cannot sort, it will reduce the efficiency of using the database, it is not worth the cost

CodePudding user response:

Yes, this kind of structure of the data, can't query and sort, unable to show, through events can be displayed after transformation,

CodePudding user response:

The structure of the variable is defined as the field type, directly on the field assignment should meet your requirements

CodePudding user response:

Upstairs, can display the fields, but not neat, variation,

CodePudding user response:

DB2, Oracle support full-text search, including a BLOB field (not limited to text content),

CodePudding user response:

I have been with Orcle, BLOB field sometimes save photo or file streams, the binary format is can't find, unless directly deposited in the string, and then use dbms_lob to support query, this way, not directly set a larger VChar field holds come directly

CodePudding user response:

See how much data volume.

If the data quantity is not very big, can be object into JSON, XML storage, etc.

If a large amount of data, or plug is not recommended.

CodePudding user response:

Host data structure can be designed into JOSN, then stored into the database in a field (field length according to your the size of the structure and the value definition), the query will JOSN item name and value in the query, together to achieve your request,
Structure {
Item 1:111
Item 2:222
Item 3:333
}

CodePudding user response:

Structure={
"Item 1" : 111,
"Item 2" : 222,
"Item 3" : 333
}

CodePudding user response:

Full-text search even PDF content can be stored in a BLOB, don't despise the database technology,
  • Related