ECMM 6010 Assignment 4 and solution

ECMM 6010 Assignment 4 and solution - Xuefei Yao(B00386141...

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

1 Xuefei Yao (B00386141) ECMM6010 Assignment 4 1. ER diagram 2. Relational Schema Professor ( Psin : integer, Pname: string) Course ( Cid : integer, Cname: string) Semester ( Sid : string, Year: string, Term: string) Teaches ( Psin : integer, Cid : integer, Sid : string) Professor Teaches Course Semester Psin Pname Cid Cname N M Sid Year Term M
Image of page 1

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

2 3. SQL statements CREATE TABLE professor ( psin INTEGER NOT NULL, pname CHAR(20) NOT NULL, PRIMARY KEY (psin)); CREATE TABLE course ( cid INTEGER NOT NULL, cname CHAR(80) NOT NULL, PRIMARY KEY (cid)); CREATE TABLE semester ( sid CHAR(10) NOT NULL, year CHAR(4) NOT NULL, term CHAR(10) NOT NULL, PRIMARY KEY (SID)); CREATE TABLE teaches ( psin INTEGER NOT NULL, cid INTEGER NOT NULL, sid CHAR(10) NOT NULL, PRIMARY KEY(psin,cid,sid), FOREIGN KEY(psin) REFERENCES professor, FOREIGN KEY(cid) REFERENCES course, FOREIGN KEY(sid) REFERENCES semester); INSERT INTO professor VALUES(123450001,'Grant Sullivan'); INSERT INTO professor VALUES(123450002,'Thomas Trappenberg'); INSERT INTO professor VALUES(123450003,'Sunny Marche'); INSERT INTO course VALUES(11158, 'Overview of E-Commerce' );
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '06
  • ThomasTrappenberg
  • Sid, xsl, CID, Psin

{[ 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