List:General Discussion« Previous MessageNext Message »
From:Joerg Bruehe Date:February 11 2010 4:46pm
Subject:Re: how things get messed up
View as plain text  
Hi Ilya, everybody!


Ilya Kazakevich wrote:
> [[...]]
> 
> IMHO:
> Storing files in DB is probably bad idea.
> Here are some advantages of storing files on filesystem:
> [[...]]

We could discuss them individually, but I agree several of your points
are valid. The remaining question is which importance you assign to them.

> 
> And there is only one disadvantage: consistency. When deleting user -- all
> her data could be deleted automatically using foreign keys, but you have to
> do it in your app if files are stored externally.

"Only one ...: consistency": I contradict your use of "only", very strongly.
Probably that is because I value consistency extremely high, definitely
higher than ease of programming and performance.

If you keep related data in the same storage mechanism (say, the
database), then the chances of dealing with them in a consistent manner
improve greatly. This shows when you think about access privileges,
referential integrity, export/import, backup/restore, migration to a new
system, replication, ...

By keeping your data in related tables (nobody forces you to have the
images in the person table, using the same ID in two tables and defining
referential integrity constraints is sufficient), you have a much better
chance to get the application and the handling correct.
If your data are valuable (and applicant data are - just consider the
costs of a law suit when a rejected applicant goes to court), that
correctness is an essential requirement.

> 
> [[...]]
> 

Regards,
Jörg

-- 
Joerg Bruehe,  MySQL Build Team,  Joerg.Bruehe@stripped
Sun Microsystems GmbH,   Komturstraße 18a,   D-12099 Berlin
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels
Vorsitzender des Aufsichtsrates: Martin Haering     Muenchen: HRB161028

Thread
how things get messed upJohn G. Heim10 Feb
  • Re: how things get messed upBuford Tannen10 Feb
  • RE: how things get messed upIlya Kazakevich10 Feb
    • Re: how things get messed upCui Shijun11 Feb
      • RE: how things get messed upJerry Schwartz11 Feb
        • Re: how things get messed upJohan De Meersman12 Feb
    • Re: how things get messed upJoerg Bruehe11 Feb
    • Re: how things get messed upJochem van Dieten11 Feb
  • Re: how things get messed upMartijn Tonies11 Feb
    • Re: how things get messed upDavid Giragosian11 Feb
  • RE: how things get messed upJerry Schwartz11 Feb
  • Re: how things get messed upMartijn Tonies11 Feb
    • RE: how things get messed upJerry Schwartz11 Feb
    • Re: how things get messed upAnn W. Harrison12 Feb
  • Re: how things get messed upMartijn Tonies12 Feb
    • Re: how things get messed upJohan De Meersman12 Feb
  • Re: how things get messed upMartijn Tonies12 Feb
    • Re: how things get messed upJohan De Meersman12 Feb
      • Re: how things get messed upVikram A12 Feb
        • Re: how things get messed upJohan De Meersman12 Feb
          • Re: how things get messed upVikram A12 Feb
            • RE: how things get messed upJerry Schwartz16 Feb
              • RE: how things get messed upMartin Gainty16 Feb
                • Re: how things get messed upBarry Leslie17 Feb
              • Re: how things get messed upVikram A18 Feb
                • RE: how things get messed upJerry Schwartz18 Feb
                  • Re: how things get messed upJohan De Meersman18 Feb
  • Re: how things get messed upMartijn Tonies15 Feb
  • Re: how things get messed upMartijn Tonies15 Feb
    • Re: how things get messed upJohan De Meersman16 Feb
      • Re: how things get messed upPaul McCullagh17 Feb
  • Re: how things get messed upMartijn Tonies15 Feb
    • Re: how things get messed upAnn W. Harrison15 Feb
      • Re: how things get messed upJohan De Meersman16 Feb
      • RE: how things get messed upJerry Schwartz16 Feb
  • Re: how things get messed upMartijn Tonies18 Feb
RE: how things get messed upJerry Schwartz22 Feb
  • Re: how things get messed upVikram A24 Feb