Ok, I'm trying really hard to build a database for a mobile phone company, and haveing massive difficulty on deciding on table designs for stock recording.
Stock is not like normal shops, where you can just have
stock(stock_code, make, model, price, supplier_id)
With mobiles you need to track each induvidual unit, this is done with an IEMI number which is unique to every mobile.
The problem I'm having is producing tables which dont contain massive amounts of redundent data or partially empty columns.
at the moment i'm using the following design:
stock(stock_code, make, model, price, supplier_id, type_code, qty) - normal stock
stock_phone(IEMI, stock_code, delivery_id) - phone stock
stock_SIM(stock_code, sim_num) - SIM stock
stock_phone_SIM(IEMI, stock_code, sim_num) - phones with SIM
stock_phone_SIM_NUM(IEMI, stock_code, sim_num, mob_num) - phones with SIM and number
type(type_code)
tariff(tariff_code, tariff_name, supplier_id, desc, value)
delivery(delivery_id, supplier_id, stock_code, date)
You see a mobile can come with or without a SIM, and that SIM can come with or without a mobile number. Thats why i've got seperate tables different types of phones. I'm also getting alot of repitition of stock_code. I'm not sure which way to tackle it, so any help would be appriciated.