Skip to main content

Databases

Database Normalization: Scratching the Database Surface

·7 mins
Introduction # Database normalization is the process of structuring a database, in accordance with a series of normal forms in order to reduce data redundancy and improve integrity. In other words, database normalization is basically breaking a table into two to prevent repetitive columns aka data redundancy. It entails organizing the columns (attributes) and tables (relations) of a database to ensure that their dependencies are properly enforced by database integrity constraints. It is accomplished by applying some formal rules either by a process of synthesis (creating a new database design) or decomposition (improving an existing database design).

Sending POST Request in Go with a Body

Introduction # Send a POST request in golang is pretty daunting if you have a post body and you’re coming from a scripting language like JavaScript or Python. Here in Go, schema for JSON needs to be defined beforehand in order to marshal and unmarshal string back and forth to JSON. Simple POST # This marshaling/unmarshalling could be an oneliner if your request body is not nested, or is one level deep, or there is not even a body. Consider this example:

Introduction to BoltDB

·5 mins
Why use BoltDB # Bolt plays pretty well with Go’s concurrency model, we can do multiple reads concurrently. For pro and cons, I will contrast it with similar database SQLite. I have done SQLite when I worked with Xentrix to develop GUI tools for the artists. You may want to connect with me on LinkedIn. Pro # It is native go. This means you don’t need any database server running, like SQLite. In oppose to Redis and memcached.