your table structure should be:
deviceID - primary key
categoryID - Primary Key
devicecategoryID - Priamry Key
devicecategoryDeviceID - relates to devices.deviceID
devicecategoryCategoryID - relates to categories.categoryID
the devicecategories table is a linking (or relational) table used to create a many to many relationship of devices to categories.
you will need to use the manage relational table behavior to assign the categories to the device.
see the "Managing Relational Tables in Data Bridge" tutorial on the data bridge support page: