1

I am new to oracle. I wanted a huge sample database ( with a million tuples ) . I couldn't find any using google. I'am using oracle 10g.. You guys know anywhere from where i can download?

Thank you ..

1 Answer 1

1

I don't know of any "ready-made" sample database of that size

As far as I can see, you have two options:

  1. Use PolePosition to create a sample database. It's originally a benchmark frameworks but comes with it's own database schema and the necessary tools to generate a large database (you can define which size)
  2. Use a test data generator like Benerator to completely create your test data from scratch. It seems a bit intimidating at first, but it's a really powerful tool. It also has generators to create meaningful names, zip codes and so on. So you'll get test data that "looks" real and doesn't contain gibberish.

The following benerator script generates a million rows for the table items and for each row in items it generates 10 rows in item_details (so you wind up with 1 million and 10 million rows)

<?xml version="1.0" encoding="iso-8859-1"?>
<setup  xmlns="http://databene.org/benerator/0.7.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://databene.org/benerator/0.7.0 http://databene.org/benerator-0.7.0.xsd">

    <import defaults="true"/>
    <import platforms="csv"/>


    <generate type="items" count="1000000">
        <consumer class="org.databene.platform.csv.CSVEntityExporter">
            <property name="uri" value="items.csv"/>
            <property name="separator" value="|"/>
            <property name="encoding" value="ISO-8859-1"/>
        </consumer>

        <id name="item_id" type="big_integer" generator="IncrementalIdGenerator"/>
        <attribute name="item_name" type="string" pattern="[A-Z][a-z ]{6,25}"/>

        <generate type="item_details" count="10">
            <consumer class="org.databene.platform.csv.CSVEntityExporter">
                <property name="uri" value="item_details.csv"/>
                <property name="separator" value="|"/>
                <property name="encoding" value="ISO-8859-1"/>
            </consumer>
            <id name="item_detail_id" type="big_integer" generator="IncrementalIdGenerator"/>
            <attribute name="item_id" script="items.item_id"/>
            <attribute name="sort_sequence" type="int" />
        </generate>

    </generate>
</setup>

If you want more "realistic" names, have a look a the following script which generates products with valid EAN Codes and some "normal" looking manufacturer names:

<?xml version="1.0" encoding="iso-8859-1"?>
<setup  xmlns="http://databene.org/benerator/0.7.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://databene.org/benerator/0.7.0 http://databene.org/benerator-0.7.0.xsd">

    <import platforms="csv"/>
    <import domains="product"/>
    <import domains="organization" />

    <setting name="product_count" value="100000"/>

    <generate type="product" count="{product_count}">
        <consumer class="CSVEntityExporter">
            <property name="uri" value="products.csv" />
            <property name="separator" value=","/>
        </consumer>

        <id name="id" type="long"/>
        <attribute name="ean_code" unique="true" generator="EANGenerator"/>
        <attribute name="product_code" unique="true" pattern="[A-Z]{3}[0-9]{6}"/>
        <variable name="cust" generator="CompanyNameGenerator" dataset="DE" locale="de_DE"/>
        <attribute name="manufacturer_name" source="cust.shortName"/>
    </generate>

</setup>

Once you have created the data files, you can use SQL*Loader to import them into the database.

This approach has the advantage that you have full control over the tables in your test database and you can tailor them to whatever you are trying to do with it.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you sir :) Sorry, my question was not very clear..I was just trying to understand Indexing.. I wrote a SQL procedure to do the job finally :) Thanks again :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.