90 likes | 317 Views
ER-Diagram. Database Project. ER-Diagram. ER Description . In the first it is simple database and may be cannot contain all types of relationships. This is a Diagram for Engineering company and do three types of tests as follow (Soil,Concrete,Steel) and sort data about each test. Cont.
E N D
ER-Diagram Database Project
ER Description • In the first it is simple database and may be cannot contain all types of relationships. • This is a Diagram for Engineering company and do three types of tests as follow (Soil,Concrete,Steel) and sort data about each test.
Cont. • Customers Entity . • It is contain a C_id and this is a primary key and c_name that represent the names of customers. • Projects Entity. • It is the same of customers Entity but represent the projects.
ER-Description • The Steel, Soil And Concrete Entities. • It is contains the test_id and this is a primary key and the date of arrest of the test and the amount or price of the test.
Relational • Create table Projects(p_id number(4) primary key, • P_name char(20)); • Create table Customers (c_id number(4) primary key, • C_namevarchar(20));
Cont. • Create table Steel (test_id number(5) primary key , • date_of_Arrest date , Amount number(3), • c_id number(4), foreign key(c_id) references Customers(c_id) ,p_id number(4) foregin key (p_id) references Project(p_id) );
Cont. • Create table Concrete((test_id number(5) primary key, • date_of_Arrest date , Amount number(3c_id number(4), foreign key(c_id) references Customers(c_id) ,p_id number(4) foregin key (p_id) references Project(p_id) );
Cont. • Create table Soil(test_id number(5) primary key , • date_of_Arrest date , Amount number(3),c_id number(4), foreign key(c_id) references Customers(c_id) ,p_id number(4) foregin key (p_id) references Project(p_id) );