• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 6 pages
Exam (elaborations)

Data Management - Applications - C170 Performance Labs - uCertify

Document preview thumbnail
Preview 2 out of 6 pages

1.1.1 - Conceptual Schema - ER Model Tables: Customer, DonutOrder, Donut Customer: PK - CustomerID Rest are customer related fields DonutOrder: FK - CustomerID, FK - DonutID Qty, SpecialNotes Donut: PK - DonutID Rest are donut fields Relationships: Customer - 1:n Identifying - DonutOrder DonutOrder - n:1 Identifying - Donut Why are the relationships in 1.1.1 Identifying? The PK's of Customer and Donut are included in the composite primary key of DonutOrder. 2.1.1 - Physical Scheme - ER Model Tables: Customer, DonutOrder, Donut Customer: PK - CustomerID Rest are customer related fields DonutOrder: PK- DonutOrderID FK - CustomerID FK - DonutID Rest of order related Donut: PK - DonutID Rest are donut related Relationships: Customer - 1:n Non-identifying - DonutOrder DonutOrder - n:1 Non-identifying - Donut Why are the relationships in 2.1.1 Non-Identifying? The PK in DonutOrder is a unique key that does not include FK of other tables. 3.2.1 - Creating a database You need to create a database named "DonutOrderingDB". create database DonutOrderingDB; 3.2.2 - Dropping database in MySQL You need to delete a database named DonutOrderingDB. drop database DonutOrderingDB; 3.2.3 - Understanding types of relationships M:M B. Each record from first table is associated with many records in second table and one record in second table is associated with many records in first table. 3.2.3 - Understanding types of relationships 1:M (or 1:n) C. Each record from first table is associated with many records in second table but each record in second table is associated with one record in first table. 3.2.3 - Understanding types of relationships 1:1 A. Single record in the first table is related to only one record in the second table and vice versa. 3.2.4 - Display Table Structure in MySQL editor Use the DESCRIBE command to display the following table structure Tables: Customer Donut CustomerDonutOrder describe Customer; describe Donut; describe CustomerDonutOrder; 3.2.5 - Create Tables in MySQL Create a table named customerdonutorder as represented in the following Physical Schema by using the CREATE TABLE command. (Hint: Use DonutOrderTimestamp TIMESTAMP DEFAULT NOW()) customerdonutorder DonutorderID INT(11) CustomerID INT(11) - FK (Customer.CustomerID) DonutOrderTimestamp TIMESTAMP SpecialNotes VARCHAR(500) create table customerdonutorder ( DonutorderID INT(11), CustomerID INT(11), DonutOrderTimestamp TIMESTAMP DEFAULT NOW(), SpecialNotes VARCHAR(500), foreign key (CustomerID) references Customer(CustomerID) ); 3.3.1 - Populate tables in MySQL Populate three tables using the Insert command. (Lots of information from the table schema I'm going to skip). insert into Customer (LastName, FirstName, Street, Apt, City, State, Zip, HomePhone, MobilePhone, OtherPhone) values ( 'Pitt', 'Brad' truncated ), ( 'Jolie', 'Angelina' truncated ); ... then its just using the same insert into command for Donut and CustomerDonutOrder.


Document information

Uploaded on
September 3, 2023
Number of pages
6
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers
$14.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
FREEMANSHARP
3.6
(29)
Sold
150
Followers
70
Items
7608
Last sold
2 months ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions

Whoops! We can’t load your doc right now. Try again or contact support.