1 / 10

Launch mySQL server

This guide walks you through the process of launching a MySQL server, configuring settings in the my.cnf file, and creating necessary database files. You'll learn how to connect to MySQL using the command line interface, creating databases and loading data from CSV files. The guide also covers drawing ER and UML diagrams, developing a Python program for data ingestion, and performing cross-identification of data sets. Lastly, it includes methods to analyze completeness limits based on magnitude and color ranges.

Télécharger la présentation

Launch mySQL server

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Launch mySQL server • Login with user/passwd • Cp /etc/my.cnf ~/. • Change my.cnf • [mysqld_safe] • datadir=/home/externals/sc10008/data • socket=/home/externals/sc10008/mysql.sock • log-error=/home/externals/sc10008/mysqld.log • pid-file=/home/externals/sc10008/mysqld.pid • Create necessary database files (user=sc1008) (cd data)!!! • mysql_install_db --datadir=/home/externals/sc10008/data --defaults-file=/home/externals/sc10008/my.cnf • Launch mysql server • mysqld_safe --defaults-file=/home/externals/sc10008/my.cnf & • Check it is running • less mysqld.log

  2. Create database prob Connect to MySQL with CLI mysql --socket=/home/externals/sc10008/mysql.sock -u root Create database prob create database prob\g show databases \g use prob \g

  3. Load test data from Vizier • vizier.u-strasbg.fr • 2MASS, USNO-A2 • 1 deg region • Note the format of the data (.csv)‏ • Draw ER diagrams for both catalogs • Draw UML diagrams from ER diagrams

  4. Solution

  5. Ingest data • Write a python program to ingest data • Use MySQLdb, csv packages

  6. Ingest with SQL statement • LOAD DATA <filename> INTO <tablename> DELIMITER <delimiter> • LOAD DATA '2mass.csv' INTO TWOMASS DELIMITER “|”

  7. Cross-identification • Draw ER diagram for the database (3 tables at least!) • Draw UML diagram • Create new table structure (PK,FK)

  8. Cross-identify data sets • Use python for row-by-row cross-identification • Ingest data back into database • COS(Ra1)COS(Ra2)COS(Dec1)COS(Dec2)+SIN(Ra1)SIN(Ra2)COS(Dec1)COS(Dec2)+SIN(Dec1)SIN(Dec2) > COS(angle)

  9. Home • Ingest 2 cones of 2 deg radius (one in galactic plane, 1 in NP or SP) • Cross-identify • Plot CMD • Find completeness limit for each magnitude • Find completeness limit for each color range

More Related