S11144850_A2_CreatingStructures.sql

Emptitle varchar 15 default null empcomm decimal102

Info icon This preview shows pages 1–3. Sign up to view the full content.

`Emp_Title` varchar (15) default NULL, `Emp_Comm` decimal(10,2) default '0.00', `Dept_Num` int(7) default '0', CONSTRAINT pk_empnum PRIMARY KEY (`Emp_Num`) CONSTRAINT lgemployee_fk_deptnum FOREIGN KEY (`Dept_Num`) REFERENCES `LGDEPARTMENT` (`Dept_Num`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- Creating Table LGDEPARTMENT -- CREATE TABLE IF NOT EXISTS `LGDEPARTMENT` ( `Dept_Num` int(7) NOT NULL default '0', `Dept_Name` varchar(15) default NULL, `Dept_Mail_Box` int(15) NOT NULL, `Dept_Phone` int(7) NOT NULL, `Emp_Num` int (7) default '0', CONSTRAINT department_pk_deptnum PRIMARY KEY (`Dept_Num`), CONSTRAINT department_fk_empnum FOREIGN KEY (`Emp_Num`) REFERENCES `LGEMPLOYEE` (`Emp_Num`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- Creating Table LGINVOICE -- CREATE TABLE IF NOT EXISTS `LGINVOICE` ( `Inv_Num` int(7) NOT NULL default '0', `Cust_code` int(7) NOT NULL default '0', `Inv_Date` datetime default NULL, `Inv_Total` decimal(10,2) default '0.00', `Emp_Num` int(7) NOT NULL default '0', CONSTRAINT invoice_pk_invnum PRIMARY KEY (`Inv_Num`), CONSTRAINT invoice_fk_custcode FOREIGN KEY (`Cust_Code`) REFERENCES `LGCUSTOMER` (`Cust_Code`),
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

CONSTRAINT inv_fk_empnum FOREIGN KEY (`Emp_Num`) REFERENCES `LGEMPLOYEE` (`Emp_Num`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- Creating Table LGPRODUCT -- CREATE TABLE IF NOT EXISTS `LGPRODUCT` (
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.
  • Summer '17
  • Vara
  • DEFAULT NULL

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern