Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Databases > Re: Table schem...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 3685 of 3782
Post > Topic >>

Re: Table schema

by Eric Kaplan <tobycraftse@[EMAIL PROTECTED] > Mar 24, 2008 at 01:58 PM

I think i only need 2 table is enough

CREATE TABLE programs
(
programid int NOT NULL PRIMARY KEY,
programname nvarchar(200) NOT NULL,
                         ... )

CREATE TABLE productioncrew 
(
programid int NOT NULL REFERENCES programs,
firstname  nvarchar(200) NOT NULL,
lastname nvarchar(200) NOT NULL,
role nvarchar(200) NOT NULL,
PRIMARY KEY (programid, firstname, lastname, role)
)

since my DB is only 6 tables like Schedules, TVStations,
ChannelLineup, Programs, ProductionCrews and Genres

it's a very small DB and I dont' need all those ID things it's easy to
do query with above


>>crew -> programID -> member 
>
>your main table would have three fields, plus extra info about
>members.
>
>crewid : programid: memberid:
>
>you would also have a table with info about crews indexed by crewid
>and crew name
>
>You would also have a table of info about programs indexed by program
>name and program id.
>
>If you had just a small database, you might dispense with crewids and
>programids and just use the names as keys.
 




 4 Posts in Topic:
Table schema
Eric Kaplan <tobycraft  2008-03-23 20:34:17 
Re: Table schema
Lew <lew@[EMAIL PROTEC  2008-03-24 08:08:34 
Re: Table schema
Roedy Green <see_websi  2008-03-24 14:45:20 
Re: Table schema
Eric Kaplan <tobycraft  2008-03-24 13:58:57 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 5 14:59:23 CDT 2008.