![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, i m not sure if i m right in this group, but i think relational database modelling is a theoretical issue: I have to following (simplified) situation. I have a company which sells - simply one article - a basket with an amount of the same article - a customer special bill of material (n articles with amount) Now the question is: How should i correctly model that with sql on a relational database? 3 different tables for my products? But than: What should i reference in the sales document (also a table)? Constraints: - It s not allowed to use positions for the basket - It s not allowed to add a foreign key (to the sales document) to the article table In my opinion, this problem is prety much a object orientated inheritance problem ... Any help appreciated, Dan |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
hi thanks anyway, i found a cool link: |
#5
| |||||
| |||||
|
|
Hi, i m not sure if i m right in this group, but i think relational database modelling is a theoretical issue: |
|
I have to following (simplified) situation. I have a company which sells - simply one article - a basket with an amount of the same article - a customer special bill of material (n articles with amount) Now the question is: How should i correctly model that with sql on a relational database? |
|
3 different tables for my products? But than: What should i reference in the sales document (also a table)? |
|
Constraints: - It s not allowed to use positions for the basket - It s not allowed to add a foreign key (to the sales document) to the article table |
|
In my opinion, this problem is prety much a object orientated inheritance problem ... |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Hi Reinier, thanks for your answer. In the meantime i found a complete description and solution of my problem in Martin Fowler, Patterns of Enterprise Application Architecture There is a a chapter Structural Mapping Patterns (41 ff.), which discusses mapping of compositional hierarchies to relational databases. Best, Dan |
![]() |
| Thread Tools | |
| Display Modes | |
| |