About Duplicate entries

Hi experts,
In internal table i have many account numbers.
There are some duplicate entries. i have removed all the duplicates using the following code.
but i cannot remove all the duplicate entries.
certain scenarios i should have duplicate elements also in my output.
certain scenario i should remove the duplicates.
is there any way to remove few duplicate entries from internal table.
your furthur clarification i will send the code also.
DELETE ADJACENT DUPLICATES FROM itab_temp COMPARING RI_ACCT_NO .
  LOOP AT ITAB_temp.
  LOOP AT ITAB WHERE RI_ACCT_NO = ITAB_TEMP-RI_ACCT_NO.
    SUM_BETRH = SUM_BETRH + itab-BETRH.
    SUM_BETRW = SUM_BETRW + itab-BETRW.
ENDLOOP.
    ITAB_ALS = ITAB.
    ITAB_ALS-BETRH = SUM_BETRH.
    ITAB_ALS-BETRW = SUM_BETRW.
      APPEND ITAB_ALS.
    CLEAR: SUM_BETRH, SUM_BETRW, ITAB_ALS.
  ENDLOOP.
if u know pls send me documents to
[email protected]
its very urgent.
Thank you in advance.
Jeyanthi

Hi
You have add the following statement before the delete duplicate statement
SORT itab_temp BY RI_ACCT_NO.
DELETE ADJACENT DUPLICATES FROM itab_temp COMPARING RI_ACCT_NO .
I think now it will work. Otherwise some problem internal table fields.
Moreover this code not efficient.  You are using nested loops, it is performance killer.  Instead you can use for all entries.  Already u have data in ITAB_TEMP.
Select f1 f2... from XTABLE into table ITAB for all entries in ITAB_TEMP where RI_ACCT_NO = ITAB_TEMP-RI_ACCT_NO .
then u can add addition logic by using one loop and endloop.
Reward me if it is useful

