HW2

docx

School

Rochester Institute of Technology *

*We aren’t endorsed by this school

Course

230

Subject

Computer Science

Date

Apr 3, 2024

Type

docx

Pages

3

Uploaded by HighnessValor13716

Report
ISTE-230 Introduction to Database & Data Modeling Homework # 2 – Interpret, Transpose, and Implement a Single Entity E-R Diagram in MySQL DUE: Tuesday, February 6 at 4:30pm Name: ___Aedan Lahiff__________________________________________ All assignments will be graded with regard to the coding standards that were discussed in class, which can be found in the Standards Content area. Submit this document to the Homework #2 assignment folder, edited to include your answers AND the script file created for Part 3. Part 1 - 20 points For the table below, please classify each attribute specified based on the E-R diagram above. Please place the best answer for each column that best describes the attribute. Attribute Composite or Simple Single-valued or Multi-valued Stored or Derived Identifier ? (Yes or no) profit Simple Single Derived No street Simple Single Stored No itemID Simple Singe Stored Yes supplier Composite Single Stored No colors Simple Multi Stored No ISTE-230 – Introduction to Database and Data Modeling Page 1 of 3 ©Elissa Weeden, David Patric 2020
Part 2 - 19 points Using relational structure notation, transpose the E-R diagram below into a relational schema. You do not need to normalize the relation. NOTE: The transposed ITEM relation includes a 'colors' attribute, therefore it would not pass the 1NF (the criteria for a relation). Although the ITEM relation is not in 1NF, there is an approach that we will learn next week. Your Answer (relational schema): ITEM(itemID , itemName, description, returnable, perishable, shelfQty, notes, colors, retailPrice, cost, zipcode, state, city, street, name) Part 3 - 61 points Create a script that includes the statements that will create a database called ‘HW2’ that includes a table for ITEM, based the relation above in Part 2 and the specifications in the table below. Use ONLY the data types discussed so far (CHAR, VARCHAR, INT, and DATE). Attribute(s) Data type description itemID; itemName; name; street; city; colors Variable-length string up to 25 characters state Fixed-length string of 2 characters zipcodeCRETAITE A string that could accommodate either of the formats below: ‘#####-####’ or ‘#####’ cost; retailPrice Variable-length string up to 10 characters notes; description Variable-length string up to 255 characters ISTE-230 – Introduction to Database and Data Modeling Page 2 of 3 ©Elissa Weeden, David Patric 2020
returnable; perishable Will store one character shelfQty A whole number between 0 and 50000 ISTE-230 – Introduction to Database and Data Modeling Page 3 of 3 ©Elissa Weeden, David Patric 2020
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help