6.5 Data Model 1: Normalized Snowflake Schema
6.5.2 Dimension tables
• Skid table: A skid is a pallet of x amounts of products. As an example, imagine a skid of 100 items. The skid is further broken down into 10 boxes, with 10 items each. Each row in this table corresponds to a single skid that holds 10 boxes with 100 products. This table includes information, such as skid ID, skid serial number, start time, end time, and array of boxes. The Skid serial field is used to save the serial number of a single skid. The Start time field is used to save the time that a skid entered a location. The End time field is used to save the time that a skid left that location or was broken down to box
level. The Holding items field is used to save all the Box ids that are packaged in that skid. The relational database system, PostgreSQL, provides array data structure; big data computing platforms, such as Hive, also provide array data structure.
• Box table: A box is a container that holds x amount of products. Each row in this table corresponds to a single box that holds ten products. This table includes information, such as box ID, box serial number, start time, end time, and array of items. The Box serial field is used to save the serial number of a single box. The Start time field is used to save the time the box entered that location. The End time field is used to save the time the box left that location or was broken down to individual items. The Holding items field is used to save all the Product ids that are packaged in that box. The relational database system, PostgreSQL, provides array data structure; big data computing platforms, such as Hive, also provides array data structure.
• Product table: Each row in this table corresponds to a single RFID-tagged product. This table includes information, such as product ID, EPC, product type ID, manufacturer ID, and defective code ID. The EPC field saves a unique ID to a particular physical product. The Product type id field is used to lookup detailed information for a product type. It also allows for individual objects to be grouped together by type. The Manufacturer id field is used to look up detailed information for a manufacturer. The Defective code id field is used to track which products were returned or discarded and the accompaning reason. • Product type table: Each row in this table corresponds to a group of similar products that share a common UPC (Universal Product Code). This table includes product information, such as UPC, category, description, color, and price. The Category field can be used to combine similar groups together. The Description, Color, and Price fields can give users more detailed information related to a product.
• Manufacturer table: Each row in this table corresponds to an individual manufacturer. This table includes all the manufacturer information, such as manufacturer ID, name, country, state, city, and address. Each manufacturer may produce many different types of products and each type of product may be produced by multiple manufacturers.
• Defective code table: Each row in this table corresponds to a possible reason for a product to be returned or discarded. This table includes defective code information, such as defective code ID, name, and description.
• Location table: Each row in this table corresponds to a location where an object is or was. This table includes location information, such as location ID, type, name, longitude, and latitude. The location type column can be a factory, a warehouse, a distribution center, or a retail store and it can be used to group multiple locations that are similar. The Longitude and Latitude field track the exact geographic location of the objects. The exact location can be used to calculate distances between different RFID readers.
• RFID reader table: Each row in this table corresponds to a single RFID reader that is uniquely identified by its ID. This table includes a RFID reader’s information, such as RFID reader ID, name, location ID, and type. For fixed type RFID readers, the Location id field tracks where the reader is located. Type field is used to describe the type of RFID reader, such as gateway, hand- held, and vehicle-mounted.
• Date dim table: Each row in this table corresponds to a single timestamp with detail information of date and time. It has Year, Quarter, Month, Day, Day of week (1...7), Day of week name (Monday...Sunday), Hour (0...23), Start time, and End time fields. This Date dim table allows for a more detailed analysis related to date and time. Temporal data is crucial for RFID data systems be- cause they are directly related to the movement and transaction of objects. All sensor observations are associated with the timestamps when the readings are made; object locations change along the time; the containment relationships
change along the time; and all EPC related transactions are also associated with time. [9]