dbTalk Databases Forums  

how to design tables to store random number of columns

comp.databases comp.databases


Discuss how to design tables to store random number of columns in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Damien
 
Posts: n/a

Default Re: how to design tables to store random number of columns - 09-13-2006 , 03:06 AM






derek wrote:
Quote:
at the first stage, what I need is to design a table or tables to store
different data sources efficiently. I may need to query or do some
statistic on those data later on.
So, at the moment, your requirement is to store data and never retrieve
it. The simplest way to do that is to not store the data at all. The
visible results are the same.

More seriously, to help us to understand better, can you describe:

a) what the reason is for wanting to store all of this data together
b) why the data from various sources belongs in the same place (do all
of these sources describe the same kind of entities? might the same
entity be described by two different data sources?)
c) why the number of columns from different data sources are different
(are there intersections between columns from different data sources?)
d) If you're never going to query the data, then we cannot recommend a
solution. What are the potential queries that you're going to run? (For
instance, if you're going to run date range queries, then forcing
everything to go into a single column of datatype varchar(8000) isn't
going to be optimal)

Damien



Reply With Quote
  #12  
Old   
ctspsr@yahoo.com
 
Posts: n/a

Default Re: how to design tables to store random number of columns - 09-13-2006 , 01:27 PM






What is your technical environment?
Let's say you are using unix and sybase. You should be able to write a
shell script that parses the data file to see the number of columns it
has and then create a table in the databse that would hold your data.

Ofcourse, I am assuming that the user is used in the database to create
the table has create table permissions.

So it really depends on teh technical environment you are using. It is
NOT impossible but unless you tell more details on what you are trying
to do, it is difficult to give you a good advice.

Reddy

Damien wrote:
Quote:
derek wrote:
at the first stage, what I need is to design a table or tables to store
different data sources efficiently. I may need to query or do some
statistic on those data later on.

So, at the moment, your requirement is to store data and never retrieve
it. The simplest way to do that is to not store the data at all. The
visible results are the same.

More seriously, to help us to understand better, can you describe:

a) what the reason is for wanting to store all of this data together
b) why the data from various sources belongs in the same place (do all
of these sources describe the same kind of entities? might the same
entity be described by two different data sources?)
c) why the number of columns from different data sources are different
(are there intersections between columns from different data sources?)
d) If you're never going to query the data, then we cannot recommend a
solution. What are the potential queries that you're going to run? (For
instance, if you're going to run date range queries, then forcing
everything to go into a single column of datatype varchar(8000) isn't
going to be optimal)

Damien


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.