What is efficient, Oracle or MySQL in PHP? Help !
Moderator: General Moderators
- phazorRise
- Forum Contributor
- Posts: 134
- Joined: Mon Dec 27, 2010 7:58 am
What is efficient, Oracle or MySQL in PHP? Help !
I'm a newbie. I have some plans about desiging an application in PHP. So I want to know the best Database for PHP.
Re: What is efficient, Oracle or MySQL in PHP? Help !
Better think about the best database for your application, not for the programming languagephazorRise wrote:I'm a newbie. I have some plans about desiging an application in PHP. So I want to know the best Database for PHP.
MySQL is the most popular one, but PHP have drivers for a lot of databases and I've been using PostgreSQL with PHP in many projects
- phazorRise
- Forum Contributor
- Posts: 134
- Joined: Mon Dec 27, 2010 7:58 am
Re: What is efficient, Oracle or MySQL in PHP? Help !
i want to store large amount of data in a field. So Oracle provides LOB , is it available in MySQL?
Re: What is efficient, Oracle or MySQL in PHP? Help !
it provides TEXT for storing large amounts of text and BLOB (binary large object) to store binary data.
It can handle up to 4 GB (LARGE BLOB), 16 MB (MEDIUM BLOB), 64K (BLOB) or 256 bytes (TINY BLOB)
It can handle up to 4 GB (LARGE BLOB), 16 MB (MEDIUM BLOB), 64K (BLOB) or 256 bytes (TINY BLOB)
Re: What is efficient, Oracle or MySQL in PHP? Help !
What sort of data are you storing?phazorRise wrote:i want to store large amount of data in a field.
How will you use the data in the view?
How will you search for and retrieve the data?
- phazorRise
- Forum Contributor
- Posts: 134
- Joined: Mon Dec 27, 2010 7:58 am
Re: What is efficient, Oracle or MySQL in PHP? Help !
Darhazer wrote:it provides TEXT for storing large amounts of text and BLOB (binary large object) to store binary data.
It can handle up to 4 GB (LARGE BLOB), 16 MB (MEDIUM BLOB), 64K (BLOB) or 256 bytes (TINY BLOB)
Thanx for info. i'll try to work with these.
- phazorRise
- Forum Contributor
- Posts: 134
- Joined: Mon Dec 27, 2010 7:58 am
Re: What is efficient, Oracle or MySQL in PHP? Help !
I'm want to store text and images in database.Benjamin wrote:What sort of data are you storing?phazorRise wrote:i want to store large amount of data in a field.
How will you use the data in the view?
How will you search for and retrieve the data?
Searching will be done using AND, OR, NOT ie boolean searchig and nested clauses using queries.
Re: What is efficient, Oracle or MySQL in PHP? Help !
How exactly will you be performing AND, OR, NOT queries on fulltext and binary data?phazorRise wrote:Searching will be done using AND, OR, NOT ie boolean searchig and nested clauses using queries.
- phazorRise
- Forum Contributor
- Posts: 134
- Joined: Mon Dec 27, 2010 7:58 am
Re: What is efficient, Oracle or MySQL in PHP? Help !
Benjamin wrote:How exactly will you be performing AND, OR, NOT queries on fulltext and binary data?phazorRise wrote:Searching will be done using AND, OR, NOT ie boolean searchig and nested clauses using queries.
i'll search it along with some other condition like according to 'ID' assigned with each record.
Re: What is efficient, Oracle or MySQL in PHP? Help !
Define "it". A row in a table is comprised of multiple fields. What field will you be using to retrieve the record?
- phazorRise
- Forum Contributor
- Posts: 134
- Joined: Mon Dec 27, 2010 7:58 am
Re: What is efficient, Oracle or MySQL in PHP? Help !
A row is consist of many fields. And each row is having one unique field like primary key ie ID with numeric value.Benjamin wrote:Define "it". A row in a table is comprised of multiple fields. What field will you be using to retrieve the record?
It will be incremented when a record is added. And for searching, I planned searching by this ID. If ID matches then from requested field data will be retrieved. Now this data is supposed to be fulltext or an image.
Do you think this is efficient way? Thank you for valuable time!
Re: What is efficient, Oracle or MySQL in PHP? Help !
If you are simply pulling the data using the id (primary key), I would recommend storing the path to the data in a varchar field instead of the actual data. This will reduce the load on the database server and allow you to access the data using the direct io functions of the operating system. Reference file_get_contents, file_put_contents and fopen (http://us.php.net/manual/en/function.fopen.php).
In other words, storing the data as files rather than in a MySQL table will save a lot of overhead and increase performance.
In other words, storing the data as files rather than in a MySQL table will save a lot of overhead and increase performance.
- phazorRise
- Forum Contributor
- Posts: 134
- Joined: Mon Dec 27, 2010 7:58 am
Re: What is efficient, Oracle or MySQL in PHP? Help !
I have designed a site in ASP as a mini-project for university. And in that, I used text files to store large amount of text and images of users were stored under a comman directory. I applied same logic as you've suggested. MDB was having fields just store the paths of these files. While retrieving I simply picked up these paths.Benjamin wrote:If you are simply pulling the data using the id (primary key), I would recommend storing the path to the data in a varchar field instead of the actual data. This will reduce the load on the database server and allow you to access the data using the direct io functions of the operating system. Reference file_get_contents, file_put_contents and fopen (http://us.php.net/manual/en/function.fopen.php).
In other words, storing the data as files rather than in a MySQL table will save a lot of overhead and increase performance.
Even for this application also I was about about to do the same. But thought MySQL have something special for such case.
I'll give it a shot about what you've suggested.