Re: How you would design the DB structure?

From: Eric Levinson <ericl_at_community.net>
Date: 1996/03/14
Message-ID: <31485923.7CF_at_community.net>#1/1


Ku Kam Ming wrote:
>
> If I need a DB to record info. of books, and the fields are:
>
> 1) title and
> 2) authors
>
> There is one title per book (record) but there may be many authors per book.
> So, what is the BEST solution to design the sturcture of DB:
>
> A) the no. of char. of author field set to a very large number, say 10000
> B) create fields, author1, author2, .... author100 such that each field
> store one author name.
>
> Thanks in advance,
> --
> **********************************************************************
> Kam-ming Ku (kmku) Big-5:[ÅUÀA©ú] GB: ~{9K=uCw~}
> Main Library, Email : kmku_at_hkucc.hku.hk
> The University of Hong Kong, Tel. : (852) 2859-8068
> Pokfulam Road, Hong Kong. Fax. : (852) 2858-9420
> *********************************************************************
> If these are the only two fields you are interested in,
I'd set up each author in a seperate record ie:

	TITLE		AUTHOR
	Book 1		Author 1
	Book 2		Author 2
	Book 2		Author 3
	Book 3		Author 4
	Book 4 		Author 2

This would allow flexibility in the select by either author or title. Received on Thu Mar 14 1996 - 00:00:00 CET

Original text of this message