Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3952140
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:48:54+00:00 2026-05-20T01:48:54+00:00

I have following table structure: CREATE TABLE pilot_groups ( id INT PK, name VARCHAR(50),

  • 0

I have following table structure:

CREATE TABLE pilot_groups (
id INT PK,
name VARCHAR(50),
....
);

CREATE TABLE pilot_group_leaders (
id INT PK,
pilot_group_id INT FK,
name VARCHAR(50),
address TEXT,
....
);

CREATE TABLE members (
id INT PK,
pilot_group_leader_id INT FK,
country_id INT FK,
type VARCHAR(50),
name VARCHAR(50),
....
);

CREATE TABLE farms (
id INT PK,
member_id INT FK,
....
);

So I have to produce a report and show all farms grouped by pilot_group. To do it using current structure I’ll have to do 3 joins which in my opinion is not very optimized and efficient. I was thinking of placing extra foreign key in the farms table but thus I’ll have repetition. The purpose of the website/application would be mainly for producing reports and entering data. Which approach might be better?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T01:48:55+00:00Added an answer on May 20, 2026 at 1:48 am

    Stick with your current version, dont duplicate the foreign keys.

    You should be able to get away with some indexes on the tables.

    Dont fix it if it aint broke. Do you actually have performance issues, or are you anticipating them?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following table structure CREATE TABLE `table` ( `id` int(11) NOT NULL
I have the following table structure: CREATE TABLE [Report].[MesReport]( [MesReportID] [int] IDENTITY(1,1) NOT NULL,
I have the following table structure in my database: create table Encargado( ID int
I'm using EF v1. I have following tables: CREATE TABLE category ( category_id int
I have a database with the following structure: CREATE TABLE entity ( id SERIAL,
I am using MySQL 5.0. I have table with following structure and data. CREATE
I have following table structure: Table: Plant PlantID: Primary Key PlantName: String Table: Party
I have already googled for this I have a Table with following structure in
I have a table with a structure like the following: LocationID AccountNumber long-guid-here 12345
I have the following table schema; CREATE TABLE `db1`.`sms_queue` ( `Id` INTEGER UNSIGNED NOT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.