Introduction There is a learning page for turning on database secret engine for postgresql but for my environment it is MariaDB, this post records on how to enable database engine to automatically rotate secrets for MariaDB user. This feature is very similar to CyberArk on password rotation for nix servers and database. For this lab, … Continue reading Hashicorp vault – Enable database secret engine for MariaDB/MySQL
Tag: Database
[python]Flask Migrate
Flask Migrate advantage This is for easy update of the existing database, such as create a new column, create a new table, drop a table, revert previous database. With migrate, I do not need to do the db.create_all() anymore. A note on sqlite3, once a table is created you cannot insert column directly, need to … Continue reading [python]Flask Migrate
[python] Create database with flask-sqlalchemy
On previous post I have used a pure SQLAlchemy module to just create the database, this time I am using Flask_SQLAlchemy to do it, which makes the creation simpler. I will need to put in two configuration parameters: SQLALCHEMY_DATABASE_URI SQLALCHEMY_TRACK_MODIFICATIONS For the configuration I have put them in a config.py file. As usual you need … Continue reading [python] Create database with flask-sqlalchemy
[python]Create database with SQLAlchemy
The objective of learning SQLAlchemy is to use its Object Relational Mapper (ORM), this allows programmer who does not do SQL syntax to also do CRUD on supported database, the ORM does the "translation or mapping" for us in the background, in our code we only need to do CRUD with python syntax. The SQLAlchemy … Continue reading [python]Create database with SQLAlchemy
Database – Normalisation
All the examples will use this simple table for explanation. Attribute is column, and tuple is row. In this table the attributes are from A to F. Functional dependency A is determinant, B is dependant. B is functional dependent on A. A and B are composite key which functionally determines C. The determinant must only … Continue reading Database – Normalisation
Database: Check all tables from a known owner
This is an oracle 12c query to find out all tables that are owned by "cyrus". select owner,table_name from all_tables where owner='CYRUS'; the contents in the row is case sensitive, in this example the content in row "owner" is CYRUS not Cyrus or cyrus. another way if you do not know the case of the … Continue reading Database: Check all tables from a known owner