My general goal is to have a properly designed basic inventory system. However, I am having trouble finalizing my DEVICE table.
DEVICE is used for storing each type of device within my inventory, not a specific device instance. Another table, INVENTORY, will be used to store each actual device. The attributes within my original DEVICE is as follows:
DEVICE(
model,
category,
brand
)
An example:
a_device(
model: iPhone X
category: phone
brand: apple
)
Goal is to decrease any chance of an anomaly, so I added two new tables and simply had DEVICE reference them.
Model is specific to a single row within DEVICE, since DEVICE is storing a single type of item, not a list of my inventory. Category and Brand however, will have repeat values among the rows since there is more than one type of iPhone available and Apple produces more than just phones.
DEVICE(
model
category_name
brand_name
)
CATEGORY(
category_name
)
BRAND(
brand_name
)
Would this be the correct layout? To have DEVICES.category_name and DEVICES.brand_name be foreign keys that reference the CATEGORY and BRAND tables?