Results 1 to 6 of 6

Thread: how can i convert more fields of table to 2 tables

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2009
    Posts
    131

    how can i convert more fields of table to 2 tables

    Hi all
    I have table with about 100 fields , it's ok ,but take it some second to load data .
    I new it's not normalize experssion to design database.
    I want to convert this table to 2 tables and link it to eachother
    How can i do that ? my database is Access .
    pls tell me with source.
    thank's all

  2. #2
    gibra
    Guest

    Re: how can i convert more fields of table to 2 tables

    You can
    1. use "SELECT ... INTO" sql statement to create a new table which contains half fields. See MSDN for all details.
    2. next, delete same fields to original table

    Caution:
    a) the original table must have a primary-key
    b) the new table must contains a foreign-key related to original table primary-key

    However, load 100 fields isn't a problem.
    Instead, the problem maybe how many records you load.


  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2009
    Posts
    131

    Re: how can i convert more fields of table to 2 tables

    Thank's to reply
    Wish you put Source file to better understand
    I'm beginner

  4. #4
    gibra
    Guest

    Re: how can i convert more fields of table to 2 tables

    Quote Originally Posted by unforgiven747 View Post
    Thank's to reply
    Wish you put Source file to better understand
    I'm beginner
    There isn't "Source file".
    Source file involve the knowing of your table structure .

    Read MSDN about SELECT ... INTO statement.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2009
    Posts
    131

    Re: how can i convert more fields of table to 2 tables

    I have a parent table ( Prc_Head) that involve member_id,work_id,boss,work_date ) work_id is Key
    child table1 invole of (id,work_id,.... about 40 fields)
    and another child table2 invole of ( id, .... about 50 fields) id is Key
    the relation between 2 child tables must be one-to-one or one-to-many? which one ?

  6. #6
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: how can i convert more fields of table to 2 tables

    Thread moved to 'Database Development' forum (the 'VB6' forum is only meant for questions which don't fit in more specific forums)

    I recommend reading the articles in the "Design" section of our Database Development FAQs/Tutorials (at the top of this forum), particularly the Normalisation one.

    the relation between 2 child tables must be one-to-one or one-to-many? which one ?
    It depends on your database, but in many cases there shouldn't be a relationship between them - instead they should each link to the parent table.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width