Subject | Re: [firebird-support] DB Design Question - include large blob in master table, or separate table |
---|---|
Author | Martijn Tonies |
Post date | 2008-01-30T09:25:09Z |
Hello Maya,
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> >>Locking issues? Do you expect multiple people to run the sameA quick test revealed this shouldn't be a problem.
> >>UPDATE statement against the record?
>
> Nope, I was worried about: (pseudo code)
>
> a- Start Transaction
> b- update StockTable small fields
> c- if New-Image-Selected then
> update same StockTable record's blob field (in a separate SQL
> statement)
> d- Commit
>
> I think line c- will create a lock conflict as the same record is being
> updated twice within the same transaction?
> (And merging it into one update is not going to be easy as I have aSee above.
> middle layer that constructs the update SQL automagically, so I'd rather
> try to not have to go that route if at all possible)
>
> >>SELECT * FROM ... is a big no-no. Better get that fixed :-)
> OK, so agreed, your DB design shouldn't try to compensate for bad SQL,
> but regarding the update issue, good or bad idea?
> Or, in your experience, is the speed of updating say a 1MB image in aDon't update the blob if you don't have to.
> blob negligible?
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com