![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||||||||
| |||||||||
|
|
Client | -------------------------------- |
| 0..* |
|
Service | ------------------------------- |
| 1 |
|
Spreadsheet Config | 1 ------ 1..* | Cell Config | -------------------------------- |
|
| | 1 | |
|
Spec | | -------------------------------- | |
|
| | 1..* | |
|
Field | 1----------------------------| |
#2
| |||
| |||
|
|
DB layout is as follows: -------------------------------- | Client | -------------------------------- 1 | | 0..* ------------------------------- | Service | ------------------------------- 1 | | 1 --------------------------------- --------------------------- | Spreadsheet Config | 1 ------ 1..* | Cell Config | -------------------------------- --------------------------- 1 1 | | | | 1 | -------------------------------- | | Spec | | -------------------------------- | 1 | | | | | 1..* | -------------------------------- | | Field | 1----------------------------| -------------------------------- Every client has a spreadsheet that must implement a version of Spec. For this version, the cell config must corresponding to cells in the spreadsheet containing fields for the given Spec. As long a Cell Config references a Fileld, th DB will be happy, but the problem I have is making sure that the Fields referenced by Cell Config are indeed children of the Spec referenced by Spreadsheet Config. Is it possible to enforce this at a DB level? Maybe my model is flawed? Thanks |
#3
| |||
| |||
|
|
DB layout is as follows: -------------------------------- | Client | -------------------------------- 1 | | 0..* ------------------------------- | Service | ------------------------------- 1 | | 1 --------------------------------- --------------------------- | Spreadsheet Config | 1 ------ 1..* | Cell Config | -------------------------------- --------------------------- 1 1 | | | | 1 | -------------------------------- | | Spec | | -------------------------------- | 1 | | | | | 1..* | -------------------------------- | | Field | 1----------------------------| -------------------------------- Every client has a spreadsheet that must implement a version of Spec. For this version, the cell config must corresponding to cells in the spreadsheet containing fields for the given Spec. As long a Cell Config references a Fileld, th DB will be happy, but the problem I have is making sure that the Fields referenced by Cell Config are indeed children of the Spec referenced by Spreadsheet Config. Is it possible to enforce this at a DB level? Maybe my model is flawed? Thanks |
#4
| |||
| |||
|
|
Is it possible to enforce this at a DB level? Maybe my model is flawed? In *no case* presentation should determine design. Proper design should be the consequence of studying sound principles of relational modeling. |
#5
| |||
| |||
|
|
"dutone" <dut... (AT) hotmail (DOT) com> wrote in message news:1192479211.800346.53530 (AT) i38g2000prf (DOT) googlegroups.com... DB layout is as follows: -------------------------------- | Client | -------------------------------- 1 | | 0..* ------------------------------- | Service | ------------------------------- 1 | | 1 --------------------------------- --------------------------- | Spreadsheet Config | 1 ------ 1..* | Cell Config | -------------------------------- --------------------------- 1 1 | | | | 1 | -------------------------------- | | Spec | | -------------------------------- | 1 | | | | | 1..* | -------------------------------- | | Field | 1----------------------------| -------------------------------- Every client has a spreadsheet that must implement a version of Spec. For this version, the cell config must corresponding to cells in the spreadsheet containing fields for the given Spec. As long a Cell Config references a Fileld, th DB will be happy, but the problem I have is making sure that the Fields referenced by Cell Config are indeed children of the Spec referenced by Spreadsheet Config. Is it possible to enforce this at a DB level? Maybe my model is flawed? Thanks In principle it is possible, assuming your DBMS supports something like SQL's CREATE ASSERTION statement for example. |
#6
| |||
| |||
|
|
I'd like to enforce this based on the data model and its relationships. Although to me, it doesn't seem possible without an additional layer of logic. The need for a check assertion in a RDMS tells me that cerain cituations must be enforced at a higher level. This is one of them I guess. |
#7
| |||
| |||
|
|
On 15 Oct, 22:59, dutone <dut... (AT) hotmail (DOT) com> wrote: I'd like to enforce this based on the data model and its relationships. Although to me, it doesn't seem possible without an additional layer of logic. The need for a check assertion in a RDMS tells me that cerain cituations must be enforced at a higher level. This is one of them I guess. Maybe your definition of a data model differs from mine. All such constraints are surely part of that model irrespective of what syntax the DBMS uses. If you have some particular DBMS in mind then maybe someone will have other suggestions about features supported by that product. Perhaps a redesign would also be possible but I'm reluctant to begin a design-by- newsgroup exercise. Very good point. Design-by-newsgroup has almost always been based on flawed |
#8
| |||
| |||
|
|
Is it possible to enforce this at a DB level? Maybe my model is flawed? In *no case* presentation should determine design. Proper design should be the consequence of studying sound principles of relational modeling. Huh, who said anything about presentation? I'm trying to construct an appropriate data model based on a set of business rules. Thanks for the advice.... |
#9
| |||
| |||
|
|
In principle it is possible, assuming your DBMS supports something like SQL's CREATE ASSERTION statement for example. I'd like to enforce this based on the data model and its relationships. |
|
Although to me, it doesn't seem possible without an additional layer of logic. The need for a check assertion in a RDMS tells me that cerain cituations must be enforced at a higher level. |
#10
| |||
| |||
|
|
On 15 Oct, 22:59, dutone <dut... (AT) hotmail (DOT) com> wrote: I'd like to enforce this based on the data model and its relationships. Although to me, it doesn't seem possible without an additional layer of logic. The need for a check assertion in a RDMS tells me that cerain cituations must be enforced at a higher level. This is one of them I guess. Maybe your definition of a data model differs from mine. All such constraints are surely part of that model irrespective of what syntax the DBMS uses. If you have some particular DBMS in mind then maybe someone will have other suggestions about features supported by that product. Perhaps a redesign would also be possible but I'm reluctant to begin a design-by- newsgroup exercise. -- David Portas |
![]() |
| Thread Tools | |
| Display Modes | |
| |