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

  • SEARCH
  • Home
  • 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 588943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:22:19+00:00 2026-05-13T15:22:19+00:00

i dont quite understand this pattern. from what i have read, it looks like

  • 0

i dont quite understand this pattern.

from what i have read, it looks like one model = one table (if you are using database to store data).

so if i’ve got a table called tags, i should have a tags model. and with a threads table i create a threads model.

then i got a tags controller and a threads controller right?

so what if i’ve got a tags_threads_map table for a many-to-many relationship.

should i have a tags_threads_map model eg. in which i get all threads containing a tag? should i have a tags_threads_map controller too?

would be great if someone could explain or give me a good breif tutorial on this.

the most tutorials just give a simple 1:1:1 example.

  • 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-13T15:22:19+00:00Added an answer on May 13, 2026 at 3:22 pm

    To fully understand MVC or any software design pattern, you really need to have a go at implementing it and see what your results are.

    That said, MVC does not prescribe that one model = one table. In fact, a model could be backed by a number of tables, or even data originating in something other than a relational database (e.g. a web service, flat files, a key-value store or a graph database for example).

    I would suggest that creating models and views that represent meaningful aggregates of related tables is probably a good approach. For example, to use the timeworn example of an Order and OrderLine table, an Order model might encapsulate operations on data that will ultiamtely end up in either the Order table or the OrderLine table.

    Adhering to strict 1-to-1 mapping of table to Model, View and Controller will only result in an explosion of classes, some of which may not be doing much individually. Better to build Models and Controllers that are more focused on achieving some task identified by the business requirements, rather than just being a projection of the data model.

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

Sidebar

Related Questions

Im using Doctrine and i dont quite understand this code here: $this->hasColumn('id', 'integer', 8,
I have a function that I dont quite understand There are 109 addresses from
Have a look a this simple example. I don't quite understand why o1 prints
I have heard/read the term but don't quite understand what it means. When should
Trying to load test a site using a tool i dont quite understand against
I have a piece of code I dont quite understand. Its causing a bug.
I came across this JavaScript function and I don't understand quite what it's doing,
I have issues with NSUserDefaults and I don't quite understand what is going on.
i found this code but do not quite understand what the command is doing.
I recently read about Dynamic Creation as one of the design pattern in Cocoa.

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.