Objective: The objective of this assignment is to get more experience in SQL and Relational Databases. Basically, you wi

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Objective: The objective of this assignment is to get more experience in SQL and Relational Databases. Basically, you wi

Post by answerhappygod »

Objective The Objective Of This Assignment Is To Get More Experience In Sql And Relational Databases Basically You Wi 1
Objective The Objective Of This Assignment Is To Get More Experience In Sql And Relational Databases Basically You Wi 1 (356.89 KiB) Viewed 39 times
Objective: The objective of this assignment is to get more experience in SQL and Relational Databases. Basically, you will design, create, and write SQL queries using MySQL DBMS. Requirements: In this assignment, you are asked to design and create a Weather database that includes weather reports on wind and temperature that were collected eight different stations. Creating the database and importing data: The data to be loaded in the database is provided to you in three CSV files. You will use the following 3 files, located in D2L (1ocation.csv, temperature.csv, and wind.csv), for this Assignment. Open each file and familiarize yourself with the data format. The data in these files is interpreted as follows: O O location.csv: station name, latitude, longitude wind.csv: station name, year, month, wind speed O temperature.csv: station name, year, month, temperature Create database tables to hold the data given in the three files. Make sure to identify primary keys and foreign keys as appropriate. Load the data from the given data files into the database tables. In MySQL you can load data using the following syntax (assuming the file is placed in the directory C:/ProgramData/MySQL/MySQL Server 8.0/Uploads on your c drive): load data infile 'c:/ProgramData/MySQL/MySQL Server 8.0/Uploads/location.csv' into table Location fields terminated by ',' lines terminated by '\n'; The Wind table has null values (as does the temperature table) so the load might have to look like this: load data infile 'c:/ProgramData/MySQL/MySQL Server 8.0/Uploads/wind.csv' into table wind fields terminated by ',' lines terminated by \r\n' (stationname, year, month, @vfour) SET windspeed = NULLIF(@vfour,''); If you get an error from MySQL that the file cannot be read, you can change the file permissions as follows: browse to the directory including the file using the file browser, right click on file name, choose 'Properties' and make sure all permissions are set to be 'Read and Write'.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply