340 pts.
 Question on Physical Files & Logical Files
Hi Group, I have a Physical file. I created a Logical file on it with a key field as Primary key. Later as per the new requirements i created a LF with composite key as primary key. Should i make any changes to the LF that was created earlier??

Software/Hardware used:
ASKED: March 8, 2011  8:28 AM
UPDATED: May 18, 2011  4:57 PM
  Help
 Approved Answer - Chosen by mvrkrishna (Question Asker)

was the second logical a replacement for the first (first: fld1 second: fld1, fld2, fld3) or was it an alternate lookup (first: fld1 second: fld2, fld3).

If an alternate, there is no need to make a change.

If a replacement, you could get rid of the first, or just recreate it with the composite key instead of adding the second logical.

You do not need to use all of the keys in a logical, as long as you are using the first x keys (if logical fas keys of fld1, fld2, fld3 you can also use that logical to search by just fld1 or just fld1, fld2 -- you cannot search just by fld2 or just fld3 or just fld2, fld3)

ANSWERED:  Mar 8, 2011  1:20 PM (GMT)  by mvrkrishna

 
Other Answers:

Are you still waiting for an answer on this or is your question resolved.

Last Wiki Answer Submitted:  May 18, 2011  4:57 pm  by  CharlieBrowne   32,905 pts.
Latest Answer Wiki Contributors:  CharlieBrowne   32,905 pts.
To see other answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Hi Bigcat,

Sorry for the confusion created by me. It was un-intentional.

Based on the first LF1 (fld1 Primary key) , I added few records.
Now I created a second LF2 with composite primary key(fld1 & fld2 are primary keys). I add records through LF2. There is a possibility that i violate the very definition of LF1. How to encounter this? As per my requirement I need both the Logical files. I cannot delete the LF1.

 340 pts.

 

You can keep LF1 for what it was created for and you can of course keep LF2 as well.
Furthermore you can use both in the same and/or different programs.

YuVa

 1,285 pts.

 

When you talk about “Primary Key” we can assume you”ve used the UNIQUE keyword when creating the first LF right?

If it’s true you can not violate the definition of the first LF. SO will not allow duplicate keys for the first LF no matter which file you use to add to (LF1, LF2 or direct to physical).

Wilson

 2,385 pts.