Multiple options - one field or many?

G

Guest

I am creating a drawing/document database to maintain a listing of drawings.
I also wish to store file paths and file types.

Each drawing or document will have the same file name but may have multiple
file types, eg pdf, dwg, jpg etc.

I am wondering how to approach the storing of those values. Should I have
one field to store multiple values or multiple fields for each file type?

Any thoughts?
 
T

tina

now you're on the right track. you can either have two tables: the
drawing/document table as parent table, and a dwg/doc file type table as
child table - where each record in the parent table may have one or more
related records in the child table, and each record in the child table is a
*single* specific file type related to a single specific parent record.

or you may want a three-table setup: the drawing/document table as parent
table. another parent table listing all the available file types. and a
junction or "linking" table which is the child of each of the parent tables.
in the child table each record consists of a primary key value from the
dwg/doc table, and a primary key value from the file type table. so each
record in the child table is a unique combination of a specific dwg/doc and
a specific file type.

hth
 
G

Guest

Thanks tina,

After thinking about it some more I came to the 3 table option as the way as
well.
Sometimes you just need to talk these things out loud ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top