How to store two maps in Oracle

Greeting, folks,
This message is also refering to the previous topic: help: spatial indexing by QiangHan. Sorry for duplicates here.
Hi,
thanks Dan. It helps a lot.
Actually the thing I really want to do is to figure out what capabilities oracle can store more than one map in database.
If two maps have the same semantic structures and geographic properties, but cover different areas.
May I put all two maps' data into same tables I defined for them? For example, for tourist, I am trying to have two maps: one is for Washton, and the other one is New York, in US.
I have tables such as:
hotels, parks, road-network, attractions, restaurants, hosptials etc. Each of them have two things in common:
1. city id
2. sdo_geometry column
If I could have two maps' data stored in the same tables but distinguished by different city id, it would be great, because I don't need to make two DBs in order to manage them. Everything is under one framework. But when I run queries, I 'd like to use r-tree indexing and b-tree indexing on different data. One for spatial column,the other one for textural column. For b-tree indexing, it is easy to undstand. But for r-tree indexing, it seems a little bit tricky. More than one spatial indexes are required for the same column in one table. Am I right?
As you suggest, I could partition my tables by different id, like city id. Then spatial indexing can be built in different partitions. It would be a good idea to do that. I also agree on that coordinate system must be the same in two maps.
Here, I open this issue. If anyone is interested, please drop some lines. It would be grateful.
Thanks folks.

There is a simple image example available from OTN.
From the OTN main page, go to Products --> interMedia --> Sample Code. The name of the example is "Load rich media content with a browser."
This example loads and retrieves an image from an Oracle8i database through a web page using the Oracle interMedia Web Agent.
Hope this helps.
null

