Member Tables and Relations
Link: https://support.brilliantdirectories.com/support/solutions/articles/5000690567
The Brilliant Directories database stores member information across multiple related tables. Each table is responsible for a specific type of data, allowing member records to be organized while maintaining relationships between associated information.
The following diagram illustrates the primary relationships between the member-related tables. For simplicity, only the most commonly referenced tables are shown.
(Existing relationship diagram)
Core Member Table
The users_data table serves as the primary table for member records. Each member is assigned a unique ID that is used to relate records across the database.
Additional member information is stored in related tables and linked using this member ID.
Some commonly related tables include:
| Table | Purpose |
|---|---|
users_photo | Stores member profile photos. |
users_portfolio | Stores portfolio items and member content. |
data_posts | Stores posts created through Membership Features. |
users_favorite | Stores member favorites. |
users_billing | Stores member billing information. |
users_meta | Stores custom fields and other dynamic data. |
Service and Category Relationships
Member professions and services are managed through relationship tables.
The rel_services table connects member records in the users_data table with the appropriate records in the list_professions and list_services tables. This relationship determines the professions and services assigned to each member.
Query Examples
Depending on the information being retrieved, different tables must be queried together.
Some common examples include:
| Objective | Related Tables |
|---|---|
| Retrieve members with profile photos | users_data, users_photo |
| Retrieve members with portfolio content or posts | users_data, users_portfolio, data_posts |
| Retrieve members by profession or service | users_data, rel_services, list_professions, list_services |
Understanding these relationships can help when creating custom SQL queries or integrating directly with the database.
