dbTalk Databases Forums  

storing program code

comp.databases comp.databases


Discuss storing program code in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
vertigo
 
Posts: n/a

Default storing program code - 07-06-2004 , 01:28 PM






Hello
I have a problem:
i use postgresql and i need to store in one of my table's column source
code of program (written in C). What is the best type for that column ?


Thanx
Michal


Reply With Quote
  #2  
Old   
Nick Landsberg
 
Posts: n/a

Default Re: storing program code - 07-06-2004 , 05:01 PM






vertigo wrote:

Quote:
Hello
I have a problem:
i use postgresql and i need to store in one of my table's column source
code of program (written in C). What is the best type for that column ?


Thanx
Michal

Why? What is the problem you are trying to solve?

Your proposed "solution" is to store a possibly
extremely large amount of text in a "column" in
a table. Why a column? Why not another table?
Why not just store the fully-qualified filename?

NPL

--
"It is impossible to make anything foolproof
because fools are so ingenious"
- A. Bloch


Reply With Quote
  #3  
Old   
vertigo
 
Posts: n/a

Default Re: storing program code - 07-07-2004 , 06:56 AM




Quote:
Your proposed "solution" is to store a possibly
extremely large amount of text in a "column" in
a table. Why a column? Why not another table?
Why not just store the fully-qualified filename?
My problem is that i work on diskless machine and have
only access to remote database server (postgresql) and
all privileges to specified database,
and i must save a file on that server, so i could later
get it from that server.
What do you mean by 'Why not another table?' ?
How would you save that file ?

Thanx
Michal



Reply With Quote
  #4  
Old   
Ed prochak
 
Posts: n/a

Default Re: storing program code - 07-07-2004 , 03:10 PM



vertigo <none (AT) microsoft (DOT) com> wrote

Quote:
Your proposed "solution" is to store a possibly
extremely large amount of text in a "column" in
a table. Why a column? Why not another table?
Why not just store the fully-qualified filename?

My problem is that i work on diskless machine and have
only access to remote database server (postgresql) and
all privileges to specified database,
and i must save a file on that server, so i could later
get it from that server.
What do you mean by 'Why not another table?' ?
How would you save that file ?

Thanx
Michal
"Free your mind" Morpheous in The Matrix

one table has the information about the file, including an unique ID
column (or columns) and another table uses the ID and stores the file,
line by line. rather than a column that stores the whole file (which
can be a problem getting data in and out). Line numbering determines
ordering and it could have features not found in ordinary files, such
as a built in change history. With the ID it's obvious that many
"files" can be stored there.

HTH,
ED


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.