title: How to create index on type object?
body: <p>Currently i'm working with type object in oracle 11g. In this i have DB objects as follows:</p>
  
  <ol>
  <li><p>table</p>
  
  <pre><code>CREATE TABLE students
    (rollno NUMBER(15) primary key, s_Name VARCHAR2(20), Marks type_1
    );
  </code></pre></li>
  <li><p>Type object specification is</p>
  
  <pre><code>CREATE OR REPLACE type type_1
  AS
    object
    (
      sub_1 NUMBER,
      sub_2 NUMBER,
      sub_3 NUMBER,
      member FUNCTION total
      RETURN NUMBER,
      member FUNCTION e_result
      RETURN VARCHAR2);
  </code></pre></li>
  <li><p>It's body</p>
  
  <pre><code>CREATE OR REPLACE type body type_1
  AS
    member FUNCTION total
    RETURN NUMBER
  IS
  BEGIN
    RETURN (sub_1+sub_2+sub_3);
  END;
  member FUNCTION e_result
    RETURN VARCHAR2
  IS
    DECLARE
      temp NUMBER;
    BEGIN
      temp  :=sub_1+sub_2+sub_3;
      IF(temp&gt;50) THEN
        RETURN ('pass');
      ELSE
        RETURN ('fail');
      END IF;
    END;
  END;
  </code></pre></li>
  </ol>
  
  <p>After create all these thing even I've successfully populated the student table using </p>
  
  <pre><code>BEGIN
  FOR i IN 1..800 LOOP
          FOR j IN 1..400 LOOP
  INSERT INTO students
  VALUES     (sequence1.NEXTVAL,
              dbms_random.String('A', 5),
              Type_1(Round(dbms_random.Value(10, 100)), Round(
              dbms_random.Value(10, 100)), Round(dbms_random.Value(10, 100))));
  END LOOP;
  END LOOP;
  
  dbms_output.Put_line('completed');
  
  COMMIT;
  END;
  
  / 
  </code></pre>
  
  <p>I need to create bitmap index on <code>e_result</code> column and normal index on <code>tot</code> column. </p>
  
  <p>I have tried </p>
  
  <pre><code>create index id1 on students(marks.total)
  </code></pre>
  
  <p>and </p>
  
  <pre><code>create bitmap index bid1 on students(marks.e-result)
  </code></pre>
  
  <p>But I can't. What am I supposed to do?</p>