Category Databases

The core schema-design principles I follow

Here are the core schema-design principles I follow: Start from the business grain: define exactly what one row represents, e.g. “one trade execution” or “daily account balance per portfolio and currency.” Everything follows from this. Preserve raw data: keep an…

How to reset your WordPress password via SQL

You may have the need to reset your wordpress password and here I’ll show you how to do that, assuming you have access to your sites MySQL database. WordPress stores the password for your user in the wp_users table. The…

How to export CSV file to database with Python

Pandas and SQLAlchemy offer powerful conversions between CSV files and tables in databases. Here is a small example: import pandas as pd from sqlalchemy import create_engine df = pd.read_csv(‘mydata.csv’) engine = create_engine(”) df.to_sql(‘mytable’, engine) Read more: pandas.DataFrame.to_sql sqlalchemy engines