...
New Proposed Design:
Storage:
We are going to use the IndexedTable which we are using currently too. In the new storage design we will have two rows:
- Value Row: This row will store the entity id with key and value in the value column
- Index Row: This row will store the entity id with key (like above) appended by the index which is also stored in the index column. The index column will be used for indexing.
Metadata Storage Format:
Key Column | Value Column |
---|---|
<VRPrefix><Entity-Id><Key> | Value |
<VRPrefix><Entity-Id><Tags> | Tag1, Tag2, Tag3.... |
<VRPrefix><Entity-Id><Schema> | {Some Schema} |
...
Key Column | Index Column |
---|---|
<IRPrefix><Entity-Id><Key><Index> | Index |
<IRPrefix><Entity-Id><Tags><Index> | Index |
<IRPrefix><Entity-Id><Schema><Index> | Index |
Sample Index Table which stores the above metadata and indexes together. Index Column contains all the possibilities of search queries.
This table data represents key-value, tags and schema example discussed above to show how we plan to store the data. Index Column contains all the possibilities of search queries.
Key: Entity with key | Value Column: Value of Metadata (Not Indexed) | Index Column: Indexed value (Indexed) |
---|---|---|
<VRPrefix><Entity-Id><CodeName> | Alpha Tango Charlie | |
<VRPrefix><Entity-Id><Tags> | Tag1, Tag22 | |
<VRPrefix><Entity-Id><Schema> | {EmpName: String, EmpContact: {EmpTel: Integer, EmpAddr: String}} | |
<IRPrefix><Entity-Id><Codename><CodeName: Alpha Tango Charlie> | CodeName: Alpha Tango Charlie | |
<IRPrefix><Entity-Id><Codename><Codename: Alpha> | Codename: Alpha | |
<IRPrefix><Entity-Id><Codename><Codename: Tango> | Codename: Tango | |
<IRPrefix><Entity-Id><Codename><Codename: Charlie> | Codename: Charlie | |
<IRPrefix><Entity-Id><Codename><Alpha Tango Charlie> | Alpha Tango Charlie | |
<IRPrefix><Entity-Id><Codename><Alpha> | Alpha | |
<IRPrefix><Entity-Id><Codename><Tango> | Tango | |
<IRPrefix><Entity-Id><Codename><Charlie> | Charlie | |
<IRPrefix><Entity-Id><tags><tags: Tag1> | tags: Tag1 | |
<IRPrefix><Entity-Id><tags><tags: Tag22> | tags: Tag22 | |
<IRPrefix><Entity-Id><tags><Tag1> | Tag1 | |
<IRPrefix><Entity-Id><tags><Tag22> | Tag22 | |
<IRPrefix><Entity-Id><schema><schema: EmpName> | schema: EmpName | |
<IRPrefix><Entity-Id><schema><schema: EmpContact> | schema: EmpContact | |
<IRPrefix><Entity-Id><schema><schema: EmpTel> | schema: EmpTel | |
<IRPrefix><Entity-Id><schema><schema: EmpAddr> | schema: EmpAddr | |
<IRPrefix><Entity-Id><schema><EmpName> | EmpName | |
<IRPrefix><Entity-Id><schema><EmpContact> | EmpContact | |
<IRPrefix><Entity-Id><schema><EmpTel> | EmpTel | |
<IRPrefix><Entity-Id><schema><EmpAddr> | EmpAddr |
...