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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:02:28+00:00 2026-05-12T11:02:28+00:00

I’m currently working on a small webapp where I work. I’ve created this for

  • 0

I’m currently working on a small webapp where I work. I’ve created this for different departments. So, for example, let’s say that: Marketing, Human Resources, and Sales uses it.

Right now, as it stands, I have 3 completely different directories for each dept:

 http://mydomain.com/hr
 http://mydomain.com/marketing
 http://mydomain.com/sales

And each directory (department) has it’s own MySQL database, with it’s tables.

I have a few questions so that I can hopefully create this more efficiently:

1) Sometimes, I will have a user who will have access to two or more of the departments. For example, a user might have access to both HR and Marketing. I do not want to have this user create 2 different accounts. How can I “tie” this into one database?

2) Also, if I have a user who has access to both “areas”, what would be a good way to ‘direct’ that user to change between both departments?

3) Finally, regarding the different directories, is there a more efficient way to do this? Each directory is essentially the same exact code, just with minor changes.

This is something that I’ve never done, so some help on creating this the ‘right’ way would be great. Especially while it’s small, if I eventually expand this out to other departments.

Thanks!

  • 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-12T11:02:29+00:00Added an answer on May 12, 2026 at 11:02 am
    1. Your company, like every other probably has one place to store all of their employee information. You should apply the same principle on your web application, meaning you should have one central database for all employees with privilegies information so that you can define employee’s access to each department.

    2. If you apply the above principle (one database for all users containing privilegies information) it should be pretty easy to redirect users to other departments if that is what you’r asking here.

    3. You should split your project into smaller pieces so that you can identify the core part of your project and share that part among all departments. There are many ways to accomplish this but copy-pasting your code for every department is not efficient and it will get in your way later on. Even with three departments it is tedious to copy-paste changes to each one. Also note that if you use separate databases for departments you wont be able to share data among them (at least not in a nice, elegant way).

    What you should do is leave your programming language on side for a couple of hours/days and write some design documents about that project. It doesn’t have to be too detailed, just enough so you can see how modular it will be and what you can and shouldn’t do to make it more modular.

    With that said, you should wait for more answers as I’m not as professional as others on SO 🙂 And excuse my bad english.

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

Sidebar

Ask A Question

Stats

  • Questions 201k
  • Answers 201k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Adding overflow:hidden to the div should sort it out. Can't… May 12, 2026 at 8:08 pm
  • Editorial Team
    Editorial Team added an answer Adding will only work with random access iterators. std::advance will… May 12, 2026 at 8:08 pm
  • Editorial Team
    Editorial Team added an answer You cannot. The column order is just a "cosmetic" thing… May 12, 2026 at 8:08 pm

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
In order to apply a triggered animation to all ToolTip s in my app,
I have a French site that I want to parse, but am running into
I have text I am displaying in SIlverlight that is coming from a CMS

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.