Dynamic Partitioning

  • Hi,

    I am newbie to SQL server and I would appreciate if you could assist me with the following:

    I have a question regarding dynamic partition.

    Let say I have the following:

    I need to store sentences from books in the following table:

    book_id (int) - name of the book

    page_id (int) - the page number

    sentence_id (int) - some temporary id (for example, the first sentence in each page will get id 1 and so on)

    sentence (varchar)

    primary key(book_id, page_id, sentence_id)

    As you can see the table can be divied to different partition based on the book_id

    How do I create a new partiton dynamically in the table for each book_id.

    I would apprecaite if you can also give me a code sample on how to do that.

    Thanks,

    Gady

  • Creating procedures to manage partitions dynamically is not an easy task (I've done it). Since you are a self-admited SQL Server newbie, I'll start by asking the question, why do you think you need to partition the data? How much data are you planning on storing (how many books, average sentences per book, rows in your table, etc).

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • Duplicate post, continue thread here.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply