Method for processing binary data file through SQL statements
A technology of binary data and sentences, applied in the field of IT digitization, can solve the problems of increasing learning costs and achieve the effect of low learning costs
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0043] This embodiment illustrates the method of writing SQL statements to query and update resource data by operating a specific resource data file.
[0044] The format and main values of the digital resource binary data file are shown in the following table:
[0045]
[0046]
[0047] The data file contains two tables: a resource table and a configuration table. The resource table is mainly composed of a resource index table and a resource data table; the configuration table is mainly composed of a configuration data table. The resource ID composition rule is to start numbering sequentially from 100, for example, the resource with ID 199 is the 199th-100+1=100th resource. The data of each resource is variable-length data (because the title and description fields in each resource are variable-length fields).
[0048] If only the query operation is performed on the data file, the OpenFileMapping / MapViewOfFile function can be used under the windows system to map the da...
Embodiment 2
[0059] Take querying the size of a resource whose title starts with "Five Generations" and whose resource type is "image" as an example, the query method is:
[0060] Step 1. According to the business scenario, compile the query SQL statement:
[0061] Write SQL statement: string SQL=select size from resource where title like'five generations%s'and mediatypeName='image';
[0062] Step 2, parse out the keywords in the SQL statement:
[0063] Same as above, use the SQLParser component to analyze, you can get the query keyword select, the table name resource, the query field title / like / 'five generations%s'; and; mediatypeName / = / 'image';
[0064] Step 3. Translate the above keywords into high-level language codes, and execute according to the situation:
[0065] You can know that it is a query statement through the query keyword select, and know that the current query is a query for a resource table through the table name resource. In the file header, you can find that the index...
Embodiment 3
[0069] Take updating resource data with resource ID 199 and changing its resource description field (description) to "Boundary: Classification: Tropical, North Temperate, North Cold, South Temperate, South Cold" as an example, the update method is:
[0070] Step 1. According to the business scenario, compile the update SQL statement:
[0071] Write SQL statement: string SQL=update resource set description==Boundary division: classification: tropical, north temperate zone, north frigid zone, south temperate zone, south frigid zone 'where resourceId='199';
[0072] Step 2, parse out the keywords in the SQL statement:
[0073] Use the SQLParser component in durid to parse the SQL, and you can get the keyword update, table name resource, field description / 'demarcation boundary: classification: tropical, north temperate, north frigid, south temperate, south frigid', and condition resourceId / = / 199;
[0074] Step 3. Translate the above keywords into high-level language codes, and ...
PUM

Abstract
Description
Claims
Application Information

- R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com