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
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.
:wave:
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
Re: how can i convert more fields of table to 2 tables
Quote:
Originally Posted by
unforgiven747
Thank's to reply
Wish you put Source file to better understand
I'm beginner
There isn't "Source file". :D
Source file involve the knowing of your table structure .
Read MSDN about SELECT ... INTO statement.
:wave:
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 ?
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.
Quote:
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.