RE: Church Database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> The church has about 2000 members. The groups can range in 
> membership from
> as few as 5 to as many as 300.
> 
> I'm a novice programmer and was looking into using MySQL and PHP to
> implement the system.
> 
> Am I on the right track?
> Any thoughts or suggestions?
> Me being a beginner am I going to eat up to much time on my 
> learning curve?
> Would I be better off paying someone to do this?
> Project wise is this a small, medium, or large undertaking.

No actually this is a great beginner project because it's not too
difficult.

First thing you want to consider is your database structure.  Sounds
like you have members, groups, and dates of attendance.   I'm not a DBA
or expert databse programmer, but this is how I'd organize things.

(use your preferred naming convention.. For instance, I'd called the
Memberships something like "xrefUsersGroups")

Table 1:  Users
   This contains all your user information. The first column in most
database tables (there are exceptions) should always be a primary key
that's automatically incremented each time a record is added.  This
creates a unique identifier for each record.  I forget what they call it
in MySQL, maybe AutoNumber (on an INT or INTEGER data type).  In MS SQL
Server they call it "identity".
   Columns recommended:
      UsersID
      Name
      Address
      Phone
      etc...

Table 2: Groups
  This is where you hold some basic (or detailed) information about the
groups that meet.  Same deal with the identity/autonumber column
   Columns recommended:
     GroupsID
     GroupName
     GroupLeader
     MeetingLocation (might be another ID field that points to a
locations table.. Or locatio may be stored on a date by date basis if it
is possible that it moves)

Table 3: Memberships
  This is a cross ref table that you store the identity/autonum values
for a user and a single group that they below to.  There will be
multiple entries if a user is in multiple groups.  This probably only
needs to consist of 3 columns:  ID (identity/autonum), UserID, GroupID
   Columns recommended:
      MembershipsID
      UsersID
      GroupsID

Table 4: Attendance
  After your identity/autonumber ID field, you'd want a date, groupid
and userid.  You could have other info too like Topic of the meeting or
guest speaker info or whatever.  If you get too much info, you might
want to store it in another table with a link back to the identity
column of this table
   Columsn Recommended:
     AttendanceID
     Date
     UsersID
     GroupsID



Depending on how anal you are about normalization, you might have an
xref table that links groups and users with attendance and only have
meeting date and location (and other such unique data) in the Attendance
or maybe a "Meetings" table.



>From there, you just need to learn how to do some SQL to join the tables
in order to retrieve the data.

The other things on your task list would be:

1. Create an interface
2. Learn how to insert data into the database (keeping all the tables
straight)
3. Probably learn how to import an existing list of your 2000 members
into the database to save you some typing
4. Create reports based on the data you pull showing "last attended this
group" for each user and flag it if it's over a certain amount of time.


You'll find some good guideance on these groups (you might check out the
PHP DB one for the database questions, but I'm sure someone on here
could help as well).

Anyway, hope that gives you an idea of what you're getting into.   It's
really not all that bad, but it'll be a challenge for a newbie :)    A
good challenge though, not one of those TOO frustrating ones.. Heh

Good luck!

-TG

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux