1. Create three tables a. Customer b. Rent c. Film 2. Define appropriate data type and data size 3. Define column constraints 4. Specify Integrity/Domain/Primary Key/Referential Integrity constraints a. Primary key b. Foreign key E.g.) CONSTRAINT rent_fk_c FOREIGN KEY cid REFERENCES customer ON DELETE CASCADE The price of a film ranges from 0 F0 to 10.00
1. Create three tables a. Customer b. Rent c. Film 2. Define appropriate data type and data size 3. Define column constraints 4. Specify Integrity/Domain/Primary Key/Referential Integrity constraints a. Primary key b. Foreign key E.g.) CONSTRAINT rent_fk_c FOREIGN KEY cid REFERENCES customer ON DELETE CASCADE The price of a film ranges from 0 F0 to 10.00
Related questions
Question

Transcribed Image Text:## Submission Instructions
1. **Include your table creation SQL statements**
- You can copy and paste your code here.
2. **Include the screenshots**
- Take a screenshot of your tables in your database (DB).

Transcribed Image Text:**Transcription for Educational Website**
**Objective: Create Tables from Given Data**
**Tables Overview:**
1. **Customer Table**
| CID | CNAME | CITY |
|-----|-------|--------|
| C1 | Smith | London |
| C2 | Jones | Paris |
| C4 | Clark | London |
| C5 | Adams | Athens |
2. **Rent Table**
| CID | FID | RDATE |
|-----|-----|------------|
| C5 | F2 | 02-OCT-14 |
| C5 | F3 | 04-SEP-14 |
| C5 | F5 | 16-APR-17 |
| C1 | F5 | 16-APR-17 |
| C1 | F2 | 02-OCT-14 |
| C1 | F3 | 04-SEP-14 |
| C2 | F2 | 01-APR-14 |
| C4 | F2 | 01-JAN-14 |
3. **Film Table**
| FID | FNAME | PRICE | TYPE |
|-----|------------|-------|--------|
| F2 | The Others | 1.44 | HORROR |
| F3 | Senseless | 5.99 | COMEDY |
| F4 | Dragon Heart | 6 | DRAMA |
| F5 | 007 | 5 | ACTION |
| F7 | Sweetheart | 5 | COMEDY |
**Steps:**
1. **Create three tables:**
- Customer
- Rent
- Film
2. **Define appropriate data type and data size.**
3. **Define column constraints.**
4. **Specify Integrity/Domain/Primary Key/Referential Integrity Constraints:**
- **Primary Key**
- **Foreign Key**
- Example: `CONSTRAINT rent_fk_c FOREIGN KEY cid REFERENCES customer ON DELETE CASCADE`
- **Constraints:**
- The price of a film ranges from 0.50 to 19.99.
- A film can only have the type
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 5 steps