Similar Messages

  • How to store the images in Oracle?

    Hi,
    I am a new developer, trying to find out how to store the images in Oracle. Is there anyway that I can store the images in Oracle and insert them into my html file?
    Thanks!
    Sarah

    There is a simple image example available from OTN.
    From the OTN main page, go to Products --> interMedia --> Sample Code. The name of the example is "Load rich media content with a browser."
    This example loads and retrieves an image from an Oracle8i database through a web page using the Oracle interMedia Web Agent.
    Hope this helps.
    null

  • How to store image in the oracle database 10.2. using File Maker 10.

    Hi.,
    I want to store image, media file in the oracle database using File Maker as a front end.
    I connect Oracle using odbc from file maker. There are table and in that table there a column "pict" of blob type. but this column is not showing in the file maker.
    2. Here I can not change the data type of any column.
    Now how to store images in the oracle table using odbc or any other tool.
    Regards,
    Shyam

    I wrote an example for my students, you can find it here. It's using PHP as the front end but all you need to do is know how and leverage the stored procedures. All code is downloadable in zip files from the blog.
    http://blog.mclaughlinsoftware.com/php-programming/oracle-lob-processing/

  • How to connect google maps with oracle

    Hello people ,
    i read an artical there is a way to connect google maps with oracle .
    can anyone give us lesson or more information to do that ?
    regards .

    I guess, using Google for the same should be the best way to find the solution for it,
    http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=How+to+connect+google+maps+with+oracle
    HTH
    Aman....

  • How to store .doc file in oracle using jdbc

    Here is problem , storing microsoft excel file (or) .txt file to database(ORACLE) through JDBC .
    how to retrive

    Congratulations! You are the one millionth person to ask how to store files in databases without searching for previous threads.
    What do you win?
    A hearty smack in the forehead and a strenuous endorsement to use Google, search and find the answer.

  • How to store java object in oracle

    Hi all,
    is it possible to store jva object in oracle.
    I have defined myClass. It have only data fields ( no methods).
    I make myClass myObject = new myClass();
    How can I store this object in oracle DB.
    Many thanks in advance.

    1.Convert this object into stream of Bytes.
    2.create a new InputStream from these Byte array.
    2.Use the setBinaryStream to set the values inside the table's column.
    3.Store this object as a Blob in the table (column type must be Blob).
    Hope this helps.
    Sudha
    PS:- Somebody explained in this forum how to convert an Object into Byte array .

  • How to Store word doc in oracle  using java

    hi
    toall
    can any one tell me how to store word doc in oracle9i using java
    bye

    Please refer to
    http://www.databasejournal.com/features/oracle/article.php/3305771

  • How to store two signatures in adobe reader

    im trying to store two signatures in my adobe reader but im not sure how to. i dont want to delete my signature thats already there.
    can anyone help??

    Hello,
    Please see this link - Adobe Acrobat X Standard * Signing PDFs
    It may help!!!
    Regards,
    Deepak

  • How to store XML data into Oracle Table

    I had trouble to store XML data into Oracle Table with XDK (Oracle 8.1.7 ). The error is:
    C:\XDK_Java_9_2\xdk\demo\java\Test>java testInsert Dept.xml
    <Line 1, Column 1>: XML-0108: (Fatal Error) Start of root element expected.
    Exception in thread "main" oracle.xml.sql.OracleXMLSQLException: Start of root element expected.
    at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2263)
    at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1333)
    at testInsert.main(testInsert.java:8)
    Here is my xml file:
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1">
    <DEPTNO>10</DEPTNO>
    <DNAME>ACCOUNTING</DNAME>
    <LOC>NEW YORK</LOC>
    </ROW>
    <ROW num="2">
    <DEPTNO>20</DEPTNO>
    <DNAME>RESEARCH</DNAME>
    <LOC>DALLAS</LOC>
    </ROW>
    <ROW num="3">
    <DEPTNO>30</DEPTNO>
    <DNAME>SALES</DNAME>
    <LOC>CHICAGO</LOC>
    </ROW>
    <ROW num="4">
    <DEPTNO>40</DEPTNO>
    <DNAME>OPERATIONS</DNAME>
    <LOC>BOSTON</LOC>
    </ROW>
    </ROWSET>
    and here is structure of table:
    Name Null? Type
    DEPTNO NOT NULL NUMBER(2)
    DNAME VARCHAR2(14)
    LOC VARCHAR2(13)
    and here is my Java Code:
    import java.sql.*;
    import oracle.xml.sql.dml.OracleXMLSave;
    public class testInsert{
         public static void main(String[] args) throws SQLException{
              Connection conn = getConnection();
              OracleXMLSave sav = new OracleXMLSave(conn,"scott.tmp_dept");
              sav.insertXML(args[0]);
              sav.close();
              conn.close();
         private static Connection getConnection()throws SQLException{
              DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
              Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@amt-ebdev01:1521:mydept","scott","tiger");
              return conn;
    Could you help me ? Thanks !

    The problem is that you need to pass avalid URL , Document...
    Please try this code instead:
    import java.net.*;
    import java.sql.*;
    import java.io.*;
    import oracle.xml.sql.dml.OracleXMLSave;
    public class testInsert
    public static void main(String[] args) throws SQLException{
    Connection conn = getConnection();
    OracleXMLSave sav = new OracleXMLSave(conn,"scott.temp_dept");
    URL url = createURL(args[0]);
    sav.insertXML(url);
    sav.close();
    conn.close();
    private static Connection getConnection()throws SQLException{
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@dlsun1982:1521:jwxdk9i","scott","tiger");
    return conn;
    // Helper method to create a URL from a file name
    static URL createURL(String fileName)
    URL url = null;
    try
    url = new URL(fileName);
    catch (MalformedURLException ex)
    File f = new File(fileName);
    try
    String path = f.getAbsolutePath();
    // This is a bunch of weird code that is required to
    // make a valid URL on the Windows platform, due
    // to inconsistencies in what getAbsolutePath returns.
    String fs = System.getProperty("file.separator");
    if (fs.length() == 1)
    char sep = fs.charAt(0);
    if (sep != '/')
    path = path.replace(sep, '/');
    if (path.charAt(0) != '/')
    path = '/' + path;
    path = "file://" + path;
    url = new URL(path);
    catch (MalformedURLException e)
    System.out.println("Cannot create url for: " + fileName);
    System.exit(0);
    return url;

  • How to store image files in oracle DB

    Hi,
    I am new to working with database.
    Please let me know how to store image files in Database using insert command.
    Thanks,
    Ramesh Yakkala.

    Hi,
    You need to create a directory object to import these files:
    Take a look on the example below:
    eg:
    CREATE TABLE MY_IMAGE_TABLE (
    ID NUMBER,
    NAME VARCHAR2(20),
    IMAGE BLOB);
    CREATE OR REPLACE DIRECTORY IMAGES AS '/tmp';
    GRANT READ, WRITE ON DIRECTORY IMAGES TO PUBLIC;
    CREATE OR REPLACE PROCEDURE load_file_to_my_table (p_file_name IN MY_IMAGE_TABLE.NAME%TYPE) AS
    v_bfile BFILE;
    v_blob BLOB;
    BEGIN
    INSERT INTO MY_IMAGE_TABLE (id, name, image)
    VALUES (1, p_file_name, empty_blob())
    RETURN doc INTO v_blob;
    v_bfile := BFILENAME('IMAGES', p_file_name);
    Dbms_Lob.Fileopen(v_bfile, Dbms_Lob.File_Readonly);
    Dbms_Lob.Loadfromfile(v_blob, v_bfile, Dbms_Lob.Getlength(v_bfile));
    Dbms_Lob.Fileclose(v_bfile);
    COMMIT;
    END;
    SQL> execute load_file_to_my_table('myfhoto.jpg');Cheers

  • How to merge two maps in a single map

    i have two maps existing. i want to merge both the maps into a single map through coding. do we have any function which can solve this problem. If not then please provide me some suggestions to solve this problem.
    thanks,
    amit

    Amit,
    I did this once using the HashMapUtils found in the apache myfaces code...
    package se.inserve.util;
    import java.util.HashMap;
    import java.util.Map;
    import java.util.Set;
    import java.util.Iterator;
    public class HashMapUtils
        //~ Constructors -------------------------------------------------------------------------------
        protected HashMapUtils()
            // block public access
        //~ Methods ------------------------------------------------------------------------------------
         * Calculates initial capacity needed to hold <code>size</code> elements in
         * a HashMap or Hashtable without forcing an expensive increase in internal
         * capacity. Capacity is based on the default load factor of .75.
         * <p>
         * Usage: <code>Map map = new HashMap(HashMapUtils.calcCapacity(10));<code>
         * </p>
         * @param size the number of items that will be put into a HashMap
         * @return initial capacity needed
        public static final int calcCapacity(int size)
            return ((size * 4) + 3) / 3;
         * Creates a new <code>HashMap</code> that has all of the elements
         * of <code>map1</code> and <code>map2</code> (on key collision, the latter
         * override the former).
         * @param map1 the fist hashmap to merge
         * @param map2 the second hashmap to merge
         * @return new hashmap
        public static HashMap merge(Map map1, Map map2)
            HashMap retval = new HashMap(calcCapacity(map1.size() + map2.size()));
            retval.putAll(map1);
            retval.putAll(map2);
            return retval;
         * spit out each name/value pair
        public static String mapToString(Map map){
            Set entries = map.entrySet();
            Iterator iter = entries.iterator();
            StringBuffer buff = new StringBuffer();
            while (iter.hasNext())
                Map.Entry entry = (Map.Entry) iter.next();
                buff.append("[" + entry.getKey() + "," + entry.getValue() + "]\n");
            return buff.toString();
    }Then then just calling the methods from within a rule in XPRESS.
    <Rule name='Inserve - mergeHashMap'>
      <RuleArgument name='map1'/>
      <RuleArgument name='map2'/>
      <block>
        <set name='map1'>
          <map>
            <s>A</s>
            <s>1</s>
            <s>B</s>
            <s>2</s>
          </map>
        </set>
        <set name='map2'>
          <map>
            <s>C</s>
            <s>3</s>
            <s>D</s>
            <s>4</s>
          </map>
        </set>
        <invoke name='merge' class='se.inserve.util.HashMapUtils'>
          <ref>map1</ref>
          <ref>map2</ref>
        </invoke>
      </block>
      <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
      </MemberObjectGroups>
    </Rule>This gives the output:
    <Map>
      <MapEntry key='A' value='1'/>
      <MapEntry key='B' value='2'/>
      <MapEntry key='C' value='3'/>
      <MapEntry key='D' value='4'/>
    </Map>I typically create a jar-file with my custom classes which i place in $WSHOME/WEB-INF/lib.
    Good luck and hope this helps. Im sure there are better ways to do this, but this did the trick for me.
    /Anders

  • How to store image in the oracle database 10.2.

    Hi.,
    I am working on 10g ids. I have designed a form where there are two fields. Name and picture.
    I want to keep details of the person with their photo.
    I can simply put name but how to insert image in the picture field??
    can you suggest ??
    Thanks.
    Shyam

    Hi
    To store your binary images in an Oracle database, you will need to create a column in your table defined with the BLOB datatype BLOB stands for Binary Large Object. Images from scanners, mpeg files, movie files and so on can all be stored in the BLOB column
    sq>CREATE TABLE test_table (
       id NUMBER,
       image BLOB);then go to
    [http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10796/toc.htm]

  • How to compare two xmltypes in oracle 10g ?

    Hi,
    I have a requirement that i have to compare two xmltypes of a table.
    Is there any function available in oracle 10g that compares two xmltypes.
    Regards
    Krishna

    This can help for this question
    Re: Help needed !  How to find out 'XML Difference' using XDK

  • How to store Html File in Oracle Table?

    Hai,
    I want to store Html File(s) into oracle Table. How can I do it?.
    Please help me. Html File size can be maximum 40 MB .
    Regards
    Suresh

    If it's just pure HTML it's nothing more than astring so you could store it as such.
    Most databases have a limitation on the maximum number
    of characters that a string can hold. With 30MB of
    text, a CLOB (Character Large OBject) is the
    preferrable type but a BLOB (Binary Large OBject) can
    also be used.
    ;o)
    V.V.Right, right. But, I kind of doubt that an html file takes up 30MB, can you imagine browsing a web site, regardless of your connection, with pages that size? We're talking ~125,000 line of pure HTML code (no images)!

  • How to store an image in oracle table

    hi
    i have created table,in that i want to store an imege(it may be any form of image like jpeg,bmp and so)
    i need coding for that in sql

    depends where are your images and how you will store it.
    you need some front end application to read the images and store it in the tables.
    eg Oracle Forms (READ_IMAGE_FILE), Java.
    if not place the images on the databas server.
    create directory objects for the path on which the images are there.
    use DBMS_LOB to read the files and save to the database tables.

Maybe you are looking for

  • End Routine - Modify a record in the cube

    Hello Guys, In the end routine I have to update a field . The transformation is the same cube to the cube. I want the record to be modified like add a value to a field in the end routine. Since it is a cube it creates a new record instead of overwrit

  • Link Sales Order & Purchase Order in Reports

    Hi All, We create all our Purchase Order's back-to-back to our Sales Orders. When we look at Row Details in a Sales Order we can see the linked Purchase Order, and vice versa. Is it possible to run a Query that will show the list of Sales Orders (all

  • Library won't play more than one song at a time

    What gives? My iTunes suddenly won't play a sequence of songs. Not from the library as a whole, not from any playlist. The files are all still there and I can highlight and play any ONE, but iTunes won't then go on to the next. Tried 'select all', th

  • Spotlight serch not working properly

    Dear all.. I do not exactly know when this problem start, cuold be a cost of a server or client update. But suddenly the search with Spotlight from a OSX 10.5.8 on a 10.5.7 OSX Server does not find the file I am shure are in the server, in folder abv

  • Problems opening PDF files from Websites

    I just had the contents of my (dying) ibook transferred onto my emac. The tech created a new user/desktop on the emac. Now, when I try to open PDF files from a website, I get a window saying this: "Downloading - users/myname/desktop/xxxxx.pdf could n