INF3707-Assignment____2[1].pdf

INF3707-Assignment____2[1].pdf - Name Rolivhuwa Ramanugu...

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

View Full Document Right Arrow Icon
Name: Rolivhuwa Ramanugu Student No: 55333427 Module: INF3707 Unique No: 899662 Due Date: 2018-04-04 Assignment 2 Question 1 1.1. CREATE TABLE category (catcode VARCHAR2(3), catdesc VARCHAR2(11) NOT NULL, CONSTRAINT catcode_pk PRIMARY KEY (catcode)); 1.2. INSERT INTO category VALUES ('BUS', 'BUSINESS'); INSERT INTO category VALUES ('CHN', 'CHILDREN'); INSERT INTO category VALUES ('COK', 'COOKING'); INSERT INTO category VALUES ('COM', 'COMPUTER'); INSERT INTO category
Image of page 1

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

View Full Document Right Arrow Icon
VALUES ('FAL', 'FAMILY LIFE'); INSERT INTO category VALUES ('FIT', 'FITNESS'); INSERT INTO category VALUES ('SEH', 'SELF HELP'); INSERT INTO category VALUES ('LIT', 'LITERATURE'); COMMIT; 1.3. ALTER TABLE books ADD CONSTRAINT catcode_fk FOREIGN KEY (catcode) REFERENCES category(catcode); 1.4. UPDATE books SET catcode = 'BUS' WHERE category = 'BUSINESS'; UPDATE books SET catcode = 'CHN' WHERE category = 'CHILDREN'; UPDATE books SET catcode = 'COK' WHERE category = 'COOKING'; UPDATE books SET catcode = 'COM' WHERE category = 'COMPUTER'; UPDATE books SET catcode = 'FAL' WHERE category = 'FAMILY LIFE'; .
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

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