It might help you to read a book on Physics Modeling in games, If you truly wish to gain an understanding of how to "program" physics yourself. There are some beginner books, and they go all the way up to expert level. Most are going to have examples in language other than DB. So to get the most out of them it would help if you have some C++ and Object Oriented Programming experience. Even without that, they still make for a good read, and your understanding of how physics engines are designed and implemented will greatly be enhanced.
I can sugggest reading
Physics Moddeling For Game Programmers by David Conger
published byremier Press
ISBN: 1-59200-093-2
As a starting point. The code examples are a mix C and C++. And spends some time covering DirectX (like every programming boook on the planet). But, the ideas expressed are quite valuable.
The Chapters cover
1. Physics in games
3-D objects
3-D scenes
movement
Rigid Objects
Rotation
Friction
Air and Water Resistance
Gravity
Collisions and Explosions
Springy Things
Waves
Essential Geometry of triangles
vectors
matrices
derivatives
2.(covers the directX framework, Com objects, & Direct3D)
3.Mathematical Tools for Physics and 3-D programming
The geometry of Triangles
2-D Coordinate Systems
3-d and 4-D Coordinate Systems
Units
Vectors
Implementing Vectors in Code
Mult. & Div. of a Vector by a Scalar
The Dot Product
The Cross Product
Unit Vectors
Projection
Vectors in 3-D
Matrices
The Identity Matrix
Addition and Subtraction
Mult. and Div by a Scalar
Matrix Multiplication
Transpose
Determinants
Matrix Inversion
4. 2-D transformations and Rendering
5. 3-D transformations and rendering
6. Meshes and X Files
Part II 3D Objects, Movement, And Collisions
7. Dynamics of particles
point particles
1-D,2-D,3-D Kinematics
Modeling Point Masses
Chapter 8 Collision of point particles
Collision Detection
spheres
cylinders
boxes
optimizations with space partitioning
Collision Response
Conservation of momentum
Energy
Elastic Collisions
Inelastic Collisions
Point Particle Collisions in 2 and 3-D
Collision of Spheres
9.Rigid Body Dynamics
10. Collision of Rigid Bodies
11. Gravity and projectiles
12. Mass and Spring systems
13. Water and Waves
15. Cars,Hovercraft,ships,and Boats
16. Aircraft and Spacecraft
That should be enough to keep you busy. Once you have that under your belt or just for a fun check out ragdoll physics implementation. You can see an example in the WIP or Product Release boards tiltle monkey bowling. It was featured in the News article a little while back, and I know that it's been enhanced since.
If you just want a working physics system, check what the people above have posted.
~zen