Database Abstraction & Factory Methods

Posted by pws5068 on Stack Overflow See other posts from Stack Overflow or by pws5068
Published on 2010-06-03T19:39:05Z Indexed on 2010/06/03 19:54 UTC
Read the original article Hit count: 261

I'm interested in learning more about design practices in PHP for Database Abstraction & Factory methods. For background, my site is a common-interest social networking community currently in beta mode.

Currently, I've started moving my old code for object retrieval to factory methods. However, I do feel like I'm limiting myself by keeping a lot of SQL table names and structure separated in each function/method.

Questions:

  1. Is there a reason to use PEAR (or similar) if I dont anticipate switching databases?

  2. Can PEAR interface with the MySqli prepared statements I currently use?

  3. Will it help me separate table names from each method? (If no, what other design patterns might I want to research?)

  4. Will it slow down my site once I have a significantly large member base?

© Stack Overflow or respective owner

Related posts about php

Related posts about design-patterns