Server and Database Overview


Table of Contents   Previous Page  Next Page    

This topic is designed to provide an informational overview of the entire database system that is MemberTies. You don't absolutely have to understand everything to this level of detail in order to user the system, but we wanted to provide the information in case you were interested.

It's easy to think of MemberTies as just a single piece of software -- that what you see on screen when you're entering members is all there is -- but that isn't the whole picture.  The following diagram illustrates the three major components of the system: the Server, the Databases, and the Application.  The typical corresponding folder structure is also shown for reference.

 

Note: The above directory structure applies to a default installation on Windows Vista and newer. On older operating systems such as Windows XP the ProgramData\MemberTies location was a much longer folder structure: "Documents and Settings\All Users\Application Data\MemberTies"

What it all Means

A simple way to understand the relationship between the database, the server, and MemberTies is to think of it like a bank. Think of your database as the bank vault. Your data is like money in that vault.  When you want to put money into the vault you have to request the services of an employee at the bank.  That employee is the server -- moving money (data) back and forth between you (MemberTies) and the vault (the database).

The Server

It is a common misconception that any reference to a "server" is always a reference to something on the Internet.  That can be true at times, but often a server is nothing more than another small program that runs on your computer. With MemberTies, that is also the case; the server is the program that lets MemberTies move data in and out of your database.

The server program files reside in a "Server" folder, located in the folder where MemberTies is installed.  The location is typically, c:/program files/MemberTies/server/.  Inside that folder are various other folders containing the files required to start and run the server. You shouldn't ever have to touch anything in these folders. In fact, doing so could actually prevent the server from starting at all, thereby preventing access to any database.

The server has several important jobs to do:

Track all databases.
Track all connections to the databases.
Manage the flow of data between MemberTies and the appropriate database, and maintain all the tables in the database as they change with the data.

As you can see, the server can be very busy. Every time the application wants to view or update information in the database, (for example, when you open a membership record), the server has to receive the requests for data, open the appropriate table(s), get the data, and send it back to the application so it can be formatted for display. When you run a query for 1,000 records, the server has seen them all before they ever appear on the screen.

Note that you won't see a special window on-screen when the server is running. The server is a program that runs invisibly in the background, content to simply manage the flow of data between the database and the application.  You can tell it is "out there" if you open the Windows Task List (typically by pressing CTRL+ALT+DEL) and look for a process called "mtmysqld.exe".  The server program takes up very little memory, and will continue to run even after you shut down MemberTies. This is done so the next time you start MemberTies it will be faster, because it won't have to bother starting the server again.  When MemberTies isn't running, the server will be content to just sleep and do nothing. If you need to check the status of the server, or shut it down manually for some reason, a special Server Utility is installed and available for this purpose.

The Database

The database is not a single file. instead, each database is comprised of a large number of files within a single folder bearing the database name.  The database folders are located, appropriately enough, in a "database" folder in a special folder in Windows where applications are allowed to make changes, namely, ProgramData. This location is typically, c:/ProgramData/MemberTies/database/(database name)/. There are lots of files inside that folder, representing the various tables within the database.

Important: These files should ONLY be managed by the server! Opening a file using a text editor or word processor can corrupt the file, causing all of the data to be lost.  It is impossible to edit data by modifying these files directly! If you run an antivirus program on the computer that hosts the server, it is a very good idea to make sure it excludes checking on everything in the database folder. The files there are non-executable text files anyway, so they are not virus threats.

MemberTies enables you to have any number of databases, each of which will have its own folder under the Database folder. The system keeps track of the "friendly" database name, and the license in use for it, and other details in a special file called mtdb.xml. This file is updated when you specify your license information or work with database profiles in the application.

The Server also maintains a single small database of its own.  This database is called "mysql" and it is used by the server track permissions, connections, and other internal settings.  This means that you will always have at least two databases: your own, and the server's "mysql" database.  In the example above, there are two user defined databases ("ski_club" and "speech_club") in addition to the server's database.

Also in the MemberTies folder are sub-folders called Temp and Logs.  The Temp folder is used as a place to create and delete files that are only used for a short while as the server goes about its business. These might be temporarily created image files, tracking files, documents in progress prior to saving, etc.  The Logs folder contains all of the logs that are generated within MemberTies. These include email logs, backup logs, etc.

The Application

The application is what you probably think of as MemberTies itself.  It's the collection of windows, menus, buttons, reports, etc., that you use to view and manage all of your data. Essentially, the application is what simplifies the process of working with a complicated database on a day to day basis. Imagine if you had to type out complicated commands for every record you wanted to see, and then more commands to change the data, and still more commands to see the results again.  It's much more convenient type data in fields and click OK to save and redisplay!

When you start MemberTies, the first thing it does is make sure that the server has been started.  Then, when you enter your username, password, and database choice on the Login window, the application forwards those selections on to the server. The server looks at your selections and verifies that, 1) there really is a user with the name you entered, 2) that the user by that name is allowed to login to the database you specified, and 3) that the password you provided is correct. If anything isn't correct, the server responds with an error, which the application then displays for you to see.