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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:03:46+00:00 2026-05-26T17:03:46+00:00

Got three entities – User – Has username/password, contact information, billing information etc. Periodical

  • 0

Got three entities –

  1. User – Has username/password, contact information, billing information etc.
  2. Periodical – Has periodical_name, category, publisher_info, print_cycle, unit_price etc.
  3. Subscription – Has the user-id, periodical-id, subscription start/end date, status etc.

And following relationships –

  • User can have Subscription for multiple Periodicals.
  • Subscription belongs-to a User, and has-a Periodical associated.
  • Periodical has-many Subscriptions associated with it.

s.t.,

  • User–Subscription relation is One-to-Many,
  • Periodical–Subscription relation is One-to-Many,

My questions —

  1. Is this model description correct for the real-world relationships typically found ?

  2. Or, am I better off, collapsing Periodical into Subscription, especially if per Periodical information is not extensive and can be encoded into, say a delimiter separate text field (e.g. “PeriodicalName:Frequency:Publisher:UnitPrice”) ?

  3. Can I say that via associativity User–Periodical relation is Many-to-Many ?

  4. Would appreciate if someone can show how I could put a constraint around either User or Subscription table (assuming that I don’t collapse Subscription & Periodical), s.t. when a User needs to be removed for some reason, all associated Subscriptions are deleted too.

  5. Would like to keep a User record around for sometime (say a year), even after all Subscriptions have expired, so I guess I can assign NULL to the FK subscription_id in User table, right ? This is when no corresponding record exists in Subscription table.

  • 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-26T17:03:47+00:00Added an answer on May 26, 2026 at 5:03 pm
    1. Yes.

    2. You are describing “denormalization” which may under rare circumstances be useful but it’s a violation of relational design.

    3. yes.

    4. This type of constraint (1-to-1) is not implemented declaratively in most RDBMS products. Instead we have 1-to-zero-or-one. You can do it with triggers but it’s tricky and subtle. Google for Object-Role Modeling which is a more comprehensive modeling technique that addresses stuff like this (and “either-or” and “at least 2” and many others.)

    5. That would be the standard way to handle it. You could also leave the subscription with an expiration date. But the 1-to-zero-or-one deficiency nicely facilitates your suggestion.

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

Sidebar

Related Questions

I've got three entities in my application so far: tag, feed and story A
So I've got three models in my app, a User, Review and a Movie
Say I've got two simple entities: User and Review. How bad is it if
I'm working with Core Data and got two entities (Account, Contact) where one account
So I've got some data. There are entities. Entities have an arbitrary number of
I've got three files on AIX that I need to import into a SQL
I've got three boolean values A, B and C. I need to write an
I've got three columns inside of a div that is the full page width.
I've got three different apps, all in GWT, none using Spring. Today, all of
I've got three models. Sales, items, and images. I'd like to validate that when

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.