In: Computer Science
Create a database and design an ER diagram for the given question. Must link the related tables then implement the design using MySQL.
Insert at least 5 records. Ensure that the data to be added are related to other tables.
Follow this format in creating the database and table:
Database format: databasename_yourname
Table format: tablename_yourname
QUESTION:
Company ABC has the following business rules.
REQUIREMENTS:
Solution:-
Create database in MySQL
Command 1
create table Vivekmalik(Component_Id integer, Name varchar (30), description varchar(100), supplier varchar(20), comp_used_in_product varchar(50));
By the Above commmand A table with name - Vivekmalik is created in the Database .
Command 2
insert into Vivekmalik(Component_Id , Name , description, supplier , comp_used_in_product) values (101 , " KWP" , "covering plug ", " Honda" , " Spark Plug");
By the Command -2 Values are inserted into the Table we created.
According to the given question we have to insert atleat 5 Records in the table.
So, we have to repeat Command 2 again and again with different values.
Command 3
select * from Vivekmalik;
The above command is used to retrive the Data from the Table "Vivekmalik". It retrives all the values in it.
All the commands and output Table is shown in the Above image.