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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:20:17+00:00 2026-05-11T21:20:17+00:00

I would like the users be able to create their accounts (which stores the

  • 0

I would like the users be able to create their accounts (which stores the login and password information – Accounts table) and once the email is verified, they have the option of creating their own person record (which stores the other information such as first name, … – People table). I also want the users (Account holders) be able to create person records other than themself. So when creating their own person record, users have the option of accepting a person record that was created by someone else instead of creating on their own or even be able to download a profile from other social networking sites and create the person record.

Each of these account holders also have several messages from other users and other social networking contents like blogs, … My question is whether to associate these messages, blogs, employments,… to the account_id or person_id?

=================================================================================
UPDATE:
Alright, I guess I was not very creative in crafting my question. In a simple app, I could create just on USERS table and store all the login info as well as the user info such as first_name, … and associate the messages, and other stuff with the user_id.

But as I want the users be able to create many Person records (not only for themself as well as others, which may include info about the users that have not yet created their accounts) I am thinking of separating the login info into ACCOUNTS table (or call it USERS table) and profile info into PEOPLE table. Each account holder will have only one Person record (their own and this is the info that identifies them to the world, as login info is just for system authentication only). Lets say YOU have created an account as well as your person record, and saw person Bill Gates and wanted to send message to him, we have two scenarios:
(1) Bill Gates person record is not claimed by any account holder as their own person
(2) Bill Gates person record has an associated account holder
In scenario (1) the system won’t even let you send a message as there is no account holder that could check the messages and in scenario (2) should I save the BillGates person_id in the receivers_id of the MESSAGES table or BillGates.account.id ?
Same applies to all the other content types, like blogs, photos, …

Lets see, if I can put together the table relationships:

ACCOUNTS
id
login
password
person_id (account holders personal record)

PEOPLE
id
first_name
....
creater_id (current_account().person.id or just the current_account().id ?)
updater_id (current_account().person.id or just the current_account().id ?)

MESSAGES
sender_id (current_account().person.id or just the current_account().id ?)
receiver_id (person.id or person.account.id ?)
subject
body

BLOGS
id
title
body
author_id (current_account().person.id or just the current_account().id ?)

I hope I made my point. If not let me know, I will try to think of some other examples.

  • 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-11T21:20:17+00:00Added an answer on May 11, 2026 at 9:20 pm

    If there is always exactly one person associated with one account_holder, then they in a sense describe the same thing, and thus it doesn’t matter where you put the blog, messages, etc. In this case, I would go with what ever is the most intuitive since it doesn’t matter structurally, which would probably mean to put it in the Person table.

    On the other hand, if you’re suggesting more than one person can be associated with an account, or that you want people to somehow be able to have blogs, messages, etc. even without an associated account, then obviously those things have to be housed in the Person table.

    Edit: It’s very important to put an individual unique constraint on the foreign key (no matter which table you end up putting it in). Otherwise, your one-to-one association can easily become a one-to-many by accident if a careless user enters, for instance, a new account_holder row and gives it the same “ownerID” as a previous account_holder. In this case, the ownerID is a foreign key from the Person table and needs the unique constraint.

    Edit #2: Looking over your question clarification, I see no reason not to have a single “USERS” table. Simply have a boolean “acitivated” attribute that means this person has an active account with valid login credentials. When a person creates an account but hasn’t entered in any personal information, “activated” will be true but the personal information fields will remain NULL. And if that user creates other people’s profiles, new rows will be inserted in USERS containing all their personal information but the “username” and “password” fields will be NULL and “activated” will be false. Wouldn’t this be the most seamless and simple? User and account_holder are the same thing (which is why you were getting a one-to-one association), so why not leave it all in one table?

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

Sidebar

Ask A Question

Stats

  • Questions 120k
  • Answers 121k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

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

    • 7 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Here is a unit I just knocked together for you.… May 12, 2026 at 12:17 am
  • Editorial Team
    Editorial Team added an answer The only way to communicate with other Bluetooth devices via… May 12, 2026 at 12:17 am
  • Editorial Team
    Editorial Team added an answer Try: function escCtrlChars($str) { return preg_replace('/([\0\t\n\v\f\r\'\"!-])/ie', '"!".ord(substr("$1",0,1))."!"', $str); } The… May 12, 2026 at 12:17 am

Related Questions

Part 1 I want to build a PHP Zend Framework application that users can
I'm building an iPhone application that talks to a Ruby on Rails backend. The
I am thinking of implementing an easy Instant Messaging server in Java, but I
I'm building an app with a calendar element to it. I'm considering building this

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.