473,387 Members | 3,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Best Database Class

code green
1,726 Expert 1GB
Upto now I have used my own Database class.
It employs an Abstract base class with common functionality and most public functions.
Inheriting this class are three classes that contain specific functionality for MySQL, SQL Server (mssql) and Access.

I now find I need the SQL Server functionality of Transactions: BEGIN, COMMIT, ROLLBACK.

Should I write my own functions with these fairly simple queries or switch to using PDO.
ADODB seems to carry a bit more overhead. benchmark
Please don't recommend PEAR as it does not keep up with PHP versions and abandons functions at a whim causing huge problems with legacy code.

PDO looks good, or can this also cause similar problems I have experienced with PEAR
May 17 '10 #1
4 2436
chathura86
227 100+
well im using PDO and still seems ok (both portability and performance)

now im using Doctrine ORM which is very cool
(Doctrine also uses PDO)

Regards
Chathura Bamunusinghe
May 17 '10 #2
code green
1,726 Expert 1GB
PDO doesn't look look that promising with MsSQL.
PDO_DBLIB is not recommended, but PDO_ODBC is.
ODBC is old school and may not be convenient, particuarly for remote servers
May 17 '10 #3
dlite922
1,584 Expert 1GB
Write your own function.

I just extended my DAO class to have these functions in them that run the simple queries. Been working great for me so far. Backwards compatible, portable, easy to use.



Dan
May 17 '10 #4
code green
1,726 Expert 1GB
Tried using PDO and the current driver PDO_DBLIB does not support transactions, so no use to me.

Apparently. Microsoft have released a better driver in Apr 2010 that fully supports PDO, but only a Beta version.

I have written my own Transaction functions, that simply contain the queries
Expand|Select|Wrap|Line Numbers
  1. BEGIN TRAN 
  2. COMMIT TRAN 
  3. ROLLBACK TRAN
and they work fine.
May 18 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Randy Yates | last post by:
Hi Folks, I'm looking for something that is completely independent of the MSVC++ Dev Studio environment, something that will compile and run under win32 using the mingw distribution. A class...
2
by: Bernardo | last post by:
Hi, Anyone knows what are the best database objects? The COM ADO is better then Data.OleDb or Data.SqlClient? Thanks,
1
by: Tee | last post by:
Hi, I am currently creating a website that will access to db a lot, currently I am using MS Access as the database. will there be any benefits to use a database class ? if yes, where can I find...
5
by: Tee | last post by:
Hi, can anyone show me a sample database class that suitable for MS Access ? I can't find it over the internet, what I found is only SQL, which is not what I want. Anyone have any ? Thanks,...
6
by: No Spam Man | last post by:
Hi, I am not a programmer and in the past have only created very simple, flat file databases. Although I'm a newbie, I think I could probably figure out basic Boolean logic and financial...
5
by: Slant | last post by:
Here's a question that most will have different answers to. I'm just dying to find a solution that seems halfway automated!! There really are two seperate issues which might be answered by the...
1
by: TheTeapot | last post by:
I'm looking for a PHP database class which allows database connections to mysql, AND (text/XML) files to store information. I'm looking to use the file storage in a small intranet usage of my...
2
by: BurtonBach | last post by:
I am relatively new to setting up databases. I am working on a database that will track some materials and trucking that our company uses. Currently I am creating a table called 'tblDayInfo'. It...
0
by: windandwaves | last post by:
Hi Folk What do you think about this database class? Do you have any feedback or ideas on how it could be improved? Thank you Nicolaas class dbClass {
1
by: maricar | last post by:
hello, i am a comsci student and im currently taking up my thesis..it is a student record system...wat wud be the best database programminig language that is compatible with MS Access?im begging for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.