movierental - DROP DROP DROP DROP DROP D DROP TABLE...

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

View Full Document Right Arrow Icon
DROP TABLE MM_MOVIE_TYPE CASCADE CONSTRAINTS PURGE; DROP TABLE mm_pay_type CASCADE CONSTRAINTS PURGE; DROP TABLE mm_member CASCADE CONSTRAINTS PURGE; DROP TABLE mm_movie CASCADE CONSTRAINTS PURGE; DROP TABLE mm_rental CASCADE CONSTRAINTS PURGE; DROP SEQUENCE mm_rental_seq; D CREATE TABLE mm_movie_type (movie_cat_id NUMBER(2), movie_category VARCHAR(12), CONSTRAINT movie_cat_id_pk PRIMARY KEY (movie_cat_id)); CREATE TABLE mm_pay_type (payment_methods_id NUMBER(2), payment_methods VARCHAR(14), CONSTRAINT payment_methods_id_pk PRIMARY KEY (payment_methods_id)); CREATE TABLE mm_member (member_id NUMBER(4), last VARCHAR(12), first VARCHAR(8), license_no VARCHAR(9), license_st VARCHAR(2), credit_card VARCHAR(12), suspension VARCHAR(1) DEFAULT 'N', mailing_list VARCHAR(1), CONSTRAINT cust_custid_pk PRIMARY KEY (member_id), CONSTRAINT cust_credcard_ck CHECK (LENGTH(credit_card) = 12)); CREATE TABLE mm_movie (movie_id NUMBER(4), movie_title VARCHAR(40), movie_cat_id NUMBER(2) NOT NULL, movie_value DECIMAL(5,2), movie_qty NUMBER(2), CONSTRAINT movies_id_pk PRIMARY KEY (movie_id), CONSTRAINT movie_type_fk FOREIGN KEY (movie_cat_id) REFERENCES mm_movie_type(movie_cat_id), CONSTRAINT movies_value_ck CHECK (movie_value BETWEEN 5 and 100)); CREATE TABLE mm_rental (rental_id NUMBER(4), member_id NUMBER(4), movie_id NUMBER(4), checkout_date DATE DEFAULT SYSDATE, checkin_date DATE, payment_methods_id NUMBER(2),
Image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
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