Should I store flash advertisements in DB?
-
Hi I am developing a website that will have an advertising bussiness model, I am wondering if I should store flash animated adverts in the DB, I think that storing them as files will greatly reduce the load on the DB and allow it to serve more people -> more efficient design decision. Am I right with this or do you think otherwise? Please explain your answer. Thaaaaaaaaanks alot
And ever has it been that love knows not its own depth until the hour of separation Mohammad Gdeisat
-
Hi I am developing a website that will have an advertising bussiness model, I am wondering if I should store flash animated adverts in the DB, I think that storing them as files will greatly reduce the load on the DB and allow it to serve more people -> more efficient design decision. Am I right with this or do you think otherwise? Please explain your answer. Thaaaaaaaaanks alot
And ever has it been that love knows not its own depth until the hour of separation Mohammad Gdeisat
Mohammad A Gdeisat wrote:
if I should store flash animated adverts in the D
Few considerations: - are the advertisements changed often - does the changing need to be transactional - do you want to have a backup of your advertisements when you backup the database Based on those questions you could decide whether to use db or not.
Mohammad A Gdeisat wrote:
storing them as files will greatly reduce the load on the DB and allow it to serve more people
They still got to be stored somewhere and propably be backed up. Depending on your configuration and layers, the database may not be any slower than the file system.
The need to optimize rises from a bad design.My articles[^]
-
Mohammad A Gdeisat wrote:
if I should store flash animated adverts in the D
Few considerations: - are the advertisements changed often - does the changing need to be transactional - do you want to have a backup of your advertisements when you backup the database Based on those questions you could decide whether to use db or not.
Mohammad A Gdeisat wrote:
storing them as files will greatly reduce the load on the DB and allow it to serve more people
They still got to be stored somewhere and propably be backed up. Depending on your configuration and layers, the database may not be any slower than the file system.
The need to optimize rises from a bad design.My articles[^]
Hi, Thanks for the answer. About these considerations: 1. are the advertisements changed often? Well, I do not expect them to change so often, it is a typical website, companies are expected to buy several thousands of ad impressions that will last for sometime, new companies may buy as time passes. 2. does the changing need to be transactional? No, at all. 3. do you want to have a backup of your advertisements when you backup the database? No, not necessary at all.
Mika Wendelius wrote:
They still got to be stored somewhere and propably be backed up. Depending on your configuration and layers, the database may not be any slower than the file system
Well, they have to be stored somewhere, but I am worried that if I store them in a DB (which is mainly used to store text, and is expected serve thousands of users per minute) then this will make DB queries take much longer time, which will lead to limitation to the overall number of users I can serve/minute. In short, I am thinking of move this load from the database resources (which has limited # of simultanous connections, for example) to the server file system.. Thanks
And ever has it been that love knows not its own depth until the hour of separation Mohammad Gdeisat
-
Hi, Thanks for the answer. About these considerations: 1. are the advertisements changed often? Well, I do not expect them to change so often, it is a typical website, companies are expected to buy several thousands of ad impressions that will last for sometime, new companies may buy as time passes. 2. does the changing need to be transactional? No, at all. 3. do you want to have a backup of your advertisements when you backup the database? No, not necessary at all.
Mika Wendelius wrote:
They still got to be stored somewhere and propably be backed up. Depending on your configuration and layers, the database may not be any slower than the file system
Well, they have to be stored somewhere, but I am worried that if I store them in a DB (which is mainly used to store text, and is expected serve thousands of users per minute) then this will make DB queries take much longer time, which will lead to limitation to the overall number of users I can serve/minute. In short, I am thinking of move this load from the database resources (which has limited # of simultanous connections, for example) to the server file system.. Thanks
And ever has it been that love knows not its own depth until the hour of separation Mohammad Gdeisat
Based on your answers, I wouldn't the ads to the database.
Mohammad A Gdeisat wrote:
I am worried that if I store them in a DB (which is mainly used to store text, and is expected serve thousands of users per minute) then this will make DB queries take much longer time
Sounds like you are retrieving the ad from the database with every call? Regardless of where the ad is, this would be slow. Could you fetch a new ad for example every 30 seconds and in the meanwhile cache it in the memory of the IIS server.
The need to optimize rises from a bad design.My articles[^]
-
Based on your answers, I wouldn't the ads to the database.
Mohammad A Gdeisat wrote:
I am worried that if I store them in a DB (which is mainly used to store text, and is expected serve thousands of users per minute) then this will make DB queries take much longer time
Sounds like you are retrieving the ad from the database with every call? Regardless of where the ad is, this would be slow. Could you fetch a new ad for example every 30 seconds and in the meanwhile cache it in the memory of the IIS server.
The need to optimize rises from a bad design.My articles[^]
I will almost retrieve ads with half of the requests, which makes it a heavy load on the DB. and I think I will not store the ads in the DB.
And ever has it been that love knows not its own depth until the hour of separation Mohammad Gdeisat