开发者

draw an ER diagram that fulfills the information about the car dealer company which is described below [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 10 years ago.

This car dealer company has many branch offices. In each of these branch offices, some sales people are working whose job is selling cars to customers. You need to define your branch offices in your diagram. And also, you need to define sales people who are working in these branch offices. - This company sells cars, so you must store car manufacturer information in your database. Design a suitable model for storing car manufacturers in your diagram. - These manufacturers produce vehicles. Each vehicle must be associated with a manufacturer. And you should also store features about vehicles such as production year, gearbox, fuel type, weight etc… Do not forget that possible car features can differ for each car, so storing them in a single entity will cause “null value” problem. Your design must eliminate this “null value” problem. - And lastly, you should define an inventory for available cars for each branch of the company. This inventory w开发者_开发知识库ill keep track of which cars are available for selling from which branches.


The informational stuff I leave to you, I don't know the application too good. Relationally, it could look like this:

  • Companies
    • Company information fields, such as name.
  • BranchOffices
    • company_id
    • Branche office information fields, such as address and telephone
  • SalesMen
    • branch_office_id
    • Personal info about salesmen
  • CarBrands
    • Brand information, name, year of founding etc.
  • CarBrands_Companies
    • car_brand_id
    • company_id
  • VehicleTypes
    • car_brand_id
    • Information about vehicle, probably serving as default for a vehicle of this type
  • Vehicles
    • vehicle_type_id
    • branch_office_id
    • Vehicle specific stuff, color, type of motor, stuff that differs from the info in VehicleTypes.

The inventory part should be done using querying the Vehicles joined with the BranceOffices.

Additionally, you could add Customers and many-to-many them to SalesMen and Vehicles.

And last but not least, don't hate me for not doing what you requested (i.e. drawing a diagram), this is a place where people help each other. Let this information get you started with drawing your own ERD. If the issue happens to be that you don't know what to do this with, look into the free MySQL Workbench package.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