Forum OpenACS Q&A: Response to DATA MODELS in the Design document

Collapse
Posted by Roberto Mello on
Ayman,

Please refrain from using fully capitalized words. They are just plain ugly and frowned upon on e-mail communication, since they mean that you are screaming.

The documentation you should read is the OpenACS Developer's Guide (http://dev.openacs.org/doc/dev-guide.html), more especifically "OpenACS 4.5 Data Models and the Object System" (http://dev.openacs.org/doc/objects.html).

Quoting from that chapter in the documentation: "Developing data models in OpenACS 4.5 is much like developing data models for OpenACS 3, save for the implementation. As usual, you need to examine how to model the information that the application must store and manipulate, and define a suitable set of SQL tables."

Teaching how to model data in a relational database should be addressed in more detail in the documentation (I'll personally tackle this) with links to more appropriate sources of information, but it's beyond the scope of the OpenACS documentation.

There are several books on data modeling out there. I'd suggest you start with "An Introduction to Database Systems" by C.J. Date. Date's book is very good.

Then you should learn some SQL. Most SQL books are way lengthier than they should be. I like Philip Greenspun's "SQL For Web Nerds" (http://philip.greenspun.com/sql/). This will give you a good introduction to SQL.

The OpenACS has thousands of lines of SQL code that you can look at to learn more. After you feel pretty confident about your SQL skills, you should read "SQL For Smarties" by Joe Celko. Excellent book.

Most people wanting to "learn databases" think that they should get straight into SQL (bypassing the learning the relational model and some of its theory - C.J. Date's book) . This is a serious mistake IMHO, and leads to the aberrations that you so often see around in database applications and also explains why so many people think MySQL is better than real relational databases.