<< Click to Display Table of Contents >> Navigation: »No topics above this level« Server and Database Overview |
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 use 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 data 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.
It is a common misconception that any reference to a "server" is always a reference to something on the Internet or to a whole other computer somewhere. 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
•Listen for and 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 request 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 Manager 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, you would use the Server Utility, a separate program installed and available for this purpose.
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.
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 (the profile name), and other details in a special file called Enter value. This file is updated when you create or modify database profiles, and is primarily used on the Login window to load the database list.
The Server also maintains a couple of small databases of its own. One is called "mysql" and it is used by the server track permissions, connections, and other internal settings. The other is called "performance_schema", and it is used to help the database run efficiently. This means that you will always have at least three databases: your own, and the server's two databases.
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.
Database 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 anti-virus 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. Most importantly, if your anti-virus software watches and scans every file in "real time" as it opens and closes, that could mean it is constantly scanning every database file as they open and close. That can dramatically hurt system performance.
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 a button to save!
When you start MemberTies, the first thing it does is make sure that the server has been started. Then, when you enter user name, password, and database choices on the Login window, the application forwards those selections on to the server. The server verifies that, 1) there really is a user with the name you entered, 2) that the user by that name is allowed to log in to the database you specified, and 3) that the password is correct. If anything isn't right, the server responds with an error, which the application then displays for you to see.