MedVision ad

How to make an ER diagram??? (1 Viewer)

lil_star

Longing for IT!
Joined
Dec 8, 2003
Messages
671
Gender
Female
HSC
2003
Identify the fields in a table
Identify primary keys in main table for example in a real estate SELLER table the primary key would be SELLER ID
Identify the foreign key in the other table such as SELLER ID in the PROPERTY table
link tables usine: One to One, One to Many OR Many to Many relationships
Make the ER diagram like one in Access

Hope this helps...i know its a bit confusing!
 

Seraph

Now You've done it.......
Joined
Sep 26, 2003
Messages
897
Gender
Male
HSC
N/A
wait wait , this is basically a schema diagram right??

Okay check out this if i have a Table called DETAILS with the following fields Family Name, Given Name , Gender , Age , Highest uni degree ,existing slaary , contact number , marriage status

(This is part of a relational database called PROSPECTS held by an AUstralian recrutiing firm)

Now if the database also holds information about potential employees and positons they offer how would i draw this?

What i did right
I made a fied called Family ID for the DETAILS table
that was my primary key
secondary called Potential ID for the othe table
thats my secondary key

but i dont understand hwo to link them with like one to one , one to many etc relationships?

i thought there is just a link from the Primary key to the secondary key?????

??????????
 

lil_star

Longing for IT!
Joined
Dec 8, 2003
Messages
671
Gender
Female
HSC
2003
PROSPECTS DB

firstly u are confused with primary, secondary and foreign keys....primary key is the unique key in the ''main'' table as PotentialEmpID in the TBLPotentialEmployee while PotentialEmpID wud be a foreign key in the TBLPostions

The definitions are as follows:
o Single Key is a field which each item of data is unique
o Composite Key/Compound Key is made by joining two or more keys together
o Primary Key is a key that uniquely identifies records in a table
o Secondary Key is a field that contains useful data often used in searches.

im attaching the file with the schema

also it will be a many to many relationship as....

MANY potential employees have MANY prospected positions
and
MANY prospected positions have MANY potential employees....that is vice versa...MANY to MANY!
 
Last edited:

anti

aww.. baby raccoon ^^
Joined
Jul 28, 2002
Messages
2,900
Location
Hurstville
Gender
Undisclosed
HSC
2002
an ER or entity-relationship diagram is a picture which shows the links between entities in a database schema.

I hope you know the shapes for ERDs - rectangles for entities, diamonds for relationships etc?

Then you join those which are related, showing whether they are a one-to-many or one-to-one relationship (or many-to-many if you like that sort of thing) and umm... something else. Oh yeah, keys and attributes. Primary keys being a solid line under the name of the attribute, secondary keys a dotted line, etc.
 

Seraph

Now You've done it.......
Joined
Sep 26, 2003
Messages
897
Gender
Male
HSC
N/A
Re: PROSPECTS DB

Originally posted by lil_star
firstly u are confused with primary, secondary and foreign keys....primary key is the unique key in the ''main'' table as PotentialEmpID in the TBLPotentialEmployee while PotentialEmpID wud be a foreign key in the TBLPostions

The definitions are as follows:
o Single Key is a field which each item of data is unique
o Composite Key/Compound Key is made by joining two or more keys together
o Primary Key is a key that uniquely identifies records in a table
o Secondary Key is a field that contains useful data often used in searches.

im attaching the file with the schema

also it will be a many to many relationship as....

MANY potential employees have MANY prospected positions
and
MANY prospected positions have MANY potential employees....that is vice versa...MANY to MANY!
ic but what about TBLPositions Primary key? is that foreing in The other DB?
 

lil_star

Longing for IT!
Joined
Dec 8, 2003
Messages
671
Gender
Female
HSC
2003
Yes....The primary key in TBLPositions wud be PositionID while it will be a foreign key in a different TABLE not Database!
 

Seraph

Now You've done it.......
Joined
Sep 26, 2003
Messages
897
Gender
Male
HSC
N/A
Re: PROSPECTS DB

Originally posted by lil_star
firstly u are confused with primary, secondary and foreign keys....primary key is the unique key in the ''main'' table as PotentialEmpID in the TBLPotentialEmployee while PotentialEmpID wud be a foreign key in the TBLPostions

The definitions are as follows:
o Single Key is a field which each item of data is unique
o Composite Key/Compound Key is made by joining two or more keys together
o Primary Key is a key that uniquely identifies records in a table
o Secondary Key is a field that contains useful data often used in searches.

im attaching the file with the schema

also it will be a many to many relationship as....

MANY potential employees have MANY prospected positions
and
MANY prospected positions have MANY potential employees....that is vice versa...MANY to MANY!
Wait a second.............

WOuldnt One Potential employee usually have ONE prospected position>???
How can alot of employes have alot of prospected positions one person has to have one position????


arghh i dunno :chainsaw: :chainsaw: :chainsaw:
 
Last edited:

lil_star

Longing for IT!
Joined
Dec 8, 2003
Messages
671
Gender
Female
HSC
2003
the word prospect means Expected, hoped , Potential, Chance, Probability

therefore one employee can have more than one ''prospected/hoped/expected" prositions, while one position can have more than one ''prospected/hoped/expected'' employees!
 

danielbardouh

New Member
Joined
Aug 26, 2006
Messages
12
Gender
Male
HSC
2007
its pretty easy, you got to do it in microsoft access ...
when you created all your tables with relationships, all you have to do is click a little button on the top of the page ... its says realtionships ..
hope it helps ..
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top