Newbie question regarding table design

  • Thread starter Thread starter kbhat
  • Start date Start date
K

kbhat

When I try to do an "abstraction based" design of my table, I have two
columns. However, the value of column 2 is directly related to the
value of column 1. I have two questions. The first question is
general, and the second question is specific to MS-Access.

1) Should I use two columns, or should I use only one column and
derive the value in the second column?

2) Is there a way in MS-Access to force entries in one column of the
table to be linearly related to another column of the table? (e.g.
Col_2 = Col_1 + 15 or Col_2 = 2*Col_1)

Thanks,
Bhat
 
Answers in line:

When I try to do an "abstraction based" design of my table, I have two
columns. However, the value of column 2 is directly related to the
value of column 1. I have two questions. The first question is
general, and the second question is specific to MS-Access.

1) Should I use two columns, or should I use only one column and
derive the value in the second column?

Normalized data requires the use of 1 column. Data in the second can easily
be recalculated.
2) Is there a way in MS-Access to force entries in one column of the
table to be linearly related to another column of the table? (e.g.
Col_2 = Col_1 + 15 or Col_2 = 2*Col_1)

See answer 1. But to answer your question, yes. but not directly in tables,
since Access is a file server database and doesn't have any triggers. To do
this, you would use a form and VBA code to calculate the second column's
data.

If Len([Col] & vbNullString) > 1 Then
[Col2] = [Col1] + 15
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top