

















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


















www.company.com
mysql – u root – p
www.company.com
mysql – u root – p
www.company.com
ON . TO ‘userid'@'localhost' IDENTIFIED BYPASSWORD '*D821809F681A40A6E379B50D0463EFAE20BDD12‘
the password is yourpassword.
www.company.com
the password is yourpassword.
sql commands for creating DB
www.company.com
On your console, you’ll see
www.company.com
| dw | +---------------+ 1 row in set (0.00 sec)
www.company.com
customer_street_address CHAR ( 50 ), customer_zip_code INT (5), customer_city CHAR (30), customer_state CHAR (2), effective_date DATE, expiry_date DATE ); After running this command You’ll see something similar to this on your console: Database changed Query OK, 0 rows affected
( product_sk INT NOT NULL AUTO_INCREMENT PRIMARY KEY, product_code INT, product_name CHAR ( 30 ), product_category
www.company.com
product_name CHAR ( 30 ), product_category CHAR (30), effective_date DATE, expiry_date DATE );
After running this command You’ll see something
similar to this on your console:
Database changed
Query OK, 0 rows affected
( date_sk INT NOT NULL AUTO_INCREMENT PRIMARY KEY, date DATE, month_name CHAR ( 9 ), month INT ( 1 ), quarter INT ( 1 ), year
www.company.com
CHAR ( 9 ), month INT ( 1 ), quarter INT ( 1 ), year INT (4), effective_date DATE, expiry_date DATE );
After running this command You’ll see something
similar to this on your console:
Database changed
Query OK, 0 rows affected
( order_sk INT, customer_sk INT, product_sk INT,
order_date_sk INT, order_amount DECIMAL ( 10 , 2 ) );
www.company.com
After running this command You’ll see something
similar to this on your console:
Database changed
Query OK, 0 rows affected
www.company.com
'customer_name' char ( 50 ) default NULL, 'customer_street_address' char (50) default NULL, 'customer_zip_code' int (5) default NULL, 'customer_city' char (30) default NULL, ‘customer_state' char (2) default NULL, 'effective_date' date default NULL, 'expiry_date' date default NULL, PRIMARY KEY ('customer_sk') ) ENGINE=InnoDB DEFAULT CHARSET=latin 1 row in set (0.00 sec) Using the same command, you can verify the other four tables were created successfully.
www.company.com
customer_city,customer_state,effective_date, expiry_date) VALUES (NULL, 1, 'Big Customers' , '7500 Louise Dr.', '17050', 'Mechanicsburg', 'PA', CURRENT_DATE, '9999-12-31'), (NULL, 2, 'Small Stores', '2500 Woodland St.', '17055', 'Pittsburgh', 'PA', CURRENT_DATE, '9999-12-31'), (NULL, 3, 'Medium Retailers', '1111 Ritter Rd.', '17055' , 'Pittsburgh', 'PA', CURRENT_DATE, '9999-12-31');
www.company.com
customer_number: 1 customer_name: Big Customerscustomer_street_address: 7500 Louise Dr. customer_zip_code: 17050 customer_city: Mechanicsburg customer_state: PA effective_date: 2010-09- expiry_date: 9999-12-
**************** 2. row ******************* customer_sk: 2 customer_number: 2 customer_name: Small Stores
www.company.com
customer_name: Small Stores customer_street_address: 2500 Woodland St. customer_zip_code: 17055 customer_city: Pittsburgh customer_state: PA effective_date: 2010-09- expiry_date: 9999-12-