View previous topic :: View next topic |
Author |
Message |
manu Beginner
Joined: 26 Dec 2002 Posts: 47 Topics: 19
|
Posted: Mon Mar 13, 2023 12:28 pm Post subject: Pros and cons of name-Value pair tables in DB2 |
|
|
There is a idea to create name value pair tables so that it will be extensible(no need to add columns etc.) but want to understand the pros and cons of it in a Mainframe DB2 Cobol environment. Pease let me know if you have any experiences and inputs on the pros and cons. If there are other related discussions or articles, please let me know. Thanks. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12336 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
manu Beginner
Joined: 26 Dec 2002 Posts: 47 Topics: 19
|
Posted: Thu Mar 16, 2023 8:45 am Post subject: |
|
|
sorry for the delayed response. Yes, it is not supported but it will be indirectly done by creating two columns which are generic, the first one will hold the column name and the second one will hold the value. for example
instead of
Key-Column Field1 Field2 Field3 Field4
it will be like below.
Key-Column Generic-field-name field-value
1 Field1 XXXX
2 Field2 YYYYY
3 Field3 AAAA
4 Field4 BBBB
The only advantage I see is that fields can be added with out making physical table changes. I wanted to check whether there are any other advantages in doing this pattern in mainframe DB2 Cobol environment. Please let me know if anyone had implemented something similar and their feedback. Thanks |
|
Back to top |
|
 |
|
|