Which is better:search JTables or search Database tables?

greetings all
i have UI With many jtables,every jtable reads data from it's own table in a MySQL database
and i want to make a search mechanism in a specific column in all the tables
and once item is found the row is highlighted.
i made it with two ways:
1-make for loop in each jtable and once item is found , current loop is exited and other loops are not entered
2-make connection with the database
and create several resultsets ,every resultset execute a select query on the desired item
and if one of the Resultsets returns data means item is found then i highlight it in the equivalent jtable.
i executed the two ways and felt no difference in the speed of finding item
but i want to know what is the best way of them or in general,as better design or in case of large applications?
thanks in advance

first_knight, you have no bloody idea what you're doing.
you're asking if it's better to search on the client or the server.
this suggests to me that the entire contents of the database are brought down to the client. this is usually a bad idea except for very small data sets. in that case, it doesn't matter where you do it.
if you have lots of data, it's best to let the database do it. first, it will actually have all the data. second, it's been optimized to do searches faster than any code you'll ever write.
either way, judging from your questions here you'll never get either one to work.
%

Similar Messages

  • Which is better for performance Azure SQL Database or SQL Server in Azure VM?

    Hi,
    We are building an ASP.NET app that will be running on Microsoft Cloud which I think is the new name for Windows Azure. We're expecting this app to have many simultaneous users and want to make sure that we provide excellent performance to end users.
    Here are our main concerns/desires:
    Performance is paramount. Fast response times are very very important
    We want to have as little to do with platform maintenance as possible e.g. managing OS or SQL Server updates, etc.
    We are trying to use "out-of-the-box" standard features.
    With that said, which option would give us the best possible database performance: a SQL Server instance running in a VM on Azure or SQL Server Database as a fully managed service?
    Thanks, Sam

    hello,
    SQL Database using shared resources on the Microsft data centre. Microsoft balance the resource usage of SQL Database so that no one application continuously dominates any resource.You can try the 
    Premium Preview
    for Windows Azure SQL Database which offers better performance by guaranteeing a fixed amount of dedicated resources for a database.
    If you using SQL Server instance running in a VM, you control the operating system and database configuration. And the
    performance of the database depends on many factors such as the size of a virtual machine, and the configuration of the data disks.
    Reference:
    Choosing between SQL Server in Windows Azure VM & Windows Azure SQL Database
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here. 
    Fanny Liu
    TechNet Community Support

  • Which is better to install Oracle 11g database based on ASM or Filesystem

    We will install 2 sets of Oracle 11.2.0.3 on Redhat Linix 5.6 and configure Data Guard for them further -- one will be a primary DB server, the other will be a physical standby DB server. The Oracle DB stoage is based on SAN Array Disk with 6TB size. Now there are two options to manage the DB datafiles:
    1. Install Oracle ASM
    2. Create the tranditional OS filesystem
    Which is better? in the past, our 10g data guard environment is not based on Oracle ASM.
    Someone think if we adopt the oracle ASM, the shortcomings are :
    1. as there is one more instance that will consume more memory and resource.
    2. as the ASM file system cannot be shown out on the OS level directly such as "df" command, the disk utilization monitor job will be more difficult. at least it cannot be supervised at OS level.
    3. as the DB bshoule be done the daily incremental backup (Mon-Sat) to Local Backup Drive. the bakup job must be done by RMAN rather than user-managed script.
    Who can provide some advices? Thanks very much in advance.

    user5969983 wrote:
    We will install 2 sets of Oracle 11.2.0.3 on Redhat Linix 5.6 and configure Data Guard for them further -- one will be a primary DB server, the other will be a physical standby DB server. The Oracle DB stoage is based on SAN Array Disk with 6TB size. Now there are two options to manage the DB datafiles:
    1. Install Oracle ASM
    2. Create the tranditional OS filesystem
    Which is better? in the past, our 10g data guard environment is not based on Oracle ASM. ASM provides a host of new features ito data management, and performance - to the extent that you can rip out the entire existing storage system, replace it with a brand new storage system, without a single second of database downtime.
    Someone think if we adopt the oracle ASM, the shortcomings are :
    1. as there is one more instance that will consume more memory and resource.Not really relevant on 64bit h/w architecture that removes limitations such a 4GB of addressable memory. On the CPU side... heck, my game PC at home has a 8 core 64bit CPU. Single die and dual core CPUs belong to the distant past.
    Arguing that an ASM instance has overheads would be silly. And totally ignores the wide range of real and tangible benefits that ASM provides.
    2. as the ASM file system cannot be shown out on the OS level directly such as "df" command, the disk utilization monitor job will be more difficult. at least it cannot be supervised at OS level.That is a A Very Good Thing (tm). Managing database storage from o/s level is flawed in many ways.
    3. as the DB bshoule be done the daily incremental backup (Mon-Sat) to Local Backup Drive. the bakup job must be done by RMAN rather than user-managed script.
    rman supports ASM fully.
    I have stopped using cooked file systems for Oracle - I prefer ASM first and foremost. The only exceptions are tiny servers with a single root disk that needs to be used for kernel, database s/w, and database datafiles. (currently these are mostly Oracle XE systems in my case, and configured that way as XE does not support ASM and is used as a pure cost decision).

  • Which is better a new schema or adding tables in the existing schema

    Hi All,
    We have a new requirement from the client asking us to include a few new functionalities(pages--- all together a new application has to be embedded into our application) in our application. By adding these new functionalities, the number of hits to our application can be doubled.
    As per the above requirement, I would like to know that whether to create a new schema or to create some new tables in the existing database for the new functionalities.
    By what way, can I handle the number of requests in a better way? by creating the new schema or by creating the new tables for the new functionalities.
    Also I would like like to know what kind of factors will differ between creating a new schema or creating new tables for the new functionalities in the existing schema.
    FYI... We are using Cold Fusion as front-end and Oracle 9i for back-end

    I agree with VD in that it all depends on how closely the new features ties into your existing application structure.
    The second major factor to consider is since you mention "for client" is if your application has more than one client and if you will be rolliong this feature into the application for all clients. If you have multiple clients but only this one gets this feature then it may make more sense to use a second schema, but it really depends on how easy to identify and separate this feature's objects for the purpose of maintaining it through future upgrades is going to be.
    HTH -- Mark D Powell --

  • Search static pages AND database tables

    Hi,
    I'm working on a project in which I have static content
    pages, plus I'm creating a set of dynamic pages that display jobs
    and events listings etc. The dynamic pages are going to run off an
    access database.
    I'm need to create a search facility on the site. At present
    I'm planning to use a drop down box (or radio buttons ?) to allow
    the user to select which part of the site to search (main site,
    jobs or events), the selection will determine which search page the
    form query is passed to (site text search or database query search
    page).
    Am I approaching this correctly.
    Can anyone comment on possibly a better or alternative way of
    providing such a search option ? (searching both static pages and
    database tables)
    Thanks in advance.

    I guess something like <cffile action="read"
    file="C:\docs\shopping.html" variable="shoppingList">. Is there
    a way to do multiple files at once?

  • Bug in the  search database of Javahelp

    Hi all,
    in this project I am importing from Framemaker and generating Javahelp output. The Javahelp does not work when there are non-ASCII characters in the topic filenames (such as accents or umlauts). Therefore I have to adjust the file naming in the imort settings to "<$filename_no_ext>-<n>". As a result I get topics with numbered filenames and all seems well.
    BUT with this setting the Javahelp displays the totally cryptic filenames of the topics as search results. Why does Robohelp not create a search database with the topic titles as search results?
    How do you handle Javahelp projects for non-english languages?
    Robert

    I have the same problem. I have a registered domain name which contains a "-" character. Its not possible to set it correctly because it is filtered out. A "-" is an valid part of a domain name so why it is filtered? I have tried to edit the bootpd.plist file, but its getting overidden after a few seconds.
    Could anyone help? A fix is absolutely necessary, without it I have to change the search domain on all client computers.

  • How to search Database in JSP using LIKE

    hi can anyone tell me is there any other syntax for Query when we use LIKE to search database in which suppose
    String para = request.getParameter("name");
    Select name,surname From user where name LIKE '"+para+"';

    hi,
    which database are you using, some require you to put % sign with like
    e.g. select xyz from table abc where xyz like '%"+para+"%'

  • Implementing Search functionality on Database Table

    Hi Experts,
    I am working with webcenter sites 11gR1.
    I would like to implement search functionality in our Site on a  Specific DataBase table.
    could you please let us know the best solution.
    Thanks in Advance
    Rajendar Pilli.

    Hi Jay,
    Thanks for your response and help. 
    1)Both the ways are fine with me. Could you please suggest me know the best way.
    2)And, if i want search on a  table which is not an "AssetType" table , is it possible?
    (Means,i want implement one search in my site that can search the data only in non Assettype table).
    Could you please provide your valuable help ASAP.
    Thanks in Advance,
    Rajendar Pilli.

  • Search for data within a database table

    Hi everyone :)
    I'm trying to make it so that the user can search for a record by id #. So, i made an input dialogue thing so the user can enter a record #. Basically, i want the data to appear in their textboxes based on the record # inputted by the user. My attempt is shown below, and when I run it, I get this:
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
    Here's my code:
    public JButton getSearch()
              if (search==null)
                   search = new JButton("Search Database");
                   search.addActionListener
                        new ActionListener()
                             public void actionPerformed(ActionEvent ae)
                                  try
                                       String str_rec =
                                            JOptionPane.showInputDialog(
                                                 getFrame(),"Enter Record No");
                                       int recNo = 0;
                                       try
                                            recNo =
                                                 Integer.parseInt(str_rec);
                                       catch (NumberFormatException nfe)
                                            return;
                                       String select = "SELECT studId,studFirstName,studLastName " +
                                       "FROM Students " +
                                       "WHERE studId = '" + recNo + "' ";
                                       Statement statement = getConnector().getConnection().createStatement();
                                       ResultSet result = statement.executeQuery(select);
                                       System.out.println(recNo);
                                       getView().getId().setText(str_rec);
                                       getView().getFirstName().setText(result.getString("studFirstName"));
                                       getView().getLastName().setText(result.getString("studLastName"));
                                  catch (Exception e)
                                       e.printStackTrace();
              return search;
         }I hope I explained everything properly. If you could please help me, I'd very much appreciate it.
    Thanks in advance! :)
    - spidey

    "WHERE studId = '" + recNo + "' ";Why are you putting quote marks around a number? What type of database column is studId? Probably a numeric type (not character), right? Quotes go around string/character stuff, not numeric stuff.

  • Search help for A field in select option which doesnt have search help in c

    u have table in QM which is QMFE in whihc field FECOD which doesnt have search help , but my requirement is that in select option in report to have users to see its search help, anyone there to help me

    Hi sridhar loganathan,
    For this goto SE11 and create a ZFECOD Search help for that field. In Defination Tab enter table name
    QMFE and Enter Z_F4_FECOD_EXIT in Search help Exit.
    Then create a FM in SE37 as Z_F4_FECOD_EXIT under a FG. And then write code as follows for example: 
    FUNCTION Z_F4_REG_EXIT.
    ""Local Interface:
    *"  TABLES
    *"      SHLP_TAB TYPE  SHLP_DESCR_TAB_T
    *"      RECORD_TAB STRUCTURE  SEAHLPRES
    *"  CHANGING
    *"     VALUE(SHLP) TYPE  SHLP_DESCR_T
    *"     VALUE(CALLCONTROL) LIKE  DDSHF4CTRL STRUCTURE  DDSHF4CTRL
      TYPES: begin of ty_code,
              dam_code type  QMFE-FECOD ,
            end of ty_code.
      DATA : tw_code type ty_code,
             ta_code type table of ty_code.
       IF  "callcontrol-step <> 'SELONE' AND
            callcontrol-step <> 'SELECT' AND
            callcontrol-step <> 'DISP'.
          EXIT.
        ENDIF.
       IF callcontrol-step = 'SELECT'.
          CALL FUNCTION 'F4UT_PARAMETER_ALLOCATE'
            EXPORTING
                 PARAMETER         = 'FECOD'
            TABLES
                 SHLP_TAB          = shlp_tab
                 RECORD_TAB        = record_tab
            CHANGING
                 SHLP              = shlp
                 CALLCONTROL       = callcontrol
            EXCEPTIONS
                 OTHERS            = 3.
       ENDIF.
       IF callcontrol-step = 'DISP'.
    Get the Region
          CALL FUNCTION 'F4UT_PARAMETER_VALUE_GET'
             EXPORTING
                  PARAMETER         = 'FECOD'
                  FIELDNAME         = 'FECOD'
             TABLES
                  SHLP_TAB          = shlp_tab
                  RECORD_TAB        = record_tab
                  RESULTS_TAB       = ta_code
             CHANGING
                  SHLP              = shlp
                  CALLCONTROL       = callcontrol
             EXCEPTIONS
                  PARAMETER_UNKNOWN = 1
                  OTHERS            = 2.
           IF SY-SUBRC = 0.
              SORT TA_CODE BY DAM_CODE.
    Deleting duplicate damage codes in Internal Table ta_code
              DELETE ADJACENT DUPLICATES FROM TA_CODE COMPARING DAM_CODE.
    Passing changed Internal table to FM
              CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
              EXPORTING
                 PARAMETER         = 'REGION'
                 FIELDNAME         = 'REGION'
              TABLES
                 SHLP_TAB          = shlp_tab
                 RECORD_TAB        = record_tab
                 SOURCE_TAB        = ta_code
              CHANGING
                 SHLP              = shlp
                 CALLCONTROL       = callcontrol
              EXCEPTIONS
                 PARAMETER_UNKNOWN = 1
                 OTHERS            = 2.
           ENDIF.
       ENDIF.
    ENDFUNCTION.
    Revert me for any clarifications.
    Regards,
    Suneel G.

  • Which is better? Extracting images from directories or from database?

    Good day,
    I would like to start a discussion on extracting image (binary data) from a relational database. Although some might say that extracting image from directories is a better approach, I m still sceptic on that implementation.
    My argument towards this is based on the reasonings below:
    1. Easier maintainence. - System Administrator can do backup from one place which is the database.
    2. High level of security - can anyone tell me how easy it is to hack into a database server?
    3. image is not dependent on file structure - no more worries about broken links because some one might mistakenly change the directory structure. If there needs to be a change, it will be handle efficiently by the database server.
    The intention of my question is to find out :
    1. Why is taking image from a directory folder which resides on the web server is better than using the same approach from the database?
    2. How is this approach (taking image from directory) scalable if there is thousands of images and text that needs to be served?
    If anybody would be kind enough to reply, I would be most grateful.
    Thank You.
    Regards
    hatta

    Databases are typically more oriented towards text and number content than binary content, I believe. If you carry images in the database you will need to run them through your code and through your java server before they are displayed. If they are held in a directory they will be called from hrefs in the produced page, which means that they are served by your static server. This is quicker because no processing of the image is required. It also means the Database has to handle massively less data. Depending on the database this should be far quicker to query.
    It is worth noting that it is also quite difficult to actually change mime-types on a page to display a picture in the midst of HTML- the number of enquiries on these pages about this topic should be enough to illustrate this.
    If you give over controls of all the image file handling to your java system (which I do when I write sites like the one you describe) then the actual program knows where to put the images and automatically adds them to the database. The system administrator never needs to touch them. If they want a backup they save the database and the website directory. The second of those should be a standard administrative task anyway, so there is not a huge difference there. The danger of someone accidentally changing the directory structure is no greater than the danger of someone accidentally dropping a database table- it can be minimised by making sure your administrators are competent. Directory structures can be changed back, dropped tables are gone.
    The security claim is slightly negated because you still have to run a webserver. Every program you run on your server is vulnerable to attack but if you are serving web pages you will have a server program that is faster than a database for image handling. You are far more at risk from running FTP or Telnet on your server or (worst of all) trying to maintain IIS.
    The images in directory structure is more scalable because very large databases are more likely to become unstable and carrying a 50k image in every image field rather than 2 bytes of text will make the database roughly 25000 times larger. I have already mentioned the difference in serving methods which stands in favour of recycling images. A static site will be faster than a dynamic site of equivalent size, so where you can, take advantage of that.

  • Which is better? store files in the database or directly on the O.S.?

    Hi,
    i´m developing an application to manager files. which is better? store files in the database or directly on the O.S.? If i decide to store on database, i will use the BLOB data type but i have a doubt...the BLOB data type occupies the same space on database regardless of file size? there is another data type better?
    Tks,
    Fernando.

    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1011065100346196442
    Ask Tom has a bit of info to share on the topic. Have a read of this. :)

  • Which is better External View OR Database procedure Proxy ?

    Hi Jasmin and Kilian,
    Creation of External View in HANA and consume in ABAP.
    Which is better External View OR Database procedure Proxy.
    Regards,
    Pravin
    Message was edited by: Jens Weiler
    Branched from http://scn.sap.com/thread/3498161

    Hi Pravin,
    that depends on your application logic and use case. There is no general recommendation for one or the other.
    If, for instance, you have input parameters, you would go for a DB procedure proxy, since the external view does not allow to pass input parameters from the ABAP to the HANA column view.
    On the other hand, if you would like to consume the result in an ALV with integrated data access (the "next generation ALV"), you would rather go for an external view... so - like the answer to so many other questions - it depends... .
    Cheers,
      Jasmin

  • LOve Firefox but it's annoying that if I'm using a search engine (I use lots of subscription legal search databases), when I press the back button all the data I entered in the search boxes has disappeared. I'm sure Firefox didn't use to do that?

    Love Firefox but it's annoying that if I'm using a search engine (I use lots of subscription legal search databases), when I press the back button all the data I entered in the search boxes has disappeared. I'm sure Firefox didn't use to do that?

    Please do the following.<br><br>
    #Click the Firefox button, go to '''Options '''| '''Options''' | '''Privacy'''.<br><br>
    #In the dropdown menu at the top, change it to "'''Use custom settings for history'''"<br><br>
    #Checkmark the option: "'''Remember Search and Form history'''".<br><br>
    #Remove the checkmark from: "'''Clear history when Firefox closes'''".

  • How do I index a new search database?

    I want to create a robot and run it against a URL and build an index( RDs), on my own defined search database. But only the default database get's indexed.
    How do I point my Robot to my new defined search database?
    Also I would like to be able to index a file system (a directory that contains only XML files). I have already created my filter specifying to allow any file with the extension .xml. but it doesn't seem to work? What do I need to do?
    Thanks.

    I think I understand what you are trying to do. I assume that you have created a new database from the admin console, and now you want to use the robot to index that database?
    If that's the case you should be able to specify the database to populate, when defining a site for the robot to crawl. The option to set the database to populate is right at the bottom of the screen of the site editor, after the filter definitions and the advanced option.
    Hope this helps.

Maybe you are looking for

  • Update a field multiple times, but only if the field is empty

    I am having trouble updating a field in my table based upon a set of 7 different rules. I have been scratching my head at this for a few days, and am not sure what exactly is wrong, but am sure there is something small causing me problems. My current

  • Does the Sennheiser MM50 work with Voice Control?

    I'm not double posting -- over at "using 3Gs" I asked if anyone had any idea what other earphones I could use with voice control, but after researching these Sennheiser MM50 iP phones look like just the ticket... except I'm not sure they work with th

  • Transaction handling in sender JDBC adapter

    Hello, In a scenario where a third party application updates a field (counting it up) and we pick up these counts and zero out the field with the sender JDBC adapter, we would like that the third party application is not able to update while the JDBC

  • Is two company codes required?

    Hi Experts, Business process is, our company is going to construct a project in US. Onece the project is completed, all the operations may close in US. Company base location is India. for the above scenario, We need to create two company codes?, if n

  • Slow moving iPad 2 (kind of)

    Hello I have an iPad 2 for 4 months now, and I've added several music, apps, videos and other media in the device. And I've realized last week that my iPad 2's startup (from sleep) / opening, is slow for my opinion (1 second just after clicking home