Обсуждение: Postgres for mobile website?

Поиск
Список
Период
Сортировка

Postgres for mobile website?

От
Andre Lopes
Дата:
Hi,
 
I have a website using Postgres database. Now I need to develop a mobile website, what should I do?
 
Use the Postgres database or copy the information of the database to a SQLite database? Postgres isn't heavy to a mobile website?
 
The website is update 2 times month. I can easly sincronize the databases Postgres to SQLite. What do you think about this solution?
 
Best Regards.

Re: Postgres for mobile website?

От
Brian Modra
Дата:
2009/11/4 Andre Lopes <lopes80andre@gmail.com>:
> Hi,
>
> I have a website using Postgres database. Now I need to develop a mobile
> website, what should I do?

You need some middleware.
As it happens, my open source project "The Karoo Project" includes
some middleware for developing websites using postgresql as the
database, so you could use that. I had a look around for tools for
such middleware and seemed to find only PHP, but I'd be interested to
know if anyoe can enlighten me (in effect to tell me if my project is
filling a much needed gap or not.)

> Use the Postgres database or copy the information of the database to a
> SQLite database? Postgres isn't heavy to a mobile website?

The website being heavy or light depends on the way you design it.
As long as your output is simple xhtml, or wap, or both (determined by
the mobile phone's html request headers), then it will be "light" from
the phone's perspective.

> The website is update 2 times month. I can easly sincronize the databases
> Postgres to SQLite. What do you think about this solution?

It depends a lot on the type of application and the type of data.

> Best Regards.



--
Brian Modra   Land line: +27 23 5411 462
Mobile: +27 79 69 77 082
5 Jan Louw Str, Prince Albert, 6930
Postal: P.O. Box 2, Prince Albert 6930
South Africa
http://www.zwartberg.com/

Re: Postgres for mobile website?

От
Steve Crawford
Дата:
Andre Lopes wrote:
> Hi,
>
> I have a website using Postgres database. Now I need to develop a
> mobile website, what should I do?
>
> Use the Postgres database or copy the information of the database to a
> SQLite database? Postgres isn't heavy to a mobile website?
>
> The website is update 2 times month. I can easly sincronize the
> databases Postgres to SQLite. What do you think about this solution?
>
> Best Regards.
You question is unclear. Changing databases makes no sense in relation
to the browser used to access a website. The front-end might render
pages differently depending on whether it is accessed from a desktop,
Blackberry, iPhone, etc. but that has nothing to do with the database.

Are you, on the other hand, developing an application that runs on a
mobile device and which requires its own stand-alone database? In that
case you will need to find an acceptable data-store that can run on the
targeted device(s) and a method of keeping the device and central
databases in-synch.

More info would help get a useful answer.

Cheers,
Steve

Re: Postgres for mobile website?

От
Howard Cole
Дата:
Andre Lopes wrote:
> Hi,
>
> I have a website using Postgres database. Now I need to develop a
> mobile website, what should I do?
>
> Use the Postgres database or copy the information of the database to a
> SQLite database? Postgres isn't heavy to a mobile website?
>
> The website is update 2 times month. I can easly sincronize the
> databases Postgres to SQLite. What do you think about this solution?
>
> Best Regards.
Typically, for a website, the database is stored on the server and not
the client so it does not matter about the size of the database/dbms.
You can use the same server for both websites. I run both mobile
websites and normal websites from the same database.

Your choice of dbms depends upon the workload/complexity of the data. I
find postgres scales nicely for most workloads.

Howard Cole
www.selestial.com