# Miscellaneous > General Database Discussions >  Drawing Entity relationship diagrams

## chuck2000

Hi I am new here. I have to draw an erd, well I finished drawing it, just trying to figure out a few things. I'm not sure if this is the right place. Thanks.

----------


## skhanal

What's the question?

----------


## chuck2000

Draw the corresponding ERD for the following data structure:

ERD First Draft.jpgProducts(ProID, Descrip, Cost, Price, CatID)
 People(ID, FName, LName, Phone)
 Clients(CID, CreditLimit)
 Employees(EID, DOH, DOB, SupervisorID)
 ClientAddress(CLID, CID, Street1, Street2, City, State, Zip)
 PriceHistory(PrID, ProductID, Price, StartDate, EndDate)
 InvDetail(InvNum, DetID, Qty, ProdID, UnitPrice, Discount)
 InvHeader(InvNum, Date, ClientID, CliAddrID, SalesPersonID, Memo)
 Categories(ID, Description)
 Underline stands for primary key
 Italic stands for Foreign key.

 I'm confused about the relationships. Any help will be greatly appreciated.

----------


## skhanal

It is using crow-foot notation for relations between different entities. The crow foot side is many side in a relation. For example, a Product can have many PriceHistory records. One to one relation does not have any crow foot (you can draw an arrow), such as each Employee has one corresponding People record.

In a foreign key relation, the child table inherits primary key of the parent table.

----------


## theglobe

Sorry to Hijack but could I get a little help with the entities and attributes on this one?

AllCars wishes to create a system to monitor the rental of vehicles to clients. The company has various outlets and each outlet has staff including a Manager and a number of mechanics. Each outlet has a stock of vehicles for rent that may be rented by clients for various periods of time. Each rental agreement between the customer and AllCars is identified through a rental number. A client must take out insurance cover for each vehicle rental period and a vehicle is checked for faults after each rental.

Thanks!

----------


## skhanal

What have you done so far?.

----------

