Basic MySQL/MariaDB

This post is about setting up MariaDB in Linux. I am using CentOS 7.

1. Install MariaDB

# sudo yum install mariadb-server
2. Enable and start MariaDB

# sudo systemctl enable mariadb # sudo systemctl start mariadb
3. Use MariaDB

# mysql

For my project, I am preparing a YouTube database, based on a dataseet that I got from Internet. Somehow, this page is no longer available, but I have made a copy of it in my github repository.

At the MariaDB CLI, I created a database called "yt_data" with a DB user that has all privilege to this database.

MariaDB [(none)]> create database yt_data; MariaDB [(none)]> grant all privileges on yt_data.* to 'db_user'@'localhost' identified by 'db_pass'; MariaDB [(none)]> flush privileges;
In order to login to MariaDB with the user account I created to access to the database that I created, here's the command line.

# mysql -u db_user -p yt_data

Note, by default, MariaDB can be accessed without any credential. You…

NoSQL v SQL Part 1 - resource usage comparison

To skip my ranting, go to the actual topic, click here. Or you would like to jump to the summary directly.

Recently I kept getting advertisement on migrating your SQL database to NoSQL. It's been 5 years since I last deal with database related work, excluding the CRUD on database task. NoSQL was quite new to me then, our platform main database backbone was Oracle DB. I am still not sure how or why we were convinced to have a new subsystem to use MongoDB, but that's the strength of developers, creating a good looking resume profile, and new task opportunities in the company. (I don't say new job opportunities, as we don't hire new DBA to support NoSQL. I forgot, and could be I was not informed, if the DBAs were sent for training to support this. :D)

Based on my past experience and study, NoSQL was for a totally different use case. It is for non-structured database, simple design, and ...??

I just did a quick check on my profile, the my M101P: MongoDB for developers cert…

Basic MongoDB

This post is about setting up MongoDB in Linux. I am using CentOS 7.

1. Adding the mongoDB repository

> vi /etc/yum.repos.d/mongodb.repo

name=MongoDB Repository

2. Install MongoDB

> yum install mongodb-org

3. Starting MongoDB service

> systemctl start mongod.service

4. Use the MongoDB

> mongo

Voila, you can start to use MongoDB right away.

For my project, I am preparing a YouTube database, based on a dataset that I got from YouTube 2 data set.

At the mongo shell, I am creating a database called "yt_data" with a DB user that is granted with readwrite access only to this database.

> use yt_data > db.createUser( { user: "db_user", pwd: "db_pass", roles: [{ role: "readWrite", db: "yt_data"}] }); Successfully added user: { "user" : "db_user&q…

Working with github repository

It's been more than 5 years, I don't really work on any programming project. All my git/perl knowledge are gone. I was stunt a bit when looking back my documentation at Basic commands of git.

I have cleaned up my github account, and start new repository to host the files and scripts on a database related research that I am working on. Spent some time to read some more git commands online, and the instruction on github, finally I manage to link my local repository with the github repository that I created. It took me quite sometime to get things right. :(

Here's the step.

1. Create a github repository.

2. Create a local git repository.
> git init

3. Add the github repository as our origin
> git remote add origin<your github repository>

4. Clone the github repository to local (If you have files in the github repository already)
> git clone<your github repository>

5. Create a branch in local
> git checkout -b &l…

Application in Windows run as other user

I wished Windows has something like sudo... but it doesn't.

And the run as ... does not appear every time you hold a shift key, and right click on the application executable.

The next workaround is, run runas in command prompt.

runas /user: "Path to the application executable"

Continuous Delivery

I was looking for an article/talk about Flickr's crazy ideas of thousands deployments per day that my co-worker told me years ago. I want to write about Continuous Delivery. That would be my best reference. I am not sure how my LTM works, somehow I only remember Flickr, 7000, deployments per day. My best Guru, Google wasn't able to give me the answer. So, I posted my question to L, "I remember long long time ago, you mentioned some company, I think it was Flickr, aim for thousands of release in a day. Do you still have any idea about it?" After L pointed me to Martin Fowler's website, and I did further research on Google, finally I found what I was looking for!

I think any company or organisation that is moving into devops or CICD trend, should watch this presentation. It happened more than 10 years ago, but it is still very relevant.

The presentation is by John Allpaws and Paul Hammond at Velocity 2009.

If you don't have the ~ 46 minutes, you could read the …

Planning poker

I have always wanted to write about this for years. Like other old, stubborn developers, I hate process changes, and introduced to something I don't know or not familiar with. And these are not technical related to me, and I have no interest in it.

Somehow, after we are forced to do this, and got familiarised with it, we started to enjoy it. We were proud of our team velocity acceleration too!

I still can't differentiate or identify what scrum, agile, and bla bla bla is, but I think we did the estimation and planning right. It helps in our projects and sprints planning.

You could visit Wiki's page on Planning Poker or continue to read this.

I am no longer a developer, and the team dismissed long time ago. Anyway, for me to explain this easier, I will use present tense in the following. :)

Our team consists of a Project Manager, a Product Owner, a Scrum Master, who is also the tech lead of the developers, 4 other developers and 2 QAs. It starts with the features or backlogs…