Table Design issue with 1 to many relationship

target: to match business and owner info correctly.Business will always have
id, owner is supposed to know owner id but in reality, most owner doesn't know the id. Same owner can own many different business ( ie. same owner_id but different b_id).
A rough design is like the following:
I use owner_seq to serve as a pointer for me to keep track of the business and owner relationsip. The problem is this is difficult to prevent duplicates (combination of same b_id,owner_id) from entering into table.
b_seq,owner_seq : automatic generated sequential number.
business: b_seq (not null, primary key),b_id(not null), b_owner_seq(not null),b_name(not null), b_addr,b_city,b_state,b_zip
owner:owner_seq ( not null),owner_id,owner_name(not null), owner_addr, owner_city, owner_state,owner_zip
How would you do it ? can you help ? Thank you very much.
MunSharm

fahd,
thanks for your reply.
If i am not mistaken, i think I already using sequening to serve as primary key in both tables. ( b_seq, owner_seq). with my current design, the issue I have is how to prevent duplicates with the combination of 2 tables' entries ( b_id + owner_name) since owner_no is not always available.
MunSharmi

Similar Messages

  • Design issue with the multiprovider

    Design issue with the multiprovider :
    I have the following problem when using my multiprovider.
    The data flow is like this. I have the info-objects IobjectA, IobjectB, IobjectCin my Cube.(Source for this data is s-systemA)
    And from another s-system I am also loading the masterdata for IobjectA
    Now I have created the multiprovider based on the cube and IobjectA.
    However, surprisingly join in not workign in multiprovider correctly.
    Scenario :
    Record from the Cube.
    IObjectA= 1AAA
    IObjectB = 2BBB
    IObjectC = 3CCC
    Records from IobjectA =1AAA.
    I expect the record should be like this :
    IObjectA : IObjectB: IObjectC
    1AAA       :2BBB       :3CCC
    However, I am getting the record like this:
    IObjectA : IObjectB: IObjectC
    1AAA       :2BBB       :3CCC
    1AAA         : #             :#
    In the Identification section I have selected both the entries for IobjectA still I am getting this error.
    My BW Version is 3.0B and the SP is 31.
    Thanks in advance for your suggestion.

    May be I was not clear enough in my first explanation, Let me try again to explain my scenario:
    My Expectation from Multi Provider is :
    IObjectA
    1AAA
    (From InfoObject)
    Union
    IObjectA     IObjectB     IObjectC
    1AAA     2BBB     3CCC
    (From Cube)
    The record in the multiprovider should be :
    IObjectA     IObjectB     IObjectC
    1AAA     2BBB     3CCC
    Because, this is what the Union says .. and the Definition of the multiprovider also says the same thing :
    http://help.sap.com/saphelp_bw30b/helpdata/EN/ad/6b023b6069d22ee10000000a11402f/frameset.htm
    Do you still think this is how the behaviour of the multiprovider.. if that is the case what would be the purpose of having an infoobject in the multiprovider.
    Thank you very much in advance for your responses.
    Best Regards.,
    Praveen.

  • Problem with 1-to-many relationship between entity beans

    Hi All!
    I have two tables TMP_GROUP and TMP_EMPLOYEE with following fields:
    TMP_GROUP: ID, CAPTION, COMMENT, STATUS.
    TMP_EMPLOYEE: ID, LOGIN, GROUP_ID.
    For this tables i create two entity beans GROUP and EMPLOYEE respectively.
    The relationship looks like this
    descriptor ejb.xml:
    <ejb-relation>
                <description>description</description>
                <ejb-relation-name>employeesOfGroup</ejb-relation-name>
                <ejb-relationship-role>
                    <ejb-relationship-role-name>com.mypackage.GroupBean</ejb-relationship-role-name>
                    <multiplicity>One</multiplicity>
                    <relationship-role-source>
                        <ejb-name>GroupBean</ejb-name>
                    </relationship-role-source>
                    <cmr-field>
                        <cmr-field-name>employees</cmr-field-name>
                        <cmr-field-type>java.util.Collection</cmr-field-type>
                    </cmr-field>
                </ejb-relationship-role>
                <ejb-relationship-role>
                    <ejb-relationship-role-name>com.mypackage.EmployeeBean</ejb-relationship-role-name>
                    <multiplicity>Many</multiplicity>
                    <relationship-role-source>
                        <ejb-name>EmployeeBean</ejb-name>
                    </relationship-role-source>
                </ejb-relationship-role>
            </ejb-relation>
    descriptor persistent.xml:
    <table-relation>
                   <table-relationship-role
                        key-type="PrimaryKey">
                        <ejb-name>GroupBean</ejb-name>
                        <cmr-field>employees</cmr-field>
                   </table-relationship-role>
                   <table-relationship-role
                        key-type="NoKey">
                        <ejb-name>EmployeeBean</ejb-name>
                        <fk-column>
                             <column-name>GROUP_ID</column-name>
                             <pk-field-name>ejb_pk</pk-field-name>
                        </fk-column>
                   </table-relationship-role>
              </table-relation>
    Now i implement business method:
    public Long addEmployee(String login, long groupId) {
              Long result;
              try {
                   EmployeeLocal employee = employeeHome.create(login);
                   GroupLocal group =
                        groupHome.findByPrimaryKey(new Long(groupId));
                   Collection employees = group.getEmployees();
                   employees.add(employee);
                   result = (Long) employee.getPrimaryKey();
              } catch (CreateException ex) {
                   result = new Long(0);
              } catch (FinderException ex) {
                   result = new Long(0);
              return result;
    When i call this method from web service, the following exception is raised:
    com.sap.engine.services.ejb.exceptions.BaseTransactionRolledbackLocalException: Exception in method com.mypackage.GroupLocalHomeImpl0.findByPrimaryKey(java.lang.Object).
    P.S.
    1) I have transaction attribute set to "Required" for all methods of all beans
    2) I have unique index for each table:
    TMP_GROUP_I1: CAPTION
    TMP_EMPLOYEE_I1: LOGIN (however i think GROUP_ID must be added here too)
    3) I tried many:many relationship with this tables and it works fine
    4) I try another implementation of addEmployee method with
    EmployeeLocal employee = employeeHome.create(login, groupId);
    without using GroupLocal cmr-field and GroupLocalHome findByPrimaryKey method, the result is same error.
    Can somebody help me with this problem?
    Thanks in advance.
    Best regards, Abramov Andrey.

    gimbal2 wrote:
    1: The @JoinColumn on the listOfDepartments collection in Company is wrong. It should be something like this for a bidirectional relationship:
    @OneToMany(mappedBy="company") // company is the matching property name in Department
    private List <Department> listOfDepartment = new ArrayList<Department>();Note that I removed the fetch configuration; onetomany is fetched lazy by design. Saves some clutter eh.
    2: use a Set in stead of a List (hibernate doesn't like lists much in entities and will break when you create slightly more complex entity relations)
    3: don't just slap cascades on collections, especially of type ALL. Do it with care. In the many years I've been using JPA I've only had to cascade deletes in very specific situations, maybe once or twice. I never needed any of the other cascade types, they just invite sloppy code if you ask me. When working with persistence you should apply a little precision.I made all changes as you mentioned but still compID in department table shows null value...

  • Macbook Pro 15" vs 17" & space designer issues with VSL

    Hey Group! This is my first post/question. I'm a composer who does alot of sampling work and just stepped up to the macbook pro15" with the specs listed below. I'm running LogicPro (first time user on that, DP before), everything updated fully.
    I have no G4 or Quad... this will be my primary machine. I went with the 15" for portabilty and price (I'll be adding a separate display for larger view home studio work). Has anyone experienced nightmares because of the smaller amounts of firewire and usb ports? I use the left usb for my MBoxII (so there's audio and midi), the right usb for program keys (via a hub) and the firewire port for the external audio. I gather I can turn the card slot into addntl firewire ports (any 3rd party info on that appreciated). In other words, other than the slightly smaller display size have I made a terrible mistake choosing the 15" over the 17"?
    Also, I've experienced that when I use presets or matrices from the the VSL Solo Strings Instrument interface in the EXS24 I get random audio drop outs and it makes the space designer go nutty, even when I try different buffer settings. I see huge CPU spikes and hear audio glitching during the reverb tail of final notes. I also can't reactivate another note until the cpu settles back down (about 5 seconds) without getting very glitchy response. This only seems to happen with the VSL. Anyone else experiencing this?
    for Audio/Midi interface-ing I also own a Motu828mkII, which isn't as great for on the road work, but i could definitely use for my set up at home.....would I expect substantially better program performance out of that than the MboxII?
    Many thanks for all thoughts and responses
    Mark B

    Update: Vienna Strings is aware that there are still a few issues with the VSL Instruments and Intel Macs and they seem to be working very hard to fix these bugs ASAP.
    Having great success programming very large orchestral tracks with my set up (see below) and, after finding a balance between ram and frozen tracks, I'm able to get alot out of the 2 gigs of Ram on the Macbookpro. It's definitely a tightrope between cpu/and disk i/o usage (how much to freeze (which seems to put more strain on the i/o) and how much to keep in ram (which seems to make the cpu happy), and I'm finding larger buffer sizes allow for smoother playback without any noticable midi performance lag. I don't do a whole lot of audio recording with Logic, mostly sequencing and sampling, so i can't speak much to the audio track issues, or real time recording over sequenced tracks.

  • BW 3.5, BEx Query designer issue with text of the characteristics

    Hi All,
    We are currently using BEx 3.5 Query Designer to design the queries. We have one of the ODS on which we are querying for.
    We have 3 different types of Customer in this ODS. 0Customer, 0BBP_CUSTOMER and 0GN_CUSTOMER. The problem is when we open this ODS in Query designer we see their text name on the left hand side column where it shows data fields as the same text name Customer.
    Now the our Power users have raised the issue that it is very confusing even when there are 3 different technical names for these characteristics.
    2 Questions I have.
    1) Why is something like this happening? is it some issue with the Patch or something. We will be migrating to new BI soon but in the mean time if I could resolve it that will be the best. Or does it even get resolved with new BI???
    2) what is the way in which we can resolve it?
    Thanks in advance and points will be given generously.

    HI BI Consul!
    Things like this happen, when it is called customer it could be different customers, 0customer is the standard R/3 customer and 0BBP_customer is objects from CRM and most likely 0GN_Customer might be customer from different system.
    Sure, power users should be told which customer is customer and you could also change the discription of the object, to match the definition on the other system. You could also just create z object and replace the existing confusing object with something meaningful to users.
    thanks.
    Wond

  • A web service design issue with patterns

    Hello,
    I�d like to ask for your help in the following design issue:
    I need to create an email sending web service (with Axis). Only just one method which returns with an integer return code. This handles the following:
    - based on the given parameters gets the email addresses from an
    LDAP server (with netscape ldap for java)
    -     makes a cache from them (only after a timeout period will be the cache
    refreshed) (don�t know what tool to use for this)
    -     selects html templates which to be sent based on the given parameters
    -     sends emails with the appropriate templates (with Velocity)
    -     the whole process is logged (with log4j)
    I have to write the code as generic as possible. I know that some design pattern should be used for this. (some from GoF , and I know there exists design patterns specially created for web services as well).
    Could you enumerate me which patterns (and for what part of the program) would be the best choice to solve this problem? I have read through some books about patterns, but don�t have the knowledge to pick up the right one for a concrete problem like this..
    Thank you in advance,
    nagybaly

    Hello,
    I�d like to ask for your help in the following design
    issue:
    I need to create an email sending web service (with
    Axis). Only just one method which returns with an
    integer return code. This handles the following:Lots of responsibilities here. You would do well to break this up into several classes that you can test separately.
    I would also advise that you not embed all this in a servlet. Make a service that collaborates with several objects to accomplish the task and let the serlvet just call it.
    .> - based on the given parameters gets the email
    addresses from an
    LDAP server (with netscape ldap for java)I'd recommend Spring's LDAP module. Pretty terrific stuff.
    cache from them (only after a timeout period will be
    the cache
    refreshed) (don�t know what tool to use for
    this)Maybe EhCache or OsCache or something like that.
    -     selects html templates which to be sent based on
    the given parametersWhere does this come from? Certainly not the LDAP. A relational database? Write a DAO for the document template.
    -     sends emails with the appropriate templates (with
    Velocity)Have an e-mail sender service using Java Mail.
    -     the whole process is logged (with log4j)Easily done.
    I have to write the code as generic as possible. I
    know that some design pattern should be used for
    this. No pattern. There might be patterns, if you say that the DAOs to access the LDAP and RDB are patterns.
    Stop thinking patterns and start thinking objects.
    (some from GoF , and I know there exists design
    patterns specially created for web services as
    well).Nope.
    Could you enumerate me which patterns (and for what
    part of the program) would be the best choice to
    solve this problem? I have read through some books
    about patterns, but don�t have the knowledge to pick
    up the right one for a concrete problem like this..
    Thank you in advance,
    nagybalyYou haven't read them because they aren't there. Your problem is pretty specific, even if it's common.
    %

  • Design issue with sharing LV2 style global between run-time executables

    Hi,
    Just when I though that I had everything figured out, I ran into this design issue.
    The application that I wrote is pretty much a client-server application where the server publishes data and the client subscribes data using data sockets. Once the client gets all the data in the mainClient.vi program, I use LV2 style (using shift registers) to make the data global to all the other sub-vi’s. So the LV2 is in initialize mode in the mainClient.vi program and then in the sub-vi’s the LV2 is in read mode. Also, I had built the run time menu for each sub-vi that when an item is selected from the menu, I would use the get menu selection to get the item tag which will be the file nam
    e of the sub-vi and open the selected sub-vi using vi server. This all worked great on my workstation where I have labVIEW 7.0 Express installed. But the final goal is to make exe’s for each of these sub-vi’s and install runtime on the PC’s that do not have labVIEW installed. Of course when I did that only the mainClient.exe program was getting the updated data from the server but the sub-vi’s were not getting the data from the mainClient.exe. I did realize that the reason for this is due to the fact that I had compiled all the sub-vi’s separately and so the LV2 vi is now local to each executable (i.e. all executables have their own memory location). Also, the run-time menu did not work because now I am trying to open an executable using vi server properties.
    To summarize, is there a way to share LV2 style global's between executables without compiling all of the sub-vi’s at one time? I tried using data-sockets (local-host) instead of LV2 st
    yle gloabls to communicate between the sub-vi’s but I ran into performance issues due to the large volume of data.
    I would really appreciate it if anyone can suggest a solution/alternative to this problem.
    Thanks
    Nish

    > 1)   How would I create a wrap-around for the LV2.vi which is
    > initialized in my mainClient.vi and then how would I use vi server in
    > my sub-vi to refer to that LV2.vi?
    > You mentioned that each sub-vi when opened will first connect to the
    > LV2.vi via via-server and will keep the connection in the shift
    > register of that sub-vi. Does this mean that the sub-vi is accessing
    > (pass-by-reference) the shared memory of the mainClient.vi? If this
    > is what you meant I think that this might work for my application.
    >
    If the LV2 global is loaded statically into your mainClient.vi, then any
    other application can connect to the exe and get a reference to the VI
    using the VI name. This gives you a VI reference you can use to call
    the VI. Ye
    s, the values will be copied between applications. That is
    why you need to add access operations to the global that returns just
    the info needed. If you need the average, do that in the global. If
    you need the array size, do that in the global. Returning the entire
    array shouldn't be a common operation on the LV2 style global anyway.
    > 2) Just to elaborate on my application, the data is
    > transferred via DataSockets from the mainServer.vi on another PC to
    > the client’s PC where the mainClient.vi program subscribes the
    > data (i.e. 5 arrays of double type and each arrays has about 50,000
    > elements). The sub-vi’s will have to access these arrays
    > located on the mainClient.vi every scan. Is there any limitation on
    > referencing the mainClient.vi data via vi-server from each sub-vi?
    Your app does need to watch both the amount of data being passed across
    the network, and the amount being shared between the apps. You might
    want to consider puttin
    g the VIs back into the main app. What is the
    reason you are breaking them apart for?
    Greg McKaskle

  • Confused with one to many relationship

    Hi Masters ,
    Reading about one to many : i came across this
    Each row in Table A can have many (zero or more)
    matching rows in Table B but each row in Table B
    has only one matching row in Table A.
    A ZipCode can have many Students but each Student has only
    one ZipCode
    Theoritically this would be fine but can anyone please make tables for the above so i want to see it pratical work.

    zip
    (zipcode varchar2(6)
    , low_street_number varchar2(10)
    , high_street_number varchar2(10)
    , odd_even char(1)
    , city varchar2(30)
    , constraint zip_pk primary key (zipcode)
    student
    (studentno number(10)
    , firstname varchar2(30)
    , lastname varchar2(30)
    , zipcode varchar2(6)
    , constraint zip_fk foreign key(zipcode) references zip_pk
    Sybrand Bakker
    Senior Oracle DBA

  • SSAS 2008 snowflake - dimensions with one-to-many relationship (NOT fact table) and hierarchy?

    Hi, below is my data model for SSAS 2008 on snowflake schema.
    Below is SQL Server DW tables:
    DimStudent - StudentID [primarykey], StudentName, DateOfBirth, AddressID
    DimStudentAddresses - AddressID [primarykey], StudentID [foreignkey], ddressLine1, AddressLine2, AddressType
    FactEnrolment - StudentID, EnrolWeek, EnrolFees
    So here FactEnrolement.StudentID is joined to DimStudent.StudentID column,
    and relationship between DimStudent & DimeStudentAddresses is one to many I.e. one student can have multiple addresses like primary or secondry address.
    To design snowflake schema in SSAS 2008 BIDS project :
     [Question-1] how to join one-to-many dimensions (NOT fact table) Like DimStudent & DimAddresses?
     [Question-2] At the end I want to have a single dimension only I.e. Student which should have both DimStudent & DimStudentAddresses tables attributes init. So I can create hierarchy from these two table into a single dimension? How
    to do this?
    Please reply with feedback particular to my above scenario as I refereed other MSDN forums but nothing solid I found.
    Any STEP-BY-STEP guideline please. Many thanks.

    Hello KM,
    Have you solved this issue after refer to Bill's suggestion? Please let us know how things go.
    If you have any feedback on our support, please click
    here.
    Best Regards,
    Elvis Long
    TechNet Community Support

  • Formatting Issue - datatables with one to many relationship

    Hi...
    I am a newbie and I have designed a report in CR2008 and my datasource for the report is an XSD file. There are 2 tables Table A and B.
    Table A is as follows:
    AID     Name     Reference     Period          Manager
    5       Name 1     Ref 1          July 2009     User Name 1
    8     Name 2     Ref 2          August 2009     User Name 2
    9     Name 3     Ref 3          March 2009     User Name 9
    45     Name 4     Ref 4          May 2008     User Name 4
    88     Name 5     Ref 5          June 2009     User Name 1
    There are other coloumns too in the datatable, but that shouldnt matter.
    Table B is as follows:
    ID     A_ID     DateKey     DateValue          Name
    1     5     Date1     2009-09-29 00:00:00.000     Start Date
    2     5     Date2     2009-08-11 00:00:00.000     Fieldwork Complete
    3     5     Date3     2009-08-14 00:00:00.000     Report Issued
    4     5     Date4     2009-07-17 00:00:00.000     Report Finalised
    5     5     Date5     2009-07-10 00:00:00.000     Close Date
    6     8     Date1     2009-08-11 00:00:00.000     Start Date
    7     8     Date4     2009-09-29 00:00:00.000     Report Finalised
    I want the report to be in the following format:
    ID     Name     Reference     Period     Manager     StartDate     Fieldwork          ReportIssue     Finalised      Closed
    I have written a formula to display the date value where the date key matches for A_ID.
    But when I run the report I get the result as follows:
    ID     Name     Reference     Period     Manager     StartDate     Fieldwork          ReportIssue     Finalised      Closed
    5     Name1     Ref1          July 2009     UName 1     29/09/2009                                   
                                            11/08/2009                                                                                          14/08/2009                                                                                          17/07/2009                                                                                     10/07/2009     

    Hi
    I tried what you suggested, but it hasnt worked.
    In your code, you have used the date ID,
    if {b.id} = 1 then
      formula = {b.datevalue}
    end if
    but the table contains dates from several A_IDs, and I want to get the dates for the respective A_ID, So shouldnt I be matching the A_ID's first? I also dont understand how the max function helps here?
    My report is already grouped by Table A, ID.
    My report should be a join of the two tables, a left outer join to be exact.
    Also, if my XML data contains only one record for Table A, dates still come out in a separate line. I dont quite understand where the problem is?
    Thank you...

  • Issue with Master and child relationship,viewlink

    Hi Frnds,
    In one of our custom pages we have Master child relationship between Invoice lines and their distributions.
    Things work absolutely fine when total no of distributions(say 10) are equal to max no of distributions that can be shown on 1st page(i.e equal to advancetable property value 'Records displayed'..say set as 10)
    What happens is when in advance table I click on next button to navigate to next set of records and then edit some field that have any event..ppr or lov my control by default gets transferred to very first set of records.
    !!!!!!!!!!!!!! Also this happens only when no of invoice lines are more than 1.
    I not sure whether the issue is with VL,VO,AO or the advance table property.
    One simple solution that I have tried is...getting back the focus to the row that is updated but it causes some other problem.
    Any pointers will be very helpful
    Thanks in advance.

    Hi any help???

  • ADF Table filter issue with OR or AND input value

    Hi all,
    adf:table filterable fields for OR or AND input value not works. Actually One of column is for State and it has "OR" value for -> OREGON State.
    and I tried using filterModel and queryListener for table attribute. But I am not getting exact clue where I need to fix for this issue. Any suggestion and help is appreciated greatly.
    jdev version 11.1.1.3
    Thank you.
    - Robin

    Something like this might work for the one case:
    public void handleQuery(QueryEvent queryEvent){
        // Replace the OR with an equivalent condition
        Map m =
          ((FilterableQueryDescriptor) (queryEvent.getDescriptor())).getFilterCriteria();
        for (Map.Entry entry: (Collection<Map.Entry>) m.entrySet())
          if (entry.getValue() != null &&
              StringUtils.equalsIgnoreCase(entry.getValue().toString(), "OR"))
            entry.setValue("O AND _R");
        // Process The Query
        ELUtils.invokeMethod("#{bindings.VOQuery.processQuery}",
                             QueryEvent.class, queryEvent);
        // Put the OR back
        for (Map.Entry entry: (Collection<Map.Entry>) m.entrySet())
          if (entry.getValue() != null &&
              StringUtils.equalsIgnoreCase(entry.getValue().toString(),
                                           "O AND _R"))
            entry.setValue("OR");
    }

  • Design issue with threads ...

    Hello,
    I need your thoughts in how to proper use java threads in solving this issue:
    * I have an application that query a database for a list of users, and for each row retrieved from the database as a result the application should process that user and send him an email.
    Now the procdural approach for looping each user and send him an email at a time is not convinient as the number of users is big (20,000 users or more) so I thought of why not to use threads to send say every 300 user at a time (i.e, creating 300 threads), but the problem is that I cannot really figure how to manage those threads, to make sure that there are 300 threads are running all the time, and what if a thread was taking more time that the others ... etc.
    So, is this approach is the right one, and can you guide more more for how to control the threads this way, if not what do you suggest?
    Your guidance is highly appreciated,
    tamer

    I'm not sure that threads will help your cause. But they could. Let me explain:
    Threads have several purposes. Two instantly spring to mind:
    1. to make things faster.
    2. to (make it seem like you) do two (or more things) at once.
    First #2. This is often a usability issue. For example, a web server has to server multiple clients at the "same time". This is often done with threads - it gives the illusion that many concurrent users are supported. In reality the CPU/JVM is swapping beween the different requests. More CPUs allow for "realer" concurrency. Speed is only a by-product here.
    Now #1: Make things faster. Threading works well for speed when the tasks being done differ.
    For example, consider human multithreading: ask me to whistle for 5 seconds, and 5 seconds later I'll be done. Then ask me to scratch my head with both hands for 5 seconds, and 5 seconds later I'll be done. Total: 10 seconds. Ask me to do both at the same time. Result: 5 seconds later I'll have scratched my head and whistled for 5 seconds. 50% time saving.
    However, ask me to touch type for 5 seconds, and scratch my head for 5 seconds, it'll take 10 seconds or more. If you ask me to do one, then the other, I can spend 5 seconds at one then the other - total 10 seconds. Ask me to do both concurrently, and I'll take more than 10 seconds, as I'll be moving my hands back and forth from the keyboard to my head, and vice-versa.
    I have a feeling that running multiple threads in your case would be like asking you to scratch your head and scratch your head all at the same time. But this may not strictly hold true for several reasons:
    1. your DB should scale, i.e. handle two simultaneous requests faster than two concurrent requests. However, this will probably not be true of 300 simultaneous requests being faster than 300 concurrent (or 50 * 6-concurrent requests).
    2. if you are in a multi-CPU environment then some concurrentcy improvements would be expected (more hands for head scratching).
    3. your application does two things: reads a DB and sends a mail. While sending one mail, you should be albe to concurrently read the next record. i.e. concurrency is supported here, as you don't have resource contention here.
    So, you will probably get some benefit from threads. Adding too many will only slow you down, as there'll be too much time spend task switching, as you'll suffer resource contenion on the DB/mail server.
    I suggest that you run your program with several configurations, i.e. number of threads, and see what one gives the best results. For fast results, I'd suggests trying the following number of threads:
    1, 2, 4, 8, 16, 32, 64, 128, 256, ...
    when things start to slow down, you know where to search for your optimum thread number. You could also do with profiling your application if speed is a very pressing issue.
    Finally, one clarification: this is not OO. You could do multi-threading in a procedural environment.
    Good luck.
    if you are running on a multi-CPU environment, then the DB

  • Design issue with similar machines, but different Globals

    Hi,
    I know my questions about Global Variables has been up before, but maybe not in this kind of issue. The original coding has been done by someone else than me, but i want to change it. Now every machine has a folder and each folder consist of similar information as the next one. So there are 4 duplicate of every control and it's a nightmare to update the global variables in the total of around 200 files. I would like to combine the files so that only 1 file for "every action" would exist. So how should i do it. I have a few ideas but i would like to know how "the professionals" would do it.
    I've read that you should avoid of using a lot of Global Variables, but i don't know if in my case i can avoid them. Some of them could be removed when it's a realtime test that's going on and during the test you can open the attached VI, so how other could you transfer the information?
    System consist of:
    4 hardware test machines
    22 FP devices reading and writing
    ~50 Global Variables / per machine (50 variables per file, 1 file per machine)
    The attachments contines of one of the VIs that i'm working on. I'm not sure if you can open it because it contains many subVIs, but you get the picture of what i'm working with. So any ideas how to combine 4 same VIs with different Global Variables?
    Attachments:
    2.png ‏35 KB
    Temperature meas_1.vi ‏331 KB
    1.png ‏40 KB

    Hi Englund,
    you feed the cluster through the vi like your error cluster. In the subvi's you only unbundle/bundle the values you need!
    Example (Pretty silly, as the 'Select' operation isn't needed at all - I have to kill a student for that ) :
    The cluster 'Messvorschrift' contains about 50 values (partly in sub-clusters or arrays). You get the value needed for operation and write it back when needed.
    This scheme is pretty straightforward - but has a problem: it leeds to race conditions when you access your global several times in parallel!
    Then you should use a LV2-style global aka 'Action engine' - look for the last community nuggets in the forum!
    Message Edited by GerdW on 05-22-2007 09:22 AM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    Cluster.png ‏2 KB

  • Design Issue with using MDB

    Lack of timer services with EJB 2.0 dictated our design to implement MDB, since we really needed to use a timeout mechanism for the calling client. Client puts requests into the queue and after processing, the response object messages are put into the response queue owned by the client i.e client configured queue on the JMS server. This model works for the case where the client is a stateless session bean. Now the issue is that we having another client - web application this time, with a servlet pumping requests to the request queue . How do I retain the same model but send queued messages back to the web application? since a response queue cannot be owned by the app. or can it? is there a work around for this scenario..anyone faced a similar situation?

    May be I was not clear enough in my first explanation, Let me try again to explain my scenario:
    My Expectation from Multi Provider is :
    IObjectA
    1AAA
    (From InfoObject)
    Union
    IObjectA     IObjectB     IObjectC
    1AAA     2BBB     3CCC
    (From Cube)
    The record in the multiprovider should be :
    IObjectA     IObjectB     IObjectC
    1AAA     2BBB     3CCC
    Because, this is what the Union says .. and the Definition of the multiprovider also says the same thing :
    http://help.sap.com/saphelp_bw30b/helpdata/EN/ad/6b023b6069d22ee10000000a11402f/frameset.htm
    Do you still think this is how the behaviour of the multiprovider.. if that is the case what would be the purpose of having an infoobject in the multiprovider.
    Thank you very much in advance for your responses.
    Best Regards.,
    Praveen.

Maybe you are looking for