From: Mediratta, B. <bh...@fu...> - 2002-04-30 02:02:18
|
> From: Mail@Thiriet.net [mailto:ma...@th...] > > I've read news about the new version using MySQL instead of > text files. > > I use MySQL all the time, but in this case, what will be the > improvement of using it? That is a very good question! Too often people assume that using MySQL (or some other database) is a panacea for just about any data management problem. In this particular case, one of the main problems with Gallery is that we deal with data at the album level. So, in order to do *any* operation with an album we have to load the entire contents of the album (including information about every photo, every comment, every hit count, etc) into memory. This does not scale, and it also causes problems when you try to do multiple modifications to an album concurrently. One of the primary improvements in Gallery2 is to change this weakness. G2 will deal with the smallest set of information that it needs to actually do its job. Concurrency issues will be prevented by locking items. Now, we could implement all of this using flat files in the filesystem. However, it would have the following drawbacks: 1. It would not be as efficient as a real relational database 2. It would probably have to use some kind of proprietary data description making it harder for others to interoperate with Gallery MySql (and other relational databases) have come up with a very fast and efficient way to store this data. So instead of re-inventing the wheel, we're going to use a true relational database to store the data for G2. -Bharat |