200 likes | 340 Views
Industrial Placement. Entities :. Student. Supervisor. Placement. Company. Employer. Interview. Entity Relationship Diagram. gender. phone. address. address. name. name. birth. city. std-id. cmp-id. Student and Company. date. status. choose. student. company.
E N D
Industrial Placement • Entities : • Student • Supervisor • Placement • Company • Employer • Interview
Entity Relationship Diagram gender phone address address name name birth city std-id cmp-id • Student and Company date status choose student company • Schema Diagram pk fk pk std-id name gender address birth std-id cmp-id status date cmp-id name phone address city fk company student choose
Entity Relationship Diagram phone address name position emp-id phone address name city cmp-id • Company and Employer have company employer • Schema Diagram pk cmp-id name phone address city emp-id emp-id name phone address position fk company employer
Entity Relationship Diagram e-mail name room-no tel-ext spv-id name address date phone city cmp-id reg-id address name gender birth std-id • Placement, Student, Supervisor and Company super- vised supervisor place placement company worker student
Schema Diagram for Student Placement pk spv-id name room-no e-mail tel-ext supervisor reg-no date spv-id cmp-id std-id pk cmp-id name phone address city fk fk fk pk std-id name gender address birth placement company student
Entity Relationship Diagram e-mail name room-no tel-ext spv-id date intensity reg-id memo date • Placement, Supervisor and Visit super- vised supervisor placement visiting visit
Schema Diagram for Supervisor Visit fk Reg-no date memo visit pk reg-no date spv-id cmp-id std-id intensity fk pk spv-id name room-no e-mail tel-ext placement supervisor
Entity Relationship Diagram address name gender birth std-id • Student and Interview skill experience interest result language interview student interview status date result choose • Schema Diagram for Student, Interview and Choose pk pk pk fk std-id language experience interest skill result std-id name gender address birth std-id cmp-id status date choose student interview
super- vised supervisor employer visiting place have company visit placement choose worker student interview interview Overall E-R Diagram
pk pk pk fk std-id language experience interest skill result spv-id name room-no e-mail tel-ext Reg-no date memo emp-id name phone address position visit pk reg-no date spv-id cmp-id std-id intensity supervisor employer interview fk fk placement pk pk fk pk pk cmp-id name phone address city emp-id std-id name gender address birth std-id cmp-id status date fk fk choose student company Overall Schema Diagram
Data Dictionary • student(std-id, name, gender, address, birth) • choose(std-id, cmp-id, status, date) • company(cmp-id, name, phone, address, city, emp-id) • employer(emp-id, name, phone, address, position) • placement(reg-no, date,spv-d, cmp-id, std-id) • supervisor(spv-id, name, room-no, e-mail, tel-ext) • visit(reg-no, date, memo) • interview(std-id, language, experience, interest, skill, result)
company(cmp-id, name, phone, address, city, emp-id) • Employer(emp-id, name, phone, address, position)
placement(reg-no, date,spv-d, cmp-id, std-id) • supervisor(spv-id, name, room-no, e-mail, tel-ext)
visit(reg-no, date, memo) • interview(std-id, language, experience, interest, skill, result)
The SQL Commands • Creating Tables and Constraints SQL> Create Table Student( std_id char(3) constraint pk_std_id Primary key, name varchar2(10), gender varchar2(10), address varchar2(25), birth DATE ); SQL> Create Table Employer( emp_id char(3) constraint pk_emp_id Primary key, name varchar2(10), phone char(10), address varchar2(25), position char(15) );
Creating Tables and Constraints SQL>Create Table Company( cmp_id char(3) constraint pk_cmp_id Primary key, name varchar2(10), phone char(10), address varchar2(25), city varchar2(15), emp_id char(3) ); SQL>Alter Table Company add constraint fk_emp_id Foreign Key(emp_id) References Employer; SQL>Create Table Choose( std_id char(3), cmp_id char(3), status char(10), cdate DATE ); SQL>Alter Table Choose add constraint fk_std_id1 Foreign Key(std_id) References Student;
Creating Tables and Constraints SQL>Create Table Supervisor( spv_id char(3) constraint pk_spv_id Primary key, name varchar2(10), room_no char(5), e_mail char(20), tel_ext char(15) ); SQL>Create Table Placement( reg_no char(5) constraint pk_reg_no Primary key, pdate DATE, spv_id char(3), cmp_id char(3), std_id char(3) ); SQL>Alter Table Placement add constraint fk_spv_id Foreign Key(spv_id) References Supervisor; SQL>Alter Table Placement add constraint fk_cmp_id Foreign Key(cmp_id) References Company; SQL>Alter Table Placement add constraint fk_std_id2 Foreign Key(std_id) References Student;
Creating Tables and Constraints SQL>Create Table Visit( reg_no char(5), vdate DATE, memo varchar2(256) ); SQL>Alter Table Visit add constraint fk_reg_no Foreign Key(reg_no) References Placement; SQL>Create Table Interview( Std_id char(3) constraint pk_std_id2 Primary Key, Language Varchar2(50), Experience Varchar2(50), Interest Varchar2(50), Skill Varchar2(50), Result char(15) );
WIS RAMPUNG !! ANY QUESTION ??