My name is Eric Lopez and I am the coordinator of the distance learning project at the University of El Salvador. We are currently implementing Moodle to serve our student body (40,000+ students). By the way, thank you for such an awesome tool, you and your team have all done a great job.
I am writing to you because I have a question, and before I continue let me say that I have searched the posting in the forums and couldnt really find what I was looking for, although this has been visited in the past by others. This is with regards to the design of the database and, more specifically, enforcing referential integrity.
We have decided to seek referential integrity in the design so that we can take advantage of the cascading update/delete. The original installation script does not create foreign keys on the tables (were using postgres7.4 on a Debian server). And so at this point I have modified the database to accommodate these two things.
Having done that, I have noticed that the original installation creates entries on some tables that help getting started with the home page and other pages in the site (i.e. the course table holds the name of the site installation). These entries do not follow referential integrity rules (i.e. the first entry on the course table has a category value of 0, which does not exist on the category table). The problem propagates to the code in that the get_site() function relies on that entry having category equals 0.
I am sure this is just the tip of the iceberg. And basically dont want to have to go through this if someone has/is already doing it. Is there any one working on this yet?
Thanks a lot for your time, and thanks again for such an awesome tool.