Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



What is Database Abstraction Layer in PHP?

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 07-03-2010
Member
 
Join Date: May 2009
Posts: 525
What is Database Abstraction Layer in PHP?
  

hi friends,
I have done the PHP programming language to a better extent. But still I am facing some problem while doing task with the Database. I want to know about the DBA.!! Thought that instead of searching on Web, it would be better for me to post here, since you guys explain very well. Please tell me what is Database Abstraction Layer in PHP? Any other information related to the subject would be appreciable.!!

Reply With Quote
  #2  
Old 07-03-2010
Member
 
Join Date: Aug 2006
Posts: 235
Re: What is Database Abstraction Layer in PHP?

These functions allow access to databases of Berkeley DB style. It is a general abstraction layer for multiple databases, based on files. The behavior of certain aspects depends on the implementation of the database underlying. Functions like dba_optimize () and dba_sync () function as planned for a database, and will do absolutely nothing on others. You must download and install the drivers DBA supported. dba_optimize is used to optimize database. The Description is as follows :
Code:
bool dba_optimize (resource $ handle)
dba_optimize () optimizes the database specified by handle.
__________________
3.2 (northwood)
2gig ram
ATI AIW X800xt 256mb
Gigabyte GA-8knxp 875p Chipset
Optiwrite 8X DVD Burner
Win XP PRO Sp2 (Works Perfectly)
2 SATA Raptor 74gig Raid 0
2 7200 IDE 320gig HD
Reply With Quote
  #3  
Old 07-03-2010
Member
 
Join Date: Jul 2006
Posts: 286
Re: What is Database Abstraction Layer in PHP?

Use "dba_optimize" to optimize a database, which usually consists of eliminating gaps between records created by deletes. Whereas the "dba_sync" function will synchronize the view of the database in memory and its image on the disk. As you insert records, they may be cached in memory by the underlying engine. Other processes reading from the database will not see these new records until synchronization. DBM is the oldest (original) database of Berkeley DB style. You should avoid using it if you choose. We do not provide support for the compatibility of internal functions to DB2 and gdbm, because they are not compatible at source code level, but can not handle the original format DBM.
__________________
IF you hate me, please don't mention it. I know who hates me and who doesn't. You really do not have to make fun of people....
Reply With Quote
  #4  
Old 07-03-2010
Member
 
Join Date: Jul 2006
Posts: 289
Re: What is Database Abstraction Layer in PHP?

The following are some list of DBA handlers, that might be very useful for you :
  1. ndbm - Ndbm is a new type and more flexible than dbm. It does include arbitrary limits of dbm
  2. gdbm - Gdbm is a "manager databases GNU.
  3. cdb - Cdb package is a fast, lightweight and reliable for creating and reading constant databases.
  4. cdb_make - Since PHP 4.3.0 support writing of cdb files when the cdb library is used.
  5. flatfile - Supported since PHP 4.3.0 for compatibility with the deprecated dbm extension. However, you can use when files were created in this format. Occurs when the configuration failed to find external library.
__________________
Signatures reduce available bandwidth
Reply With Quote
  #5  
Old 07-03-2010
Member
 
Join Date: Apr 2008
Posts: 2,001
Re: What is Database Abstraction Layer in PHP?

When you call the function dba_open () or function dba_popen (), one of manager names must be provided as an argument. The list of available managers can be displayed using the function phpinfo () function or dba_handlers (). The phpinfo is used to output lots of PHP information. The following is a description of it :
Code:
bool phpinfo ([int $ what = INFO_ALL])
Outputs lots of PHP information on their current setup: kernel options, extensions, version, server information, and environment (if compiled as a module), PHP environment, system information, paths, values general and local configuration, HTTP Headers and the PHP license.
Reply With Quote
  #6  
Old 07-03-2010
Member
 
Join Date: May 2008
Posts: 2,008
Re: What is Database Abstraction Layer in PHP?

The functions dba_open () and dba_popen () return a resource representing the file of the database access which is used by all other dba-function. The following is the list of the DBA Functions :
  • dba_close - Close a DBA database
  • dba_delete - Deletes a row in a DBA database
  • dba_exists - Check whether key exists DBA
  • dba_fetch - Gets data associated with a key DBA
  • dba_firstkey - Fetch first key DBA
  • dba_handlers - List Available DBA handlers
  • dba_insert - Insert entry DBA
  • dba_key_split - Transform representation of key DBA in string representation into array
  • dba_list - List all files database open DBA
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "What is Database Abstraction Layer in PHP?"
Thread Thread Starter Forum Replies Last Post
One layer affecting another layer in Photoshop Jolyn Chris Windows Software 2 15-02-2012 04:51 PM
How to Compress Dual Layer DVD-9 to Single Layer? Robin Pande Windows Software 3 25-12-2010 08:10 PM
Don't know what is data abstraction Sarfaraj Khan Software Development 5 23-01-2010 12:32 PM
Confused in between abstraction and encapsulation reetus Software Development 3 08-12-2009 08:59 AM
Concept of abstraction bharti_rajpal Software Development 3 25-11-2009 11:52 AM


All times are GMT +5.5. The time now is 07:36 PM.