Storage structure of the Cache database table

Source: Internet
Author: User

1. We have built a person class, followed by the table's storage structure
2. Open Inspector, enter RowID first name is P_rowid, select Class->storage

3. Create a new Storage, Select Cachesqlstorage. In Sqlidexpression, enter $i (^mdata ("person")) is \$ not s
means to set rowid to self-increment, note stremlocation's notation

4.caché store data in a multidimensional array, All data is saved in global. Global is represented in the following form: ^ name (subscript 1, subscript 2, subscript 3 ...) = value
Set ^y (3,6,7) = "Third"
Set ^y (3,6,8) = "Fourth"
SET ^y (3,6,7,8,4) = "Fifth"
SET ^y (3,6,7,8,9) = "Sixth" Global has a tree structure such as the following:
5. Open the SQL Storage Map index, click Add, select the map type data, enter the global name. Typically uppercase

for the class name. 6. Tap left data. Select Add to add three data to Glabal, separated by "^"

7. Click on the left subscripts. Enter {P_rowid}

8. Click on the left side RowID and enter the

9 you see. A primary index is created. You can query the table data by rowID

^person (1) =xiaoming^18^man
^person is the global name. (1) indicates that ROWID is 1. The subsequent data positions are arranged according to the location in Data
10. Next. We are building an index, add an index in NewStorage1, map type Select index, enter the global name

11.Subscripts to see, this represents the four levels of global. The first and second levels are their own names, easy to understand the information stored by the global, three or four layer is the detailed content

12.rowid saw, is the fourth level

13. This index, which is established by name, is understood by global.
^personi ( 0, "name", "Xiaoming", 1) =0

Storage structure for table of cache database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.