hospitalvast.blogg.se

Mysql workbench erd
Mysql workbench erd











I have tried to make an ERD for this approached but really not getting it done. So, i think now u should get it wat im asking for. Trim Level Combobox: Now on selecting a body type trim level will be populated, like for Honda-Civic-2009-Hatchback the trim level available are 1.8i VTEC, 1.8i, 1.8VTC, 1.8VTEC Combobox for body: Now selecting a year will make this combobox populated, like for Honda-Civic-2009 body style is Hatchback and for Honda-Civic-2000 body style is Coupe, Hatchback, Saloon, Estate (4 values in combobox).ĥ. infact each year a model have a production.Ĥ. Like Honda-Civic may have production year in 2009, 2010, 2007. Combobox for Years: Select a model will make this combobox filled with the possible year of production available against this model. For example Accord, Civic, Civic Hybrid IMA etc.ģ. Combobox for Models: This will be populated on the basis of make selected, like if make is Honda then the combobox will have all models for honda. Combobox for Makes: All makes will be populated in that combobox.Ģ. Wat i want is dat first i have to make a complete vehicle based on the selection. `id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,

#Mysql workbench erd code

Here is the generated sql code for quick reference TABLE IF NOT EXISTS `mydb`.`make` ( I am not able to solve this type of things. If i create many to many relationship between body and year then body_has_year will not give me any info about the model and make and if i create many to many relationship between trim and body then wat about the years and how do i relate to it? Wat is the best approach to solve this problem as speed is the most important thing and i dont wana repeat values. im not getting how should i relate it to my tables.

mysql workbench erd

Now a model in a year may have different bodies and a body in a year may have different trim levels. Now i know that each model may have various years and a year may have various models and i can insert the values into it without any problem.Īs i go further i have 2 tables left i.e. By doing that workbench created another table called year_has_model which has following fields:

mysql workbench erd

So i created many to many relationship between year table and model table. Now dat each model may have many years and a year may have many models tells me dat i have to create a many to many relationship here. That's y workbench passed the make id as foreign key into the table. honda may have civic and accord etc.) but a model will have only one make. Now from above i created a one to many relationship to between model and make table because a make have many models (e.g. Now creating them with or without workbench is easy but im trying to make some business logic in it to avoid repetitions of data again and again by way of creating relationships and foreign keys. This is a vehicle parts database dat im trying to design. I am trying to make a EER diagram using mysql workbench to start with a database.











Mysql workbench erd