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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:08:09+00:00 2026-05-23T12:08:09+00:00

This isn’t a classic programming language question, but it’s keeping me busy so I

  • 0

This isn’t a classic programming language question, but it’s keeping me busy so I figure I might as well tap in to the experience of Stack 🙂

I have a system that accepts measurement data from various sources. These data messages are put on a queue.
Now I need to build:

  1. A system to regularly read messages
    of that queue and persist the data
    within them to a database (probably
    a PHP script that is invoked by
    cron)
  2. A system to expose that data to external parties (implemented as an
    API/webservice)

However, the database scheme is bound to change, so I figure I’d try my hands at Doctrine to abstract that part.

Now, if I use two projects, I’ll have to use Doctrine in both, with them both having objects that reflect the same tables in the database below. So if the db changes, I need to change the model of two projects. That feels wrong.

I can use one project, with one ORM, so that if there are changes I only have to change one layer. However, then I have both a script using that model, and a webservice, all in the same ‘project’.

Thinking litteraly ‘projects’, as in Netbeans for example. I suppose I would make a ‘model’ folder with the Doctrine objects, a ‘script’ folder which is accessed by cron and an ‘api’ folder which is accessed by the webserver.

It feels weird that one project has different applications, but it also feels best to have only one ORM layer. What’s the decent thing to do?

  • 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-23T12:08:10+00:00Added an answer on May 23, 2026 at 12:08 pm

    I think you’re just thinking about it the wrong way when you think about it as two separate “projects”, although I see where you’re coming from. Your project is to import sensor data and provide an interface to receive that data, so it makes sense to have them under one “project”.

    As to the schema changing and using an ORM, I’d suggest checking out MongoDB (or another NoSQL DB, I’m biased towards Mongo because that’s what I know). You’ll still probably want to use something like Doctrine but because it’s inherently “schema-less” you can be a bit more flexible with what you put into it. I suggest still using Doctrine because that can be a liability as well as an asset if you don’t manage it well (ie, insert a date into an integer field and Mongo won’t care…)

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

Sidebar

Related Questions

I know this isn't strictly a programming question but y'all must have experienced this.
I know this isn't strictly speaking a programming question but something I always hear
This isn't really a programming question but more about programming and testing tools. Is
This isn't necessarily a programming question but i'm sure you folks know how to
This isn't a programming question but it's about the SDKs and the IDE. I've
This isn't necessarily a programming question, but I've hit a performance bottleneck with disk
This isn't a question but I thought I'd start a thread where links to
Hopefully this isn't a dupe of another question, but I couldn't see it anywhere
note: I'm working on wordpress but this isn't a wordpress question. I have a
I've seen the other posts, but can't seem to figure out why this isn't

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.