Blobs and Blobs
Posted in 2009
Topics: Storage & Space Management, Data Types & Schema Design
Hi folks,
Well, well, well. I need transfer some blob data to a new sbspace ou blobspace.
That's the table schema
-- Table schema
create table sounds
(
size int,
music char(32),
singer char(32),sound byte
) in dados
-- End of Table schema
In my dbserver machine, I got a column type byte but it's not in a binary
large objects column. I need to create a blobspace to change the binary files
location.
First - What is better to storage objects like images ? (not too big) with 3
or 4 Mbytes per row ?
Second - How do I insert a blob to a byte column when this column is not in a
blob/clob space ?
and finally, what is the best way to move objects like those ?
thanks a lot,
André
_________________________________________________________________
Deixe suas conversas mais divertidas. Baixe agora mesmo novos emoticons. É
grátis!
http://specials.br.msn.com/ilovemessenger/pacotes.aspx
Your questions is not clear and I am not sure if your intention is to create a
blobspace or not. But if you are the following may work. We store our actual
images in blobspace.
1 Create the blobspace
2. Create a new table in a dbspace, this table contains a column defined as a
byte column to hold the image. The byte column is then directed to a blobspace.
new_table_name
xxx_serial_id serial,
xxx_date date,
xxx_imag_full byte in dbimageblob (which is the blobspace name)
in dbspace
3. You should then be able to do an insert statement and move the data from
your old table to your new table.
insert into new_table_name
select * from old_table
where ...
If you have to many rows your script may need to use a function call to
process x number of rows between your begin work and commit work.
Ok. I'll try to be more specific now.
I got a database with a lot of byte (exactly byte) data types columns. It will
store some images and it must to be as fast as it can.
We know that there's a lot a advantages to put those images into a blobspace
or smartspace, ok?
So, I must to create a method to make this migration process easy to be
re-executed later.
Well, the envioroment is
Table, indexes and byte on the same dbspace.
And it must to be
Table in a data dbspace
Indexes in a index dbspace
Blobspace to images (and, in a near future, it will store electronic documents)
What is the best way to do it? I tried to make a select / insert sql command
but it doesn't work. The destiny table
claim to supply blob information.
Thanks,
André
> To: ids@iiug.org
> From: kathy.duchene@state.mn.us
> Subject: Re: Blobs and Blobs [17279]
> Date: Thu, 1 Oct 2009 10:45:14 -0400
>
> Your questions is not clear and I am not sure if your intention is to create
a
> blobspace or not. But if you are the following may work. We store our actual
> images in blobspace.
>
> 1 Create the blobspace
>
> 2. Create a new table in a dbspace, this table contains a column defined as a
> byte column to hold the image. The byte column is then directed to a
> blobspace.
>
> new_table_name
> xxx_serial_id serial,
> xxx_date date,
> xxx_imag_full byte in dbimageblob (which is the blobspace name)
> in dbspace
>
> 3. You should then be able to do an insert statement and move the data from
> your old table to your new table.
>
> insert into new_table_name
> select * from old_table
> where ...>
> If you have to many rows your script may need to use a function call to
> process x number of rows between your begin work and commit work.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
_________________________________________________________________
Conheça os novos produtos Windows Live! Clique aqui.
http://www.windowslive.com.br