What is the best approach to handle multiple FK with single table.

If two tables are joined with each other with more than one ways, for example
MAIN table is (col1, col2,....coln, person_creator_id, person_modifier_id)
PERSON table is (person_id, name, address,........ phone) etc
At database level PERSON_CREATOR_FK and PERSON_MODIFIER_FK are defined.
Objective is to create a report that shows
col1, col2...coln, person creator name, person modifier name
If above two objects are imported with FKs in a EUL and discoverer plus is used to create above report. On first inclusion of person name discoverer plus will ask you to pick the join (provided the checkbox to disable this feature is not checked). Once you pick 'person creator' join it will never allow you to pick person modifier name.
One solution is two create a custom folder with query like
select col1, col2,...coln,
pc.name, pc.address,.... pc.phone
pm.name, pm.address,.... pm.phone
from main m,
person pc,
person pm
where m.person_id_creator = pc.person_id
and m.person_id_modifier = pm.person_id
Second solution is to import the PERSON folder twice in EUL (optionally named one as perosn_creator and other as person_modifier) and manually define one join per table. i.e. join MAIN with PERSON_CREATOR on person_creator_fk and join MAIN with PERSON_MODIFIER table using person_modifier_fk.
Now discoverer plus will let you drag Name from each person folder without needing to resolve multiple joins.
Question is, what approach is better OR is there a better way?
With solution 1 you will not be able to use functions on folder items.
With solution 2 there is a EUL design overhead of including same object multiple times and then manually defining all join (or deleting unwanted joins), and this could be a problem when you have person_modifier and person_creator in nearly all tables. It could be more complicated if person table is further linked other tables and users want to see that information too. (for instance, if person address is stored in LOCATION table joined with location_id and user want to see both creator address and modifier address....now you will have to create multiple LOCATION folders).
A third solution could be to register a function in discoverer that return person name when person_id is passed. This will work perfectly for above requirement but a down side is the report will run slower if they need filters on person names (then function will be used in where clause). Also, this solution is very specific to above scenario, it will not work if you want the report developer the freedom to pick any attribute from person table (lets say, person table contain 50 attributes then its not a good idea to register 50 functions).
Any comments/suggestion will be appreciated.
thanks

Hi
In a roundabout way you have really answered your own question :-)
In my opinion, the best approach, although by all means not the only approach - see below) would be to have the object loaded as two folders with one join going to the first folder and the second join to the other folder. You would of course name the folders appropriately.
Here's a workflow that I use all of the time and one that I teach when I'm giving Discoverer Administrator training. It might help you:
1. Bring in the PERSON folder to begin with
2. Make all necessary adjustments to bring it up to deployment standard. These adjustments would be: folder name (E.g PERSON_CREATOR), item names, item placement, default positions, default aggregation and so on.
3. Create or assign the required lists of values
4. Create any required calculations
5. Create any required conditions
6. Create the first join from this folder to MAIN.
7. Click on the heading for the folder and press CTRL-C.
8. Click on the heading for the business area and press CTRL-V. A second copy of the folder, complete with all of the adjustments you made earlier will be inserted into the business area.
Note: joins are not copied, everything else is.
9. Rename this folder to say PERSON_MODIFIED
10. Rename the items as appropriate
11. Add a join from this folder to MAIN - you're done
Other ideas that I have used and work well would be to use a database view or create a complex folder. Either will work, In both cases you would need to join on some other column other than the ones you referred earlier.
I hope this helps
Best wishes
Michael

