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 8076019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:10:32+00:00 2026-06-05T15:10:32+00:00

Lets say I have five tables named table1, table2 … table5. I have already

  • 0

Lets say I have five tables named table1, table2 … table5.
I have already made a view/query named query1 by joining table1, 2 and 3.

Now, I want to create a view which requires joining all the five tables. My question is, is it good to use query1 and just join table4 and table5 into it, or is it better to join the five tables one by one?

Im afraid that if I join two views, or a view and table/s, then modifying that same view requires me to reconstruct the whole query becauses of being dependent to that view.

  • 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-06-05T15:10:33+00:00Added an answer on June 5, 2026 at 3:10 pm

    If you do not want your queries to be dependent on a view, then you must ask yourself, why you are creating that view in the first place.

    If your 5-table query joins table1, table2 and table3 in a way that merely happens to be identical to how the same tables are joined in the query1 view but in actual fact has a completely different meaning, then, in my opinion, it would be perfectly fine not to use query1 in your second view/query.

    But if your second view/query is going to reproduce the same business rules that are already implemented in query1, then I can see absolutely no point in duplicating the code. That’s partly the point of a view: by creating it, you can avoid repeating the same code if it needs to be used many times. When you alter query1, it would make sense for other dependent queries and/or views to alter their output accordingly.

    Of course, sometimes changes in a view require changes in other queries and/or views that use it. If that’s what you are concerned most about at the moment, then I suggest you invest your time into planning your views properly to reduce the possibility of such changes after your database has been in use for a long time.

    So, basically, your choice is either to duplicate logic in every view to avoid their being dependent upon one another, or use your views actively as necessary but risk coming across a situation where you have to make a chain of changes merely because one particular view needs to be changed. But, again, as I said earlier, you can minimise that risk if you properly design your views beforehand.

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

Sidebar

Related Questions

I have 5 pages - for ease lets say: one.html two.html three.html four.html five.html
lets say I have a list like so: ['one','two','three','four','five','six','seven','eight','nine'] and I want to experiment
Lets say have this immutable record type: public class Record { public Record(int x,
Lets say I have this code: <?php class hello { var $greeting = hello;
Lets say I have a loop in Bash: for foo in `some-command` do do-something
Lets say I have multiple DataGrids throughout my winform app and I want to
Lets say we have an average of one page fault every 20,000,000 instructions, a
Lets say I have a table with columns such as: ID Name City State
Lets say I have hierarchy like this (This is just a test program. Please
Lets say I have model inheritance set up in the way defined below. class

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.