Method for processing data
A data processing and data technology, applied in the field of data processing, can solve the problems of difficult to write statements, waste of resources, low efficiency, etc., and achieve the effects of efficient data calculation, expanded degrees of freedom, and flexible data structures
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
example 1
[0037] Example 1. Table 1 in the existing relational database db has the following structure and content:
[0038] Name
language
math
English
Zhang San
82
85
91
Li Si
71
61
78
Wang Wu
50
60
55
Zhao Liu
68
70
72
Sun Qi
73
90
75
[0039] Execute the following statement to import it and generate an arrangement:
[0040] P1=db.query("SELECT * FROME table 1")
[0041] A permutation P1 containing 5 records will then be generated for which:
[0042] P1(1)=={Name=Zhang San, Chinese=82, Mathematics=85, English=91}
[0043] P1(2)=={Name=Li Si, Chinese=71, Mathematics=61, English=78}
[0044] ...
[0045] In this method, in addition to importing tables from relational databases, new arrangements can also be created from existing data.
[0046] A.new(x i :F i ,...) means to create a new arrangement, A is a sequence or arrangement, F i the fields...
example 2
[0048] Example 2. A = ["a", "b", "c"]
[0049] P2=A.new(#: serial number, ~: value)
[0050] The above creates a new permutation P2. It can be represented in a table as follows:
[0051] serial number
value
1
″a ″
2
″b″
3
″c″
[0052] Obviously, the arrangement contains 3 records, and the records inside can be called with P2(i), for example:
[0053] P2(1).value == "a"
[0054] P2(2).value == "b"
example 3
[0055] Example 3. Existing permutation P1:
[0056] serial number
name
area code
1
"Beijing"
010
2
"Shanghai"
021
[0057] and permutation P2:
[0058] name
area
"Zhang San"
"Beijing"
[0059] name
area
"Li Si"
"Shanghai"
[0060] Then use the code:
[0061] P2(1).region = P1(1)
[0062] P2(2).region = P1(2)
[0063] The above assigns the two records of P1 to the fields of the two records in P2 respectively. Due to the freedom of field data types allowed in this method, the "Region" field of P2 can directly refer to the record of P1. After this definition, use it directly:
[0064] P2(1).Region.Area code
[0065] You can return to 021.
[0066] Compared with the traditional method, the reference mechanism in this method brings great convenience for establishing the association between data. Moreover, all reference operations to records in this metho...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com