Similar Messages

  • What is the best spec to run multiple programs with photographs?  Includes:  Lightroom, PhotoMechanic, and Internet DAM system?

    What is the best spec to run multiple programs with numerous photographs?  Includes:  Lightroom, PhotoMechanic, and Internet DAM system?
    For a Macbook Pro.  What's the least amount I need to process, upload, download images using these 3 programs?
    Thank you.
    pt

    That's a nice system Kevin, and it will work very nicely with Photoshop.  I do take it that you have 16Gb RAM in Total?
    250Gb SSD is a good size, but you can still run short, and that will affect Windows performance.  When you get your system, instal WinDirStat which gives you a graphic display of everything on your drive, like below. Clicking on any of the large areas will tell you what and where they are, so you can think about moving cache folders etc. to one of the HDDs.
    Leave the Pagefile.sys on the boot drive.  Think about disabling Hyphenate as it takes a ton of space, and too often crashes on wake up.
    My Documents
    Desktop
    Downloads
    Look at Bridge cache
    iTunes backup
    Other stuff like that.
    Think about another 500Gb drive just for Photoshop Scratch.  Drives are cheap as chips nowadays
    Do yourself a favour, and invest $100 in Shadow Protect (or similar if there is such a thing) SP saves incremental backups every 15 minutes (you can set the interval, but it has no impact on performance with a system like yours).  If you have a problem you can mount the back up at any of those 15 minute points, and open files from it.  You can also make a bootable DVD image of your C drive, and be back up and running five minutes after disaster strikes.
    Optimize Performance in Photoshop
    Photoshop CC and CC 2014 GPU FAQ
    For more ideas, swing by the Premiere Pro Hardware forum.  Those guys are serious good at this stuff, and you'll find links tips and ideas.
    Happy computing, and have fun with your Creative Cloud® apps.

  • What is the best approach to delete multiple list items

    Hi
    I want to delete multiple list items at once, what is best approach please suggest?
    Ramesh

    Hi Ramesh,
    Better approach for removing many items from a list is to use the ProcessBatchData method provided by the SPWeb class. First, you need a collection of the list items
    you want to remove, and then you can use the Get-SPListItem function to retrieve a list of items that match a given criteria. Then build a batch string with resultant items and call the ProcessBatchData method.
    Here is the sample code.
    function Get-SPList($webUrl, $lstUrl)
    $webObj = Get-SPWeb -identity $webUrl
    $lstObj = $webObj.GetList($lstUrl);
    return $lstObj
    $spList = Get-SPList -webUrl "http://mysitecollecton/MySite" -lstUrl "http://mysitecollecton/MySite/Lists/EmpInfo"
    $spQuery = new-object Microsoft.SharePoint.SPQuery
    $camlQuery =
    "<Where>
    <Eq>
    <FieldRef Name='Department' />
    <Value Type='Text'>HR</Value>
    </Eq>
    </Where>"
    $spQuery.Query = $camlQuery
    $spQuery.RowLimit = 100
    $spListItemCollection = $spList.GetItems($spQuery)
    # Create batch remove CAML query
    $batchRemove = '<?xml version="1.0" encoding="UTF-8"?><Batch>';
    # The command is used for each list item retrieved
    $command = '<Method><SetList Scope="Request">' +
    $spList.ID +'</SetList><SetVar Name="ID">{0}</SetVar>' +
    '<SetVar Name="Cmd">Delete</SetVar></Method>';
    foreach ($item in $spListItemCollection)
    $batchRemove += $command -f $item.Id;
    $batchRemove += "</Batch>";
    # Remove the list items using the batch command
    $spList.ParentWeb.ProcessBatchData($batchRemove) | Out-Null
    Please don't forget to mark it answered, if your problem resolved or helpful.

  • What is the best way to manage multiple devices with one iMac - different users with seperate itunes accounts or one mac user with different itune logons and libraries?

    Hello
    I have just purchased an imac which I am very happy with.  In our household we also have two iphones (one mine and one husbands) and one ipod (my sons). We all have individual itunes accounts set up on our previous computer (not a mac). We have sepereate apps and music, although there may be the odd occasion where we would like to share a song (if this is possible) across devices.
    I am just wondering the best way to manage these devices using the new imac.  Should I create individual accounts to logon to the imac, then from within these launch our own itunes accounts and sync our devices with these.  Or should I be using one version of itunes, logging on to this with our different itunes usernames and storing things in libraries.
    Any help would be greatly appreciated. 
    Thanks

    I am presuming that we cannot share downloaded apps and music between accounts because of the copyright issue,
    Though I'm no copyright lawyer, as long as it's within a household, you can share content among users. Such sharing is, absent specific language preventing it not present in the iTunes Store terms of use, generally considered to be "personal use". So you can share apps and music amongst your users on your computer and with their devices. You just can't give any of that content to friends or relatives who don't live with you.
    What I am not clear on, it making sure that this appears in each itunes account - is it easy to find the file storage folders that match the itunes accounts and what would these be?
    The iTunes library and files are by default in a user's Home/Music folder. But you don't have to find the folder; in fact putting a file into the folder yourself won't add the file to iTunes. Just drag the file into the iTunes window. iTunes will copy it to the correct location.
    Regards.

  • What's the best way to send multiple objects with a message?

    I'm considering using an ObjectMessage and storing a Map as the object. Each
              of the objects I need to send will be bound in this Map. Is this the correct
              approach?
              Also, if this is the correct approach, where should I store the constants
              for the Map keys? If I put them in the MDB consumer, it ties the client to
              the consumer and vicea versa. I guess I could declare them in my main
              interface.
              Thanks,
              Bob
              

    OK.
              But for what it's forth, if you were to need to put a Map in an
              ObjectMessage, you might find that MapMessage gives you similiar (if not
              better) functionality, the resulting message will be smaller, and your
              system may perform better. The various implementations of java.util.Map are
              pretty hefty objects to serialize, whereas a MapMessage (at least, the
              MapMessage from BEA JMS) has been optimized to be pretty compact and fast.
              On the other hand, the only kinds of objects you can put in a MapMessage are
              Java primitive types (int, String, and so forth), whereas in a java.util.Map
              you can put any kind of object.
              greg
              "Bob Lee" <[email protected]> wrote in message
              news:[email protected]...
              > Nevermind. I'm using a Command pattern.
              >
              > Bob
              >
              > "Bob Lee" <[email protected]> wrote in message
              > news:[email protected]...
              > > I'm considering using an ObjectMessage and storing a Map as the object.
              > Each
              > > of the objects I need to send will be bound in this Map. Is this the
              > correct
              > > approach?
              > >
              > > Also, if this is the correct approach, where should I store the
              constants
              > > for the Map keys? If I put them in the MDB consumer, it ties the client
              to
              > > the consumer and vicea versa. I guess I could declare them in my main
              > > interface.
              > >
              > > Thanks,
              > > Bob
              > >
              > >
              >
              >
              

  • What is the best way to add multiple images with links into an email signature?

    I created an email signature with five linked images by:
    * creating new message
    • attached the image
    • adding link to the image
    • copied new email signature
    • under Preferences/Signature added the new signature
    It all works, but some of the emails bounced back. When we removed the images, the email went through.
    I  tried putting all the images into Photoshop and making it all one image, used the slice tool to create a link for each image and brought that single image into the signature, but that didn't work as separate links.
    Any suggestions?

    Hi Bob.
    So what I should have done on my PC for all my files is gone to the File menu and used the Package command which would have converted it into a file with the images in it so they wouldn't need to be relinked.
    From now on I will only be working on Mac (I gave away my PC) but I'm sure I could use a friend's pc (or at a later point install Windows on my Mac). But to use the Package command on PC I need to actually have the images in the correct folder on the PC right?

  • What's the best approach for handeling about 1300 connections in Oracle.

    What's the best approach for handling about 1300 connections in Oracle 9i/10g through a Java application?
    1.Using separate schema s for various type users(We can store only relevant data with a particular schema.     Then No. of records per table can be reduced by replicating tables but we have to maintain all data with a another schema     Then we need update two schema s for a given session.Because we maintain separate scheama for a one user and another schema for all data and then there may be Updating problems)
    OR
    2. Using single schema for all users.
    Note: All users may access the same tables and there may be lot of records than previous case.
    What is the Best case.
    Please give Your valuable ideas

    It is a true but i want a solution from you all.I want you to tell me how to fix my friends car.

  • What is the best approach to insert millions of records?

    Hi,
    What is the best approach to insert millions of record in table.
    If error occurred while inserting the record then how to know which record has failed.
    Thanks & Regards,
    Sunita

    Hello 942793
    There isn't a best approach if you do not provide us the requirements and the environment...
    It depends on what for you is the best.
    Questions:
    1.) Can you disable the Constraints / unique Indexes on the table?
    2.) Is there a possibility to run parallel queries?
    3.) Do you need to know the rows which can not be inserted if the constraints are enabled? Or it is not necessary?
    4.) Do you need it fast or you have time to do it?
    What does "best approach" mean for you?
    Regards,
    David

  • What is the best approach to converting LV7.1 tags to LV2012 shared variables in multiple VIs?

    What is the best approach to upgrading from LV7.1/DSC tags to LV2012/DSC shared variables, in multiple VIs running on multiple platforms? Our system is composed of  about 5 PCs running Windows 2000/LV7.1 Runtime, plus a PLC, and a main controller running XP/SP3/LV2012. About 3 of the PCs publish sensor information via tags across the LAN to the main controller. Only the main controller is currently being upgraded. Rudimentary questions:
    1. Will the other PCs running the 7.1 RTE (with tags) be able to communicate with the main controller running 2012 (shared variables)?
    2. Is it necessary to convert from tags to shared variables, or will the deprecated legacy tag VIs from LV7.1 work in LV2012?
    3. Will all the main controller VIs need to be incorporated into a project in order to use shared variables?
    4. Is the only way to do this is to find all tag items and replace them with shared variable items?
    Thanks in advance with any information and advice!
    lb
    Solved!
    Go to Solution.

    Hi lb,
    We're glad to hear you're upgrading, but because there was a fundamental change in architecture since version 7.1, there will likely be some portions that require a rewrite. 
    The RTE needs to match the version of DSC your using.  Also, the tag architecture used in 7.1 is not compatible with the shared variable approach used in 2012.  Please see the KnowledgeBase article Do I Need to Upgrade My DSC Runtime Version After Upgrading the LabVIEW DSC Module?
    You will also need to convert from tags to shared variables.  The change from tags to shared variables took place in the transition to LabVIEW 8.  The KnowledgeBase Migrating from LabVIEW DSC 7.1 to 8.0 gives the process for changing from tags to shared variables. 
    Hope this gets you headed in the right direction.  Let us know if you have more questions.
    Thanks,
    Dave C.
    Applications Engineer
    National Instruments

  • What are the best approaches for mapping re-start in OWB?

    What are the best approaches for mapping re-start in OWB?
    We are using OWB repository 10.2.0.1.0 and OWB client 10.2.0.1.31. The Oracle version is 10 G (10.2.0.3.0). OWB is installed on Linux.
    We have number of mappings. We built process flows for mappings as well.
    I like to know, what are the best approches to incorportate re-start options in our process. ie a failure of mapping in process flow.
    How do we re-cycle failed rows?
    Are there any builtin features/best approaches in OWB to implement the above?
    Does runtime audit tables help us to build re-start process?
    If not, do we need to maintain our own tables (custom) to maintain such data?
    How did our forum members handled above situations?
    Any idea ?
    Thanks in advance.
    RI

    Hi RI,
    How many mappings (range) do you have in a process flows?Several hundreds (100-300 mappings).
    If we have three mappings (eg m1, m2, m3) in process flow. What will happen if m2 fails?Suppose mappings connected sequentially (m1 -> m2 -> m3). When m2 fails then processflow is suspended (transition to m3 will not be performed). You should obviate cause of error (modify mapping and redeploy, correct data, etc) and then repeat m2 mapping execution from Workflow monitor - open diagram with processflow, select mapping m2 and click button Expedite, choose option Repeat.
    In re-start, will it run m1 again and m2 son on, or will it re-start at row1 of m2?You can specify restart point. "at row1 of m2" - I don't understand what you mean (all mappings run in Set based mode, so in case of error all table updates will rollback,
    but there are several exception - for example multiple target tables in mapping without corelated commit, or error in post-mapping - you must carefully analyze results of error).
    What will happen if m3 fails?Process is suspended and you can restart execution from m3.
    By having without failover and with max.number of errors=0, you achieve re-cycle failed rows to zero (0).This settings guarantee existence only two return result of mapping - SUCCSES or ERROR.
    What is the impact, if we have large volume of data?In my opinion for large volume Set based mode is the prefered processing mode of data processing.
    With this mode you have full range enterprise features of Oracle database - parallel query, parallel DML, nologging, etc.
    Oleg

  • What is the best way to manage multiple ipods using the same itunes?

    Hi Everyone
    i am trying to manage three different ipods through the one Itunes, all with very different tastes, not sure if I am doing it the best or easiest way so does anybody have a simple solution on what you're supposed to do, to keep it all simple!
    Cheers
    Liv

    If you have created a new Windows user account you need to log out and then log back in with your original user name. By default each Windows profile will have an independent iTunes library.
    If instead you managed to create a new library within the same profile. click the icon to start iTunes and immediately press and hold down the shift key, keep holding until asked to create or choose a library. Click Choose and navigte back to your original which should be at <User's Music>\iTunes.
    Your question as posed was:
    What is the best way to manage multiple iPods using the same iTunes {library}?
    in which case Selected Playlists is probably the best approach. Simply create a playlist for each device, Alice's iPod, Bob's iPhone etc. and sync the device with the appropriate list.
    tt2

  • What is the best approach to capture TBOM's for a SAP SRM system/functionality?

    Hello SCN Community,
    It would be much appreciated if somebody could share some information about the following....
    What is the best approach to create TBOM's for a SAP SRM system? The SRM functionality is basically consisting out of multiple ABAP Web Dynpro's that are connected as a process via a SAP Portal (as is understand it). The entrypint to the SRM functionality is via the SAP Portal.
    Do I first have to create a link to the Portal via an SAP Web Application link in SOLAR01 and then start recording? Will it record only the portal objects or also the ABAP Web Dynpro objects?
    Do I have to list all the separate ABAP Web Dynpro's in SOLAR01 and use those as a starting point?
    I am myself more familair with more classical SAP ABAP ECC systems and transactions.  I could hardly find any information on the use of BPCA and the required TBOM's in the area of SRM.... Any help would be much appreciated!
    Kind Regards,
    Guido Jacobs

    Hi Guido,
    today was a new blog released, maybe this helps:
    BPCA - Powerful Risk Eliminator
    Best Regards,
    Christoph

  • What is the best approach for combining events?

    When I work on a wedding my current workflow involves creating a compound clip for each section of the video (e.g. reception, ceremony, dancing etc). Then I add the compound clip 'sequences' into a single project to add the chapter markers and export to a single master file.
    I like the idea of managing each section in a project rather than a compound clip now that projects are part of the library in 10.1, but is there a good way to combine multiple projects (for each section) into a single master project, or would I still need to copy the contents of each project and paste in the master project?
    Maybe I am best to continue with my current workflow.

    Just saw the discussion title - should have said "What is the best approach for combining projects"?

  • What is the best way to sync multiple collections of contacts among multiple users?

    (I originally submitted this question under the "Mac OS X Technologies" section, but got no response. I'm submitting a duplicate here because this is where all the smart folks are! My apologies that my question is only partially related to OS X Server . . . )
    What is the best way to sync multiple collections of contacts among multiple users on iOS and OS X?
    For example, suppose I have three collections of contacts: Bob's, Sally's, and Common. I want Bob to be able to access and sync Bob's contacts and Common contacts, and Sally to access and sync Sally's contacts and Common contacts. Bob and Sally never need to access or sync each other's contacts. Bob and Sally would both sync and share contacts in Common.
    How would I best implement this? It's my understanding I have three options for managing contacts across iOS and OS X: 1. iCloud accounts, 2. Install OS X server, or 3. Install and manage Darwin CardDAV directly. Which method would best support what I wish to do?
    I am a seasoned Unix geek well versed in the terminal, so I am prepared to get my hands dirty as much as necessary to achieve what I want. Also, it is sufficient if syncing takes place over WiFi on the local network, in fact, that is desirable versus syncing over the cloud.

    Thanks for your reply Nick101. I see my example was oversimplified. When I say "multiple groups of contacts over multiple users" I'm really referring to N groups of contacts over N users.
    So I need to add Fred, who can access and sync Bob's contacts, Sally's contacts, and Common contacts, as well as Fred's contacts. Can I do it with OS X server?
    You mention you keep your and your partner's contacts administered locally. What keeps you from administering them through OS X server as well?
    I am guessing this can all somehow be accomplished with multiple contact accounts, but I can't find any information on the web explicitly describing this.

  • Database Log File becomes very big, What's the best practice to handle it?

    The log of my production Database is getting very big, and the harddisk is almost full, I am pretty new to SAP, but familiar with SQL Server, if anybody can give me advice on what's the best practice to handle this issue.
    Should I Shrink the Database?
    I know increase hard disk is need for long term .
    Thanks in advance.

    Hi Finke,
    Usually the log file fills up and grow huge, due to not having regular transaction log backups. If you database is in FULL recovery mode, every transaction is logged in Transaction file, and it gets cleared when you take a log backup. If it is a production system and if you don't have regular transaction log backups, the problem is just sitting there to explode, when you need a point in time restore. Please check you backup/restore strategy.
    Follow these steps to get transactional file back in normal shape:
    1.) Take a transactional backup.
    2.) shrink log file. ( DBCC shrinkfile('logfilename',10240)
          The above command will shrink the file to 10 GB.(recommended size for high transactional systems)
    >
    Finke Xie wrote:
    > Should I Shrink the Database? .
    "NEVER SHRINK DATA FILES", shrink only log file
    3.) Schedule log backups every 15 minutes.
    Thanks
    Mush

Maybe you are looking for