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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:40:08+00:00 2026-06-14T22:40:08+00:00

I have a DB schema from The Data Model Resource Book, Vol. 1 .

  • 0

I have a DB schema from The Data Model Resource Book, Vol. 1. In it is a table like this:

CREATE TABLE [dbo].[AccountingPeriod](
  [AccountingPeriodID] [int] NOT NULL,
  [RoleTypeID] [int] NOT NULL,
  [PeriodTypeID] [int] NOT NULL,
  [AcctgPeriodNum] [int] NOT NULL,
  [FromDate] [smalldatetime] NOT NULL,
  [ThruDate] [smalldatetime] NOT NULL,
  [PartyID] [int] NOT NULL,
PRIMARY KEY CLUSTERED (
  [AccountingPeriodID] ASC)

With a constraint defined as:

ALTER TABLE [dbo].[AccountingPeriod]  WITH CHECK ADD FOREIGN KEY([AccountingPeriodID])
REFERENCES [dbo].[AccountingPeriod] ([AccountingPeriodID])

The AccountingPeriodID column has a self referencing foreign key that the text claims is a recursive reference column but I think it’s an error. I think I need another column to properly store recursive references in this table. Can the author’s method be implemented with the table definition supplied, why?

  • 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-06-14T22:40:10+00:00Added an answer on June 14, 2026 at 10:40 pm

    Yes, You need another column which will reference the primary key column of the table itself, for self referencing a table. Self referencing column really does not make any sense.

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

Sidebar

Related Questions

I have a table which have schema like this id name 1 jack 2
I have a schema design that looks like this: Table: User Row Column Family
I have never designed a database/data-model/schema from scratch, especially for a web-application. In some
I have a model that looks like this: class Pdf extends \lithium\data\Model { protected
I have 2 Schema and 3 generic users to access the data from my
I have this schema which I need to match 2 rows from user_data :
I have a schema like this <h1> 5/2009 <br/> Question: This is the question
I have Entity Data Model using ADO.NET Entity Data Model (using auto generate from
I have problem with save data from choices widget. Here is part of schema:
I have an XSD which was transformed from a RELAX NG schema with a

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.