-1

I am new in database and ms access.I am developing a database of income tax return form submitted by several taxpayers. Where each tax payer has an unique ID called ETIN (electronic taxpayer identification number). so the database I am trying to develop contains more or less the following fields:

1.ETIN,2.Name.3.Father Name 4.Address 5.Gender 6. Assessment year 7.Shown income in return form 8.expense related to lifestyle 9.accretion of wealth

e.g.726226628279,Adam Smith,Joan Smith,3/4 jackson street,Male,2018-2019,2300000,800000,1500000

Now the problem is I cannot set ETIN (which is 12 digit unique numbers) as a primary key since after one year for a single ETIN there will be more than one entry for each assessment year and this will be duplicated triplicate quadruplicate and so on ..for the in coming years.

Now can any one guide me how to develop this simple database?

1 Answer 1

1

I cannot set ETIN (which is 12 digit unique numbers) as a primary key since after one year for a single ETIN there will be more than one entry for each assessment year

Is almost the answer.ETIN itself is not unique, but the combination of ETINand year is

That leads to a unique primary-key-in-access-.

For simplicity I always create anÌDField with AutoNumber as Primary Key (ETIN/Year get an unique composite index, to ensure uniqueness). That makes Foreign Keys easier and the overhead is negligible.

2
  • Yes combination of ETIN and assessment year make an unique key! But I take input of ETIN and assessment from two different textbox in the form. Another problem with ID(auto number) is it irrelevantly increases meaning there not exactly the ID as the entry in the table!!
    – Learner
    Mar 16, 2019 at 4:02
  • If you try to insert a duplicate unique index, an error is raised and insert fails, Don't worry! The id is complete meaningless except as a row identifier. If it is not consecutive, that doesn'T matter. It just has to be unique. Mar 16, 2019 at 4:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.