Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 2 fuera de 12 páginas
Otro

WGU C170 Objective Assessment Edward M Burke

Document preview thumbnail
Vista previa 2 fuera de 12 páginas

WGU C170 Objective Assessment Edward M Burke. Third Normal Form – 4 Tables In order to achieve third normal form we need to eliminate any transitive dependency, meaning an attribute depends oanother attribute that is not the primary key. For example, looking at our second normal form tables, Customer Last Name is dependent on Donut Order ID. (Each Donut Order ID has only one Customer Last Name value associated witTo transform into third normal form we simply move any transitively dependent attributes to their own relation where they depend on only the primary key. Entity Relationship Diagram using tables from A1C: Both the Customer and Donut entities have a single primary key and related attributes that describe them. The orderDetails table is an associative entity that shows the interactive relationship between the Donut, and donutOrder entities. The DonutOrder entity has a primary key of DonutOrder_ID, and a foreign key consisting of Customer_ID to record the order date, notes, and totals that describe the interaction of the Customer and Donut purchase with corresponding foreign keys. The cardinality from customer to donutOrder is 1-to-many as a customer can place multiplorders, while the cardinality in the other direction will be many-to-1 because a donutOrder will have at most one customer per order. The donut to orderDetails cardinality is 1-to-many as one donut can fill multiple orderDetail records, while in the other direction, an orderDetails record will have 1 donut per record, representing a many-to-1 relationship. The donutOrder to orderDetails cardinality is 1-to-many as one donutORder may reference multiple orderDetail records, and in the other direction, one orderDetails record will only pertain to one donutOrder. The orderDetails table has a composite primary and composite foreign key key consisting of donutOrder_ID and Donut_ID which shows the intersection data of the Donut and donutOrder tables. C. Develop the SQL code to create each of the third normal form tables you designed in part A and refined in part B: CREATE TABLE `Customer` ( `Customer_ID` INT UNSIGNED NOT NULL, `First_Name` VARCHAR(25) NOT NULL, `Last_Name` VARCHAR(25) NOT NULL, `Address` VARCHAR(25) NOT NULL, `Apt` VARCHAR(4), `City` VARCHAR(25) NOT NULL, `State` VARCHAR(2) NOT NULL, `Zip` VARCHAR(5) NOT NULL, `Home_Phone` VARCHAR(12) NOT NULL, `Mobile_Phone` VARCHAR(12), `Other_Phone` VARCHAR(12), PRIMARY KEY (`Customer_ID`) ); CREATE TABLE `Donut` ( `Donut_ID` TINYINT UNSIGNED NOT NULL, `Donut_Name` ENUM('Plain', 'Glazed', 'Cinnamon', 'Chocolate', 'Sprinkle', 'Gluten-Free'), `Donut_Description` VARCHAR(255) NOT NULL, `Unit_Price` Decimal(5,2) NOT NULL, PRIMARY KEY (`Donut_ID`) ); CREATE TABLE `donutOrder` ( `DonutOrder_ID` INT UNSIGNED NOT NULL, `Customer_ID` INT UNSIGNED NOT NULL, `Order_Date` DATETIME DEFAULT CURRENT_TIMESTAMP, `Special_Notes` VARCHAR(255), PRIMARY KEY (`DonutOrder_ID`), FOREIGN KEY (`Customer_ID`) REFERENCES Customer(Customer_ID) ); CREATE TABLE `oderDetails` ( `DonutOrder_ID` INT UNSIGNED NOT NULL, `Donut_ID` TINYINT UNSIGNED NOT NULL, `Quantity` INT NOT NULL, PRIMARY KEY (`DonutOrder_ID`, `Donut_ID`), FOREIGN KEY (`DonutOrder_ID`) REFERENCES donutOrder(DonutOrder_ID), FOREIGN KEY (`Donut_ID`) REFERENCES donut(Donut_ID)


Información del documento

Subido en
17 de febrero de 2023
Número de páginas
12
Escrito en
2022/2023
Tipo
Otro
Personaje
Desconocido
$13.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
DRBRIGHT2026
3.7
(192)
Vendido
967
Seguidores
697
Artículos
7057
Última venta
1 semana hace




Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes

Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.