|
-
Feb 4th, 2010, 03:57 AM
#1
Thread Starter
Addicted Member
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
-
Feb 4th, 2010, 05:09 AM
#2
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.
-
Feb 4th, 2010, 07:34 AM
#3
Thread Starter
Addicted Member
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
-
Feb 4th, 2010, 08:42 AM
#4
Re: how can i convert more fields of table to 2 tables
 Originally Posted by unforgiven747
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.
-
Feb 4th, 2010, 09:06 AM
#5
Thread Starter
Addicted Member
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 ?
-
Feb 4th, 2010, 03:46 PM
#6
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|