Highlights
Background Toys 4 U is a company that specialises in toy hire for parties, kindergartens and play groups. They also offer equipment for infants and babies for hire. Toys 4 U can own several copies (TOYCOPY) of each toy (TOY). For example, a store may have 10 copies of the toy Rocking Horse. In the database, Rocking Horse would be one TOY, and each copy would be a TOYCOPY. A hire transaction (HIRE) involves one or more copies being hired to a member (MEMBERSHIP). A copy can be hired many times over its lifetime; therefore, there is an M:N relationship between HIRE and TOYCOPY. DETAILHIRE is the bridge table to resolve this relationship. The complete ERD is provided in Figure 1.
Requirements 1. Write the SQL code to create the table structures for the entities shown in Figure 1. The structures should contain the attributes specified in the ERD. Use data types that are appropriate for the data that will need to be stored in each attribute. Enforce primary key and foreign key constraints as indicated by the ERD.
2. The following tables provide a very small portion of the data that will be kept in the database. The data needs to be inserted into the database for testing purposes. Write the INSERT commands necessary to place the following data in the tables that were created in Question 1 (If required by your DBMS, be certain to save the rows permanently).
For Questions
3–11, use the tables that were created in Question 1 and the data that was loaded into those tables in Question 2.
3. Write the SQL command to change the toy year for toy number 2245 to 2783.
4. Write the SQL command to change the charge code for all Infant and baby toys to price code 3.
5. Write a single SQL command to increase all charge rental fee values in the CHARGE table by $1.00.
6. Alter the DETAILHIRE table to include a derived attribute named DETAIL_DAYSLATE to store integers of up to three digits. The attribute should accept null values.
7. Update the DETAILHIRE table to set the values in DETAIL_RETURNDATE to include a time component. Make each entry match the values shown in the Table 7.
This (ITECH2004) Computer Science Assignment has been solved by our Computer Science experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinctio.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.