![]() | |
#1
| |||
| |||
|
|
"Yoo-Jin Lee" <yoojin (AT) aps-cambridge (DOT) co.uk> wrote Hi, I'm working on a project to allow users to search a database table. The requirement is to have unlimited keys (columns) of string or integer. At anytime users can add a column of an integer or varchar to a table in any SQL 92 complaint database. We had a consultant visit who recommended against modelling the project on a database schema that constantly changes. His reasons were due to future updates to the project. I can't think of anyway to do it. Here's a Java approach. Initially, my thoughts were to create a table (tblMyData) with one column for the unique identifier. The user then adds columns of varchar or integer. An bmp ejb could model the metadata of tblMyData so that a search string could be constructed. jdbc would be used to directly access tblMyData. Is this bad design? Thoughts? Sounds bad to me. How are they going to populate all those new columns? What a messy idea. Take a step back from the details. What problem are your REALLY trying to solve? Who made that (unlimited keys) a requirement of your project? Is your understanding of it truely what they mean by that? I can see an alternate interpretation: unlimited keys means being able to SEARCH based on any key in any table. That's a much different requirement don't you think? (And one that is actually possible to implement!) Anyother way to do this? Not as you initially proposed. [] Thanks for your thoughts. -Yoo-Jin You are welcome. HTH Ed |
#2
| |||
| |||
|
|
Ed, Thanks for replying. I have not misinterpreted the requirement as stated. Unfortunately, being a developer you have to code for whatever requirement you're given - no matter how silly it may seem. Populating the table will come out of how data is being stored. Thanks anyhow. -Yoo-Jin "Ed prochak" <ed.prochak (AT) magicinterface (DOT) com> wrote in message news:4b5394b2.0307300526.2a8cec5d (AT) posting (DOT) google.com... "Yoo-Jin Lee" <yoojin (AT) aps-cambridge (DOT) co.uk> wrote in message news:<bg878v$6rc$1 (AT) sparta (DOT) btinternet.com>... Hi, I'm working on a project to allow users to search a database table. The requirement is to have unlimited keys (columns) of string or integer. At anytime users can add a column of an integer or varchar to a table in any SQL 92 complaint database. We had a consultant visit who recommended against modelling the project on a database schema that constantly changes. His reasons were due to future updates to the project. I can't think of anyway to do it. Here's a Java approach. Initially, my thoughts were to create a table (tblMyData) with one column for the unique identifier. The user then adds columns of varchar or integer. An bmp ejb could model the metadata of tblMyData so that a search string could be constructed. jdbc would be used to directly access tblMyData. Is this bad design? Thoughts? Sounds bad to me. How are they going to populate all those new columns? What a messy idea. Take a step back from the details. What problem are your REALLY trying to solve? Who made that (unlimited keys) a requirement of your project? Is your understanding of it truely what they mean by that? I can see an alternate interpretation: unlimited keys means being able to SEARCH based on any key in any table. That's a much different requirement don't you think? (And one that is actually possible to implement!) Anyother way to do this? Not as you initially proposed. [] Thanks for your thoughts. -Yoo-Jin You are welcome. HTH Ed |
#3
| |||
| |||
|
| "Yoo-Jin Lee" <yoojin (AT) aps-cambridge (DOT) co.uk> wrote in message news:bg8hvp$2ie$1 (AT) titan (DOT) btinternet.com... Ed, Thanks for replying. I have not misinterpreted the requirement as stated. Unfortunately, being a developer you have to code for whatever requirement you're given - no matter how silly it may seem. Populating the table will come out of how data is being stored. Thanks anyhow. -Yoo-Jin "Ed prochak" <ed.prochak (AT) magicinterface (DOT) com> wrote in message news:4b5394b2.0307300526.2a8cec5d (AT) posting (DOT) google.com... "Yoo-Jin Lee" <yoojin (AT) aps-cambridge (DOT) co.uk> wrote in message news:<bg878v$6rc$1 (AT) sparta (DOT) btinternet.com>... Hi, I'm working on a project to allow users to search a database table. The requirement is to have unlimited keys (columns) of string or integer. At anytime users can add a column of an integer or varchar to a table in any SQL 92 complaint database. We had a consultant visit who recommended against modelling the project on a database schema that constantly changes. His reasons were due to future updates to the project. I can't think of anyway to do it. Here's a Java approach. Initially, my thoughts were to create a table (tblMyData) with one column for the unique identifier. The user then adds columns of varchar or integer. An bmp ejb could model the metadata of tblMyData so that a search string could be constructed. jdbc would be used to directly access tblMyData. Is this bad design? Thoughts? Sounds bad to me. How are they going to populate all those new columns? What a messy idea. Take a step back from the details. What problem are your REALLY trying to solve? Who made that (unlimited keys) a requirement of your project? Is your understanding of it truely what they mean by that? I can see an alternate interpretation: unlimited keys means being able to SEARCH based on any key in any table. That's a much different requirement don't you think? (And one that is actually possible to implement!) Anyother way to do this? Not as you initially proposed. [] Thanks for your thoughts. -Yoo-Jin You are welcome. HTH Ed Ed is correct. This is a "requirement" that bears some questioning. If you went to an architect and said "I need a house with the ability to have an unlimited number of different rooms at the flick of a switch." What do you think the architect would say. (after he picked himself off the ground and stopped laughing) Sure it is possible to do what you suggest and you will end up with a totally unmaintainable system, difficult or almost impossible to generate queries for, slow, unscalable etc. So are you saying the unlimited "requirement" is more important than those other requirements. (eg maintainability, performance, scalability) Just because it is a "requirement" doesn't mean it is reasonably implemental or that it should be done. I would dig deeper and find out what the business problem that is trying to solve is. Not the business solution, the business problem. (the unlimited columns is a business solution, not a business problem) Post the business problem and I bet you will get some excellent suggestions on how to solve the business problem. Jim |
#4
| |||
| |||
|
|
Ok, The business problem is that we have a search engine based on an item. Each item has keys associated with it. This engine needs to be configurable for each different organisation that uses it. The problem is that each organisation wants to attach a different number of keys to an item. ie. Company A - wants to add 20 string keys, 3 number keys, and 10 date keys to each item. Company B - wants to add 13 string keys, 2 number keys, and 4 date keys to each item. When I said unlimited of course no company is going to add 1 million keys to an item it's just has that potential. -Yoo-Jin "Jim Kennedy" <kennedy-down_with_spammers (AT) no_spam (DOT) comcast.net> wrote in message news:5sQVa.19230$Ho3.3872 (AT) sccrnsc03 (DOT) .. "Yoo-Jin Lee" <yoojin (AT) aps-cambridge (DOT) co.uk> wrote in message news:bg8hvp$2ie$1 (AT) titan (DOT) btinternet.com... Ed, Thanks for replying. I have not misinterpreted the requirement as stated. Unfortunately, being a developer you have to code for whatever requirement you're given - no matter how silly it may seem. Populating the table will come out of how data is being stored. Thanks anyhow. -Yoo-Jin "Ed prochak" <ed.prochak (AT) magicinterface (DOT) com> wrote in message news:4b5394b2.0307300526.2a8cec5d (AT) posting (DOT) google.com... "Yoo-Jin Lee" <yoojin (AT) aps-cambridge (DOT) co.uk> wrote in message news:<bg878v$6rc$1 (AT) sparta (DOT) btinternet.com>... Hi, I'm working on a project to allow users to search a database table. The requirement is to have unlimited keys (columns) of string or integer. At anytime users can add a column of an integer or varchar to a table in any SQL 92 complaint database. We had a consultant visit who recommended against modelling the project on a database schema that constantly changes. His reasons were due to future updates to the project. I can't think of anyway to do it. Here's a Java approach. Initially, my thoughts were to create a table (tblMyData) with one column for the unique identifier. The user then adds columns of varchar or integer. An bmp ejb could model the metadata of tblMyData so that a search string could be constructed. jdbc would be used to directly access tblMyData. Is this bad design? Thoughts? Sounds bad to me. How are they going to populate all those new columns? What a messy idea. Take a step back from the details. What problem are your REALLY trying to solve? Who made that (unlimited keys) a requirement of your project? Is your understanding of it truely what they mean by that? I can see an alternate interpretation: unlimited keys means being able to SEARCH based on any key in any table. That's a much different requirement don't you think? (And one that is actually possible to implement!) Anyother way to do this? Not as you initially proposed. [] Thanks for your thoughts. -Yoo-Jin You are welcome. HTH Ed Ed is correct. This is a "requirement" that bears some questioning. If you went to an architect and said "I need a house with the ability to have an unlimited number of different rooms at the flick of a switch." What do you think the architect would say. (after he picked himself off the ground and stopped laughing) Sure it is possible to do what you suggest and you will end up with a totally unmaintainable system, difficult or almost impossible to generate queries for, slow, unscalable etc. So are you saying the unlimited "requirement" is more important than those other requirements. (eg maintainability, performance, scalability) Just because it is a "requirement" doesn't mean it is reasonably implemental or that it should be done. I would dig deeper and find out what the business problem that is trying to solve is. Not the business solution, the business problem. (the unlimited columns is a business solution, not a business problem) Post the business problem and I bet you will get some excellent suggestions on how to solve the business problem. Jim |
#5
| |||
| |||
|
|
The business problem is that we have a search engine based on an item. Each item has keys associated with it. This engine needs to be configurable for each different organisation that uses it. The problem is that each organisation wants to attach a different number of keys to an item. |
#6
| |||
| |||
|
|
Ok, The business problem is that we have a search engine based on an item. Each item has keys associated with it. This engine needs to be configurable for each different organisation that uses it. The problem is that each organisation wants to attach a different number of keys to an item. ie. Company A - wants to add 20 string keys, 3 number keys, and 10 date keys to each item. Company B - wants to add 13 string keys, 2 number keys, and 4 date keys to each item. When I said unlimited of course no company is going to add 1 million keys to an item it's just has that potential. -Yoo-Jin |
#7
| |||
| |||
|
|
Hi, I'm working on a project to allow users to search a database table. The requirement is to have unlimited keys (columns) of string or integer. At anytime users can add a column of an integer or varchar to a table in any SQL 92 complaint database. We had a consultant visit who recommended against modelling the project on a database schema that constantly changes. His reasons were due to future updates to the project. I can't think of anyway to do it. Having read your other stuff, if you've got a db-programmer type guy at |
![]() |
| Thread Tools | |
| Display Modes | |
| |