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 |
|
![](templates/subSilver/images/spacer.gif) |
kolusu Site Admin
![Site Admin Site Admin](images/ranks/adminpic.jpg)
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
Posted: Tue Mar 14, 2023 10:33 am Post subject: |
|
|
manu,
As far as I know z/OS Db2 does NOT support name value pair tables. _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
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 |
|
![](templates/subSilver/images/spacer.gif) |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 624 Topics: 175 Location: Stockholm, Sweden
|
Posted: Fri Mar 22, 2024 2:56 am Post subject: |
|
|
So, reading 4 rows instead of 1, or did I misunderstand you?
To say it sounds inefficient must be an understatement.
How many times per day will it be read? _________________ Michael |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|
|