Similar Messages

  • SPWebConfigModifications Duplicate entries, applying to all Web Applications and not removing entries

    Hi,
    Hopefully someone can offer some advice, I may be missing something obvious here.
    I'm currently trying to write a feature event receiver to apply web.config modifications that are required by a recent project. 
    The feature is web application scoped & it doesn't activate by default on deployment, currently testing with a very small addition isn't working at all, I've followed numerous posts about duplicate entries & items being removed, none of which have
    helped.
    Here is my code;
    public override void FeatureActivated(SPFeatureReceiverProperties properties)
                SPWebApplication webApp = properties.Feature.Parent as SPWebApplication;
                    SPWebConfigModification Modification = new SPWebConfigModification();
                    Modification.Owner = "ConfigUpdater";
                    Modification.Path = "configuration/appSettings";
                    Modification.Name = "add[@key='Test']";
                    Modification.Sequence = 0;
                    Modification.Value = "<add key='Test' value='Server=TestServer;Database=TestDB;Trusted_Connection=True;' />";
                    Modification.Type = SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode;
                    if (!webApp.WebConfigModifications.Contains(Modification))
                        webApp.WebConfigModifications.Add(Modification);
                        webApp.Update();
                        webApp.WebService.ApplyWebConfigModifications();
            // Uncomment the method below to handle the event raised before a feature is deactivated.
            public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
                SPWebApplication webApp = properties.Feature.Parent as SPWebApplication;
                Collection<SPWebConfigModification> modsCollection = webApp.WebConfigModifications;
                int count = modsCollection.Count;
                for (int i = count - 1; i >= 0; i--)
                    SPWebConfigModification mod = modsCollection[i];
                    if (mod.Owner == "ConfigUpdater")
                        modsCollection.Remove(mod);                   
                webApp.Update();
                webApp.WebService.ApplyWebConfigModifications();          
    Upon activation on 1 web app, the entry gets added twice to the web.config of every web application in the farm & upon deactivation the entries remain in the web.config files.
    On activation, after this line, webApp.WebConfigModifications.Add(Modification); the webApp is updated to include the entry & only once, however 2 entries for it appear in the web.config files & as mentioned for every web application.
    On deactivation, after updating the web app, the modification is removed, however it remains in the web.config files.
    I'm wondering if the code actually works, as I can't see anything wrong & if there is some caching occurring somewhere which is applying the extra line/s upon calling ApplyWebConfigModifications.
    Any help on this would be much appreciated.
    Thanks,
    James

    Hi James,
    Per my understanding, there is an entry gets added twice to the web.config file of every web application in the FeatureActivated event.
    As a common practice, I suggest you debug your code to see how it works during the process, it will provide more information for a better troubleshooting.
    Also, you can test the code in a Console Application to see if it will work as expected.
    Thanks         
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • XML Bursting duplicate entry Problem

    Hi,
    I have added XML bursting concept to one of my program. When I run my main program some times XML Publisher Report Bursting Program giving following error.
    duplicate entry: /Filename_14:00:41.pdf
    java.util.zip.ZipException: duplicate entry: /Filename_14:00:41.pdf
         at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:186)
         at oracle.apps.xdo.oa.cp.JCP4XDOBurstingEngine.zipOutputFiles(JCP4XDOBurstingEngine.java:504)
         at oracle.apps.xdo.oa.cp.JCP4XDOBurstingEngine.runProgram(JCP4XDOBurstingEngine.java:275)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    Could you give me any Idea about this error?. Please help me in this.
    Thanks in advance

    Hi,
    I'm also getting this error, but my filenames are unique already. I tried with Bursting Designer, and it created the separate files.
    Any ideas?
    logfile:
    XML Publisher: Version : 12.0.0
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    XDOBURSTREP module: XML Publisher Report Bursting Program
    ++---------------------------------------------------------------------------++
    Current system time is 25-NOV-2009 09:45:46
    ++---------------------------------------------------------------------------++
    XML/BI Publisher Version : 5.6.3
    Request ID: 68702228
    All Parameters: Dummy for Data Security=Y:ReportRequestID=68702207:DebugFlag=Y
    Report Req ID: 68702207
    Debug Flag: Y
    Updating request description
    Updated description
    Retrieving XML request information
    Node Name:PRIMO2
    Preparing parameters
    null output =/opt/apps/ebs/conc/out/o68702228.out
    inputfilename =/opt/apps/ebs/conc/out/o68702207.out
    Data XML File:/opt/apps/ebs/conc/out/o68702207.out
    Set Bursting parameters..
    Temp. Directory:/opt/apps/ebs/apps/apps_st/comn/temp
    +[112509_094600328][][STATEMENT] Oracle XML Parser version ::: Oracle XML Developers Kit 10.1.3.130 - Production+
    +[112509_094600331][][STATEMENT] setOAProperties called..+
    Bursting propertes.....
    +{user-variable:cp:territory=US, user-variable:cp:ReportRequestID=68702207, user-variable:cp:language=en, user-variable:cp:responsibility=20678, user-variable.OA_MEDIA=http://primo-app.natinst.com:8000/OA_MEDIA, burstng-source=EBS, user-variable:cp:DebugFlag=Y, user-variable:cp:parent_request_id=68702207, user-variable:cp:locale=en-US, user-variable:cp:user=A2MESZAR, user-variable:cp:application_short_name=XDO, user-variable:cp:request_id=68702228, user-variable:cp:org_id=5935, user-variable:cp:reportdescription=NI Invoice Print Selected Invoices XML, user-variable:cp:Dummy for Data Security=Y}+
    Start bursting process..
    Bursting process complete..
    Generating Bursting Status Report..
    --Exception+
    duplicate entry: /NI_RAXINV_SEL_XML_1328363.PDF
    java.util.zip.ZipException: duplicate entry: /NI_RAXINV_SEL_XML_1328363.PDF
    +     at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:175)+
    +     at oracle.apps.xdo.oa.cp.JCP4XDOBurstingEngine.zipOutputFiles(JCP4XDOBurstingEngine.java:524)+
    +     at oracle.apps.xdo.oa.cp.JCP4XDOBurstingEngine.runProgram(JCP4XDOBurstingEngine.java:292)+
    +     at oracle.apps.fnd.cp.request.Run.main(Run.java:157)+
    Regards,
    Attila

  • How to delete duplicate entries in table for the object DNL_CUST_BASIS2

    Hi All,
    I am trying to download the object DNL_CUST_BASIS2.
    In the SMQ2 the status is SYSFAIL.
    I checked in the ST22 for dumps.It says about the error while accessing the table T006.
    While analysing this,i found some duplicate entries in the related tables of this object.
    Can somebody help me how to delete these duplicate entries?
    Thanks,
    Senthil.

    Delete them directly from the table using se16:
    select the entries in the classic view (not ALV or grid view).
    activate the debugger.
    press the view button. --> you'll enter in the debugger
    press F7
    locate the sy-ucomm variable & change it to "DELE".
    press F8
    delete the entries.
    Trick-shots
    but it works!
    Michael.

  • How can I get rid of duplicate entries in iPad iCal?

    This is kind of a repeat and I apologize, but I have duplicate entries now in my iCa on my iPad because of iOS5? Others on this same topic said something about deleting the whole iPad calendar.  Before I did that, I wanted to be sure, that if I delete the iPad calendar, it won't delete the iMac calendar.   I'm just not sure how to get one one iCal entry in my iPad calendar.  I have birthdays, etc. entered until eternity!

    Janice Fisher wrote:
    Tgara, you are brilliant! 
    Yeah, everybody says that. 
    Janice Fisher wrote:
    I notice the mail setting in iTunes is set to sync, but all the others are set at syncing with iCloud.  What about mail?  Should it be syncing with iCloud, iTunes, or both (I assume not both, but......).  I still don't have mail working with iCloud anyway so I'm not sure what should be happening there.
    I would be consistent with respect to the information in the "Info" pane in iTunes.  That is, if you want to sync Calendars, Contacts, and email, use either iCloud for all 3 (e.g., enable all 3 in iCloud and deselect all 3 from iTunes) or iTunes for all 3 (select all 3 in iTunes and disable all 3 in iCloud).... don't break them up across services.

  • Upgrade to iTunes 8.1- duplicate entries in library

    Since upgrading to 8.1 (and having just managed to rescue my iPhone from sync disaster caused by 8.1) I notice that I have duplicate entries in my purchased library which were not presnet before.
    This seems to be songs which were purchased before iTunes Plus versions were avaiable, but were subseqently upgraded to iTunes Plus versions. In the music folder two files can be seen for each song, one of which is locked. Both get listed in the library as the same song in this 8.1 version, something that has not happened in earlier iTunes releases.
    Should I do anything to correct the library from showing duplicate entries? Or shoudl I wait for this bug to be fixed?
    Thanks.

    um that's not the case for me... I have used the wire that came with the phone as well as the wire that I purchased to charge the phone and the bluetooth headset and I'm still having problems. When I plugin my ipod classic however, it works fine. now the problem with both items is that when I plug them in, is that they show full battery life right away, and they stop charging. The weird thing is that on iTunes, it shows that it does NOT have a full charge. this happens both with the iPhone as well as the ipod. it's very annoying and I have to plug both of them to an electrical outlet so that the battery can charge. And forget about syncing my music, it says it's not recognized, or that is the memory is not available, so it doesn't sync. I've been so ****** at my iPhone lately, that all I want to do is throw it out the window...
    And before you suggest what I think you will suggest, yes, I just did a full restore on the **** thing, and it's STILL showing up as fully charged when it's not....
    I can't wait till my two years are up with ATT so that I can get rid of this phone.

  • Missing and duplicate entries in the calendar

    I'm a long time (1997) Palm user who's moved to a BB 8330 last month. I can't seem to get calendar syncing to work correctly. In some instances, I am missing items on Outlook. I often have duplicate entries on the handheld. I've searched the forums and there seem to be similar issues and the solutions appear to be around Service Books, but I'm not confident I have a clue how not to lose lots of info.I also cannot seem to find information that explains the relationship between email addresses & calendar (I don't see why there should be any!!!)
    Scenario (trying to answer up front the questions from other forum posts):
    I am using Outlook on my home computer to manage my personal calendar. I do not have an email account associated with Outlook.I have set up 2-way sync with Outlook for calendar, tasks & contacts
    My work uses Lotus Notes. I have set up one sync to the handheld only from the Lotus Notes calendar
    The only email account configured on the BB is a gmail account (which is not associated with either calendar). I originally set this up via the wizard, then removed it, but added it back (under Email settings) when I discovered I couldn't send email from the Address book without it. I actually prefer google mobile for email management since it modifies the server state as well. Not sure if the add/remove/add sequence has somehow messed up the calendar?
    I have checked under Calendar > Options and two calendars appear. Based on the color associations it appears that Device Default is associated with Outlook personal calendar & my gmail account is associated with the Lotus Notes calendar entries. As far as I know I did not create these associations. 
    Checking under Options > Advanced Options > Default Services, I see CICAL & CMIME entry and those are both the gmail account.
    Checking under Options > Advanced Options > Service Book, I see only one CICAL & CMIME entry and those are both the gmail account.
    Separately, I do have a couple of mobile apps to read email (gmail- same acct - and yahoo), but those appear to not integrate into the BB apps directly. 
    Everytime I sync with Outlook, I end up with lots of duplicate entries on the handheld. I have also noticed that I am missing entries that are on the handheld, but are not on Outlook (in one very odd case, the entry was created on Outlook and now only exists on the handheld). I may have deleted duplicate entries related to the missing items at one time... I can't be sure about that. I believe I currently have a complete calendar on the handheld, but not 100% confident I have a good calendar anywhere. 
    And as an aside, have to say I'm really bummed that I have lost easy access all my Palm historical data. It appears BB will not bring in old calendar data by design (found that in some BB documentation on their site).  Now that I will not keep up with Palm upgrades, at some point I will lose access to that data. Sigh. 
    Any, all help appreciated.  

    Hello...correction:
    RaviStrs wrote:
    Ok. In that case, try this. (That worked for me when I had similar problem. Ignore if you already tried this)
    1) Turn off the phone
    2) Remove the battary and place it again
    3) Restart your phone
    Have the BB ON (e.g., something showing on the display, the HomeScreen would be fine) when you remove the battery. That is the cleanest hard reboot method.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Duplicate entries getting posted using FB01

    Hi All,
    I am facing a very strange problem which I have never heard of before.
    There is a report program which picks up an input file from the application server and posts the entries. This input file will contain all the details about header record, vendor line items and G/L line items.
    The report checks for duplicate entries comparing the reference number and the vendor. It discards the duplicate entries. It does not post duplicate entries.
    Now, the input file contains the reference number only once. It also has multiple line items for that refernce. But has posted two identical documents having same reference, company code, etc. The only thing that is different is the document number and the time of entry. There is just a few seconds gap between the posting of the two entries.
    Ideally FB01 should also not allow to post such identical entries.
    Please suggest possible reasons for such postings.
    Thanks & Regards,
    Namrata

    Hi,
    Manually everything is working fine. Also through this report everything works fine always except for this case which happened.
    The input file had a lot of references for posting. But just one got duplicated. So, I was just wondering what could have gone wrong.
    Could it be because of some database commit or due to some memory buffer refresh which did not happen by mistake.
    I'm just trying to figure out some possible causes for such a thing.
    Your inputs and thoughts are welcome.
    Thanks & Regards,
    Namrata

  • How to remove duplicate entries in OID due to an AD-OID bootstrap

    Don't worry about the "why" but there were changes made to the mapping file for an AD-OID synch and dipassistant commands mp and bootstrap run and now there are some duplicate entries for users in OID. The only difference between the duplicates for each of those user (besides the creation/modify timestamps) is their ORCLGUID. Their orclobjectsid, orclobjectguid, dn, uid, etc. are the same. Also, our OID is used for SSO to an oracle portal. So ... is there any way to programmtically get rid of the duplicates or do I have to manually go through and delete. And if manually, which one of the two should be removed? The one created first or last?
    You'll have to excuse myself and my co-workers 'cause we're still newbies when it comes to OID. :-)

    Found an easier way to delete my unwanted users ... Softerra LDAP Administrator 3.5. :-)
    After I did the deletes, we implemented a new mapping file (see my post at Changing Domain Rules in mapping file for Active Directory-OID synch ) and ran bootstrap. Now I just have to update the GUID and DN in portal.wwsec_person$ with the new orclguid and dn from OID for each affected user.

  • 8300 Curve duplicate entries in Calendar

    Hi
    BES
    8300 Curve
    Currently I have a user that has duplicate entries in her calendar. When I'm in  the Calendar and select Options then choose select Calendars I have four options
    Show All 
    Calendars
    Desktop
    Desktop
    I have desktop twice and that is why I think she is seeing  two entries in her calendar. How do I go about removing the second Desktop. I'm new to BB so could you provide me with instruction. I saw an option to wipe the BB but will this affect all her phone  numbers that are stored on the phone. What exactly will it wipe out on the BB?

    I got duplicate entries after updating device software. I sync with outlook and outlook does not have the duplicates. I have the same question as you,,how to wipe out the dups without screwing up my original entries or entries in outlook.

  • Duplicate Entries

    Greetings,
    I'm seeing duplicate entries on calendar items.
    My wife entered some events on her calendar (on her Mac mini) this morning and they are showing up twice (exact same event @ same day/time) on my iMac when I view her subscribed calendar.
    The odd part is when I check this same calendar on my iPhone 4 and my iPad, they show up correctly as single events.
    Any ideas on why this would occur?
    Thanks!
    Jim

    I have the same problem although it keeps getting worse as the kids rerip the same cd and some of the songs are duplicated several times. I keep waiting for Apple to come up with a fix as none of the other media players out there keep duplicates of the same file, most over write each other.
    Its a real mess, wish apple worked on Itunes problems although they seem too focused on selling and don't seem to care about functionality. I love apple but am getting frustrated with the lack of support for itunes. They keep adding features and not fixing bugs. As a pc user itunes was quite confusing to figure out, apple users are definately using the other side of their brains but then dragging a floppy into a trash can to get it to eject never made sense with me either. BTW I have 3 macs and 6 pcs in my house.

  • Duplicate entries in iTunes display, but both entries point to the same physical location.

    I've seen lots of discussion about how to remove duplicate copies of the same song, but my issue is different.
    iTunes has duplicate entries in its database, but if I do show in finder, then both entries point to the same physical location.
    If I delete one entry, then the other entry becomes unusable.
    Any idea how I could clean this up? Its annoying because if I select an album to play, then each song gets played twice.

    @zoo_bink I too have exactly the same issue however it's not affecting all my files.
    One solution, which I'm contemplating, is to backup the iTunes Media folder, delete files, uninstall/reinstall iTunes then re-import the files. The issue may have arisen during initial import. (I'm not sure at this stage if Apple allow iTunes to be uninstalled.)
    iTunes music collection is showing 58.95GB versus 57.11GB in Finder so it's not a massive deal but annoying nonetheless as deleting entries isn't an option.
    Any suggestions welcome.
    MacBook Pro, OS X 10.9.1, iTunes 11.1.3 (8)

  • Validating Duplicate Entries In itab

    Hi All
       How to approach for restricting duplicate entries in the Database?
    The scene is that I've to enter some data in a table control . and while saving, I've to check whether the same entry already exists in the database or not.
    How to approach for this? Awaiting your valuable response.
    Thanks in advance
    Pradipta

    Hai Mishra
    DELETE ADJACENT DUPLICATES FROM itab.
    Additions
    1. ... COMPARING f1 f2 ...
    2. ... COMPARING ALL FIELDS
    Effect
    Deletes neighboring, duplicate entries from the internal table itab . If there are n duplicate entries, the first entry is retained and the other n - 1 entries are deleted.
    Two lines are considered to be duplicated if their default keys match.
    The return code value is set as follows:
    SY-SUBRC = 0 At least one duplicate exists, at least one entry deleted.
    SY_SUBRC = 4 No duplicates exist, no entry deleted.
    Addition 1
    ... COMPARING f1 f2 ...
    Effect
    Two lines of the internal table itab are considered to be duplicates if the specified fields f1 , f2 , .... match.
    Addition 2
    ... COMPARING ALL FIELDS
    Effect
    Two lines are considered to be duplicates if all fields of the table entries match.
    Notes
    The DELETE ADJACENT DUPLICATES statement is especially useful if the internal table itab is sorted by fields (whether in ascending or descending order) which were compared during duplicate determination. In this case, the deletion of neighbouring duplicates is the same as the deletion of all duplicates.
    If a comparison criterion is only known at runtime, it can be specified dynamically as the content of a field name by using COMPARING ... (name) ... . If name is blank at runtime, the comparison criterion is ignored. If name contains an invalid component name, a runtime error occurs.
    Comparison criteria - statistically or dynamically specified - can be further restriced by specifying the offset and/or length.
    Note
    Performance
    Deleting a line from an internal table incurs index maintenance costs which depend on the index of the line to be deleted. The runtime depends on the line width of the table.
    For example, deleting a line in the middle of an internal table with 200 entries requires about 10 msn (standardized microseconds).
    Deleting a range of entries with " DELETE itab FROM idx1 TO idx2. " deleting a set of entries with " DELETE itab WHERE ... " only incur index maintenance costs once. Compared with a LOOP , which deletes line-by-line, this is much faster.
    To delete neighboring, duplicate entries from an internal table, use the variant " DELETE ADJACENT DUPLICATES FROM itab. " instead of LOOP constructions.
    Thanks & regards
    Sreeni

  • Duplicate entries in mms_rbs_subscription table

    We use a mobile iOS Application which is connected a SUP 2.1 Server. The Application runs fine until a couple of weeks but now we got some synchronisation problems. Some users don't get data changes on their devices.
    Probably we have identified one possible reason for these synchronisation problem.
    In the CDB we have duplicate entries in the mm_rbs_subscription table. Duplicate means, that for one device_id there are two or three remote_ids in this table. We dont know the reason, but we assume that these entries were created during our iOS7 Migration.
    Maybe this entries are one of the reasons for our current synchronisation problems.
    Did anybody know, how which entries would be created? And is it possible to delete entries in the mms_subscription table?

    Hi Shiv,
    thanks for your answer. In our Application every MBO is collected in a cachegroup. We have 5 cachegroups, including the default cache group, every cache group contains round about 1 to 5 MBOs.
    What do you mean with "Partition" option. The cache group policy is configured to scheduled, so i can't set a partition option here.. Is there any other possibility to set a "partition" option?
    Best regards,
    Ingo

  • Need advice on preventing duplicate entries in People table

    Hi,
    In my database, I have a "People" table where I store basic information about people e.g. PersonId, FirstName, LastName, Gender, etc.
    There will be lots of entries made into this table and I want to prevent duplicate entries as much as humanly possible. I'd appreciate some pointers on what I should do to minimize duplicates.
    My primary concerns are:
    Duplicate entries for the same person using the person's full name vs. given name e.g. Mike Smith and Michael Smith
    Making sure that two separate individuals with identical names do get entered into the table and get their unique PersonId's.
    Not even sure how I can even possibly know if two individuals with identical names are two different people without having additional information but I wanted to ask the question anyway.
    Thanks, Sam

    Thank you all very much for your responses.
    There are three separate issues/points here.
    It is clear that it is impossible to prevent duplicates using only a person's first, middle and last names. Once I rely on an additional piece of information, then things get "easier" though nothing is bullet proof. I felt that this was self evident but
    wanted to ask the question anyway.
    Second issue is "potential" duplicates where there are some variations in the name e.g. Mike vs Michael. I'd like a bit more advice on this. I assume I need to create a table to define variations of a name to catch potential duplicates.
    The third point is what Celko brought up -- rather nicely too :-) I understand both his and Erland's points on this as typical relational DB designs usually create people/user tables based upon their context e.g. Employees, Customers, etc.
    I fundamentally disagree with this approach -- though it is currently the norm in most commercial DB designs. The reason for that is that it actually creates duplicates and my point is to prevent them. I'm going for more of an object based approach in the DB
    design where a person is a person regardless of the different roles he/she may play and I see no reason in repeating some of the information about the person e.g. repeating first, last name, gender, etc in both customer and employee tables.
    I strongly believe that all the information that are directly related to a person should be kept in the People table and referenced in different business contexts as necessary.
    For example, I assign every person a PersonId in the People table. I then use the PersonId as part of the primary key in the Customers or Employees table as well. Obviously, PersonId is also a foreign key in Customers and Employees tables. This prevents the
    need for a separate CustomerId and allows me to centralize all the personal data in the People table.
    In my opinion this has three advantages:
    Prevent duplication of data
    Allow global edits e.g. if the last name of a female employee changes, it is automatically updated for her within the context of "Customer" role she may play in the application.
    Last but not least, data enrichment where a person may enter additional data about himself/herself in different contexts. For example, in the employee context, we may have the person's spouse information through "Emergency Contacts" which may come handy
    within the context of customer for this person.
    Having everyone in the People table gives me these three advantages.
    Thanks, Sam

Maybe you are looking for

  • Problem with i915 Intel driver panic..

    Hello, I just recently reinstalled Arch on my laptop.  I have a problem with my laptop. When I went to install the Nvidia Optimus stuff and configure my Xorg.conf I was met with problems with the Intel Driver timing out.  When I boot up I get the nor

  • Mavericks 10.9.1 won't shutdown or restart

    Just upgraded to 10.9.1 Mavericks. Since upgrading, my MacBook Pro won't shutdown or restart; nothing happens after instigating, then after a few minutes a dialogue box appears saying an open application prevented the action. I have tried to upgrade

  • Airport Express Ethernet to WLAN

    I want to connect a Express to a white Extreme Base station (which has Internet access to cable modem) via Ethernet in order to bring WLAN service into another room (configurating both as a WDS network does not work, as between both stations due to d

  • Matrix Report Delimited

    Hi everyone, thanks in advance. I have a matrix report that should be in delimited format and the should be in .TXT, a restriction that we have due to having a UNIX-based server but should be opened in Excel. The report should also be called in Oracl

  • Problem viewing selected iPhoto video event full screen in iMovie.

    How do I view selected iPhoto video full screen as an event in iMovie?  It always plays the last import instead.  I did follow the instructions, but that does not work.