slides

539 views

Published on

Published in: Business, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
539
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

slides

  1. 1. Supporting RFID-based Item Tracking Applications in Oracle DBMS Using a Bitmap Datatype Ying Hu, Seema Sundara, Timothy Chorma, Jagannathan Srinivasan Oracle New England Development Center One Oracle Drive, Nashua, NH 03062
  2. 2. Talk Outline <ul><li>Background </li></ul><ul><li>A Bitmap Datatype </li></ul><ul><li>Applications </li></ul><ul><li>Implementation </li></ul><ul><li>Performance Study </li></ul><ul><li>Conclusions </li></ul>
  3. 3. Background
  4. 4. Radio Frequency Identification <ul><li>RFID uses radio frequency to automatically detect and identify individual items, which have RFID tags associated with them. </li></ul><ul><li>RFID technology is increasingly being used in applications such as </li></ul><ul><ul><li>Asset Tracking, </li></ul></ul><ul><ul><li>Supply Chain Management, and </li></ul></ul><ul><ul><li>Retail Management. </li></ul></ul>
  5. 5. Electronic Product Codes (EPCs) <ul><li>EPC is a standard naming scheme proposed by Auto-Id Center for RFID applications. </li></ul><ul><li>An EPC uniquely identifies an item. It contains </li></ul><ul><ul><li>< Header , Manager No., Object Class , Serial No.> </li></ul></ul><ul><li>The header identifies the format of the EPCtype, the next two components identify the product, whereas the last component uniquely identifies the item within the product. </li></ul>
  6. 6. Item Tracking <ul><li>RFID Technology enables item tracking applications </li></ul><ul><li>However, there is a need for efficient mechanism for managing the high volume of item tracking information . </li></ul>
  7. 7. A Bitmap Type for Item Tracking <ul><li>Key Observation : RFID Items can be efficiently tracked by tracking the groups to which an item belongs. For example </li></ul><ul><ul><li>Groups of items in the same proximity : e.g. on a shelf, on a shipment </li></ul></ul><ul><ul><li>Groups of items with same property : e.g. items of a single product, items of a single product with same expiry date </li></ul></ul><ul><li>Our Solution : Use a bitmap type for modeling a collection of EPCs that can occur in item tracking applications. </li></ul>
  8. 8. A Bitmap Datatype
  9. 9. Example: Product Inventory <ul><li>With EPC Collections </li></ul><ul><li>With epc_bitmaps </li></ul>… p2 p1 Prod_id … t2 t1 Time … s1 s1 Store_id … epc21, epc22, epc23, … epc11, epc12, epc13, … Item_collection … p2 p1 Prod_id … t2 t1 Time … s1 s1 Store_id … bmap2 bmap1 Item_bmap
  10. 10. epc_bitmap Datatype <ul><li>A new type to represent a collection of EPCs with a common prefix </li></ul><ul><li>CREATE TYPE epc_bitmap_segment </li></ul><ul><li>( epc_length NUMBER, </li></ul><ul><li>epc_suffix_length NUMBER, </li></ul><ul><li>epc_prefix RAW, </li></ul><ul><li>epc_suffix_start RAW, </li></ul><ul><li>epc_suffix_end RAW, </li></ul><ul><li>epc_suffix_bitmap RAW </li></ul><ul><li>); </li></ul><ul><li>epc_bitmap type to represent a collection of EPCs </li></ul><ul><li>CREATE TYPE epc_bitmap IS </li></ul><ul><li>TABLE of epc_bitmap_segment; </li></ul>
  11. 11. epc_bitmap_segment Datatype <ul><li>Header EPC_Manager Object_Class Serial_Number </li></ul><ul><li>2-bits 21-bits 17-bits 24-bits </li></ul><ul><li>0x 4AA890001F 62C160 </li></ul><ul><li>………………………… </li></ul><ul><li>0x 4AA890001F A0B38E </li></ul>101001…00010 0xA0B38E 0x62C160 0x4AA890001F 24 64 bitmap Suff_end Suff_start Prefix Suff_len Len
  12. 12. epc_bitmap Operations <ul><li>Conversion Operations </li></ul><ul><ul><li>epc2Bmap , bmap2Epc, and bmap2Count </li></ul></ul><ul><li>Pairwise Logical Operations </li></ul><ul><ul><li>bmapAnd , bmapOr , bmapMinus , and bmapXor </li></ul></ul><ul><li>Maintenance Operations </li></ul><ul><ul><li>bmapInsert and bmapDelete </li></ul></ul><ul><li>Membership Testing Operation </li></ul><ul><ul><li>bmapExists </li></ul></ul><ul><li>Comparison Operation </li></ul><ul><ul><li>bmapEqual </li></ul></ul>
  13. 13. Applications
  14. 14. Applications: Shelf Analytics <ul><li>Determine the items added to a shelf between time t1 and t2 </li></ul><ul><li>SELECT bmap2Epc ( bmapMinus (s2.item_bmap, s1.item_bmap)) </li></ul><ul><li>FROM Shelf_Inventory s1, Shelf_Inventory s2 </li></ul><ul><li>WHERE s1.shelf_id = <sid1> AND </li></ul><ul><li>s1.shelf_id = s2.shelf_id AND </li></ul><ul><li>s1.time=<t1> AND s2.time=<t2>; </li></ul><ul><li>Shelf_Inventory </li></ul>… … … bmp2 t2 sid1 bmp1 t1 sid1 Item_bmap Time Shelf_id
  15. 15. Applications: Product Recall <ul><li>Identify the stores that currently have recalled items </li></ul><ul><li>SELECT Store_id FROM Product_Inventory P </li></ul><ul><li>WHERE bmap2Count ( bmapAnd (P.Item_bmap, </li></ul><ul><li>epc2Bmap (<recall_items>))) > 0 </li></ul><ul><li>AND P.Product_id=<recall_product_id> </li></ul><ul><li>AND P.Time = <current_time>; </li></ul><ul><li>Product_Inventory </li></ul>… s2 s1 Store_id … t2 t1 Time … p1 p1 Prod_id … bmap2 bmap1 Item_bmap
  16. 16. Implementation
  17. 17. Implementation <ul><li>Leverages Oracle’s Bitmap Index Implementation </li></ul><ul><li>Uses G. Antoshenkov’s “ Byte Aligned Data Compression ” for creation and operation of bitmaps for rowid collections. </li></ul><ul><li>A collection of EPCs is grouped into different epc_bitmap_segments, </li></ul><ul><ul><li>When the previous epc_suffix_bitmap (maximum size of RAW = 2000) can not hold any more EPCs </li></ul></ul><ul><ul><li>When epc_prefixes are different </li></ul></ul>
  18. 18. Persistent epc_bitmap <ul><li>Stored in a primary B+-tree structure </li></ul>primary B+-tree structure primary key columns non-key columns … … … set_id_I … … … … … Epc_bitmap Data2 Data1 epc_suffix_start epc_ prefix epc_suffix_length epc_ length set_id_i epc_suffix_bitmap epc_suffix_end
  19. 19. Query Processing & Optimization <ul><li>epc_bitmap function is executed per row </li></ul><ul><li>Queries with predicates on bitmap columns can be speeded up </li></ul><ul><ul><li>Using Function-based B-tree index: On pre-computed value of bmap2Count(bmap_col) </li></ul></ul><ul><ul><li>SELECT S.shelf_id </li></ul></ul><ul><ul><li>FROM Shelf_inventory S </li></ul></ul><ul><ul><li>WHERE bmap2Count (S.item_bmap) > 0 ; </li></ul></ul><ul><ul><li>Using Summary Bitmap Index </li></ul></ul>
  20. 20. Summary Bitmap <ul><li>Specialized index structure to speed up query to detect the presence of an epc identifier </li></ul><ul><li>SELECT s.shelf_id, s.time FROM Shelf_Inventory s </li></ul><ul><li>WHERE bmapExists (s.item_bmap, <epc1>); </li></ul><ul><li>Create a summary bitmap sbmap using OR operation on { bmap 1 , …, bmap k } : </li></ul><ul><li>bmapExists(sbmap) </li></ul><ul><li>  i  1…k: bmapExists(bmap i ) </li></ul>
  21. 21. Summary Bitmap Index Structure root node leaf nodes branch nodes … … EPC Bitmap column Bmp1 Bmp2 <Bmp1,rowid1> Table A Summary Bitmap Tree … … Bmpn <Bmpn,rowidn>
  22. 22. Summary Bitmap Index Algorithm <ul><li>DFS(X, epc): </li></ul><ul><li>X: a node in the tree index; </li></ul><ul><li>epc: a given epc; </li></ul><ul><li>bmp(X): the epc_bitmap associated with node X; </li></ul><ul><li>  </li></ul><ul><li>if ( bmapExists(bmp(X), epc)== TRUE) </li></ul><ul><li>{ if (X == leaf node) </li></ul><ul><li>report bmp(X); </li></ul><ul><li>else </li></ul><ul><li>for each child node V of X do </li></ul><ul><li>DFS(V, epc); </li></ul><ul><li>} </li></ul><ul><li>Complexity:O(1) , no candidate </li></ul><ul><li>O(m log N), m: fan-out, N: no. of rows </li></ul>
  23. 23. Performance Study
  24. 24. Experimental Setup <ul><li>Data represents EPC-64 collections, which are randomly generated with a uniform distribution </li></ul><ul><li>Data sampled every hour for 30 days(720 obs.), 300 days (7200 obs) and 3000 days (72000 obs). </li></ul><ul><li>EPC collections of size 100000, 10000 and 1000 represent typical number of items in department and/or shelf </li></ul>
  25. 25. Storage Comparison
  26. 26. Bulk Load Performance
  27. 27. Query 1: Enumerate Removed Items <ul><li>Enumerate the items removed from a shelf between 2 time intervals </li></ul><ul><li>Collection Type Query </li></ul><ul><li>SELECT b.epc_value FROM epc_coll a, TABLE(a.epcs) b </li></ul><ul><li>WHERE a.time = '2004-03-04 10:00 AM' </li></ul><ul><li>MINUS </li></ul><ul><li>SELECT b2.epc_value FROM epc_coll a2, TABLE(a2.epcs) b2 </li></ul><ul><li>WHERE a2.time = '2004-03-04 11:00 AM'; </li></ul><ul><li>epc_bitmap Type Query </li></ul><ul><li>SELECT * FROM TABLE( </li></ul><ul><li>SELECT bmap2Epc(bmapMinus(p1.epcs,p2.epcs))  </li></ul><ul><li>FROM epc_bmp p1, epc_bmp p2 </li></ul><ul><li>WHERE p1.time = '2004-03-04 10:00 AM' AND </li></ul><ul><li>p2.time = '2004-03-04 11:00 AM'); </li></ul>
  28. 28. Query 1: Enumerate Removed Items
  29. 29. Query 1 with Variant Datasets
  30. 30. Query 2: Report All Observations <ul><li>Report all observations when a given EPC was present </li></ul><ul><li>Collection Type Query </li></ul><ul><li>SELECT a.time FROM epc_coll a </li></ul><ul><li>WHERE EXISTS(SELECT 1 </li></ul><ul><li>FROM TABLE(a.epcs) b </li></ul><ul><li>WHERE b.epc_value = ‘400003000300052A’); </li></ul><ul><li>epc_bitmap Type Query </li></ul><ul><li>  SELECT time FROM epc_bmp </li></ul><ul><li>WHERE bmapExists(epcs, ‘400003000300052A’); </li></ul>
  31. 31. Query 2: Report All Observations
  32. 32. Performance Discussion <ul><li>Storage savings of 2 to 8 times due to compressed bitmaps </li></ul><ul><li>Bulk load performance faster due to smaller storage needs </li></ul><ul><li>For collections of size > 1000, query performance gains of 10% to 1200% </li></ul><ul><li>For smaller collection sizes, performance is same as native collections </li></ul>
  33. 33. Conclusions <ul><li>epc_bitmap can model transient and persistent EPC collections </li></ul><ul><li>epc_bitmap can be used to support RFID-based item tracking applications </li></ul><ul><li>An efficient primary B+-tree based storage and access mechanism </li></ul><ul><li>Performance experiments validate the feasibility and benefits of the epc_bitmap </li></ul><ul><li>Support can be extended to Row Identifier (rowid) and Life Science Identifier (LSID) collections </li></ul>
  34. 34. A Q & Q U E S T I O N S A N S W E R S

×