sql - structure question -
i have realtional db putting together, of members here have of done.. thank everyone. stuck on how 1 last part.
its tracking cell phone line sales inhouse.
so each customer can have multiple orders each order can have multiple lines each line has 1 plan attached each line can have multiple addons (hotspot service, insurnace etc)
i have done except having issues teh multiple addon services.
i have tbl lines following structure
id_key phone-num customer_fk (foreign key customer table) plan_fk (foreign key plan type table) serial_number order_fk (foreign key order_details table)
i thinking of adding in field called
service_fk (foreign key table made of following)
tblserviceorder
seriviceid (references tblservicetype) lineid (references id_key tbl lines)
the tbl service type table
id (primary key) description
eg. --> id 132 -->insurance id 133 --> hotspot
am heading down right path ?
i want able pull report on details of each order . e.g.
customer: 1234 orders 2 lines, line 1 has plan 103, line 2 has plan 104. line 1 has insruance , has hotspot added, line 2 has insurance.
thanks help
pat
there's no reason add service_fk
field lines
table. relationship expressed new table having lineid
in it.
Comments
Post a Comment