Table of Contents
Overview
Assignment One Practice Data Definition by creating a table, inserting data, viewing the data in the table, updating data in the table, deleting data in the table, and changing the structure of the table.Chapters in the Book
This assignment aligns with Chapters 1, 2, and 3 in the textbook.Learning Outcomes
- The learning outbomes for this assignment are: hands-on experience using Oracle SQL Live software, understanding the data definition functions by executing the commands, using data types to define fields, using null and not null descriptors to identify data insertion, and viewing the results.
Due Date(s)
- See instructor distributed material and/or request due date from insturctor
Instructions
- Provide code and screenshots of the code with the results for each question in the assignment.
- Paste the screenshots under the assignment question, for example, the screenshot with the code and results that answers the first assignment question should be pasted under the first assignment question.
Assignment Grading
Each question is worth 10 points. Partial credit is given if part of the code is correct, however, if the code is correct but does not answer the assignment question, no credit will be given.Additional Resources (in addition to the lecture and chapters in the textbook)
Assignment
Column | Type | Length | Decimal pt. | Nulls | Description |
CONDO_ID | Char | 3 | No | ID of the Condo Unit | |
LOCATION_NUM | smallint | No | Location Number | ||
UNIT_NUM | char | 3 | No | Unit number | |
BDRMS | smallint | Yes | No of bedrooms | ||
BATH | smallint | Yes | No of bathrooms | ||
CONDO_FEE | Decimal | 6 | 2 | Yes | Monthly condo fee |
OWNER_NUM | Char | 5 | Yes | No of condo owner |
- Create a table called LARGE_CONDO with the structure shown above.
- Insert into the LARGE_CONDO table the condo ID, location number, unit number, bedrooms, baths, condo fee, and owner number for those condos whose square footage is greater than 1,500 square feet. NOTE: Look at the data in the CONDO_UNIT table in the textbook to find the values for condos whose square footage is greater than 1,500)
- Increase the condo fee for each condo by $150.
- Decrease the condo fee of any condo whose monthly fee is more than $500 by one percent.
- Insert a row into the LARGE_CONDO table for a new condo. The condo ID is 9, location number is 1, the unit number is 605, the number of bedrooms is 3, the number of bathrooms is 3, the condo fee is $775, and the owner number if FE182
- Delete the condos in the LARGE_CONDO table for owner number AN175
- The condo in location 1 and unit 503 is in the process of being remodeled and the number of bedrooms is now 4. Change the value in the table.
- Add to the LARGE_CONDO table a new column with data type of character. Call this column OCCUPIED and make the length 1. Set the value for the OCCUPIED column for all the rows to Y
- Change the OCCUPIED column in the LARGE_CONDO table to N for unit C06
- Delete the LARGE_CONDO table from the database