Reece  Feest

Reece Feest


Seeding Your Rails Database With A Spreadsheet

Did you find a great spreadsheet you would like to use to seed your database? Or maybe your client has given you an excel sheet of information that you need to seed the database with for their webpage? I’m sure you don’t really want to, nor have the time to copy and paste all of the information into your seed file. This would take precious time away from building out a beautiful application with a bunch of great functionality! Well, you’re in luck, because today I am going to give you a step by step guide to convert your spreadsheet to a CSV file to seed your database with.

Please keep in mind, the steps regarding a spreadsheet will be based off a spreadsheet created using Numbers on a Macbook. Windows may differ in a few keys, but the steps should generally be the same.

Cleaning Up Your Spreadsheet

Image for post

Each row in your spreadsheet will account for an instance, while each column will be a value within this instance. If your spreadsheet has headers, the header of the column will be the key of the key value pair within this instance. That being said, this guid will assume, your spreadsheet has headers.

Please be sure the spreadsheet is set up with the first row being your headers and every row after that being your values that you would like to convert into an instance, of course matching each column in the row with it’s matching header.

You do not want any additional rows outside of this because it will ruin the set up of information being seeded and could cause null values within your seeded database. A title on your spreadsheet is okay, as long as it does not account for any cells. Your column headers must start on row 1 and your columns must begin at column A.

#csv-import #database #ruby-on-rails #ruby #csv

What is GEEK

Buddha Community

Seeding Your Rails Database With A Spreadsheet
Ruth  Nabimanya

Ruth Nabimanya


System Databases in SQL Server


In SSMS, we many of may noticed System Databases under the Database Folder. But how many of us knows its purpose?. In this article lets discuss about the System Databases in SQL Server.

System Database

Fig. 1 System Databases

There are five system databases, these databases are created while installing SQL Server.

  • Master
  • Model
  • MSDB
  • Tempdb
  • Resource
  • This database contains all the System level Information in SQL Server. The Information in form of Meta data.
  • Because of this master database, we are able to access the SQL Server (On premise SQL Server)
  • This database is used as a template for new databases.
  • Whenever a new database is created, initially a copy of model database is what created as new database.
  • This database is where a service called SQL Server Agent stores its data.
  • SQL server Agent is in charge of automation, which includes entities such as jobs, schedules, and alerts.
  • The Tempdb is where SQL Server stores temporary data such as work tables, sort space, row versioning information and etc.
  • User can create their own version of temporary tables and those are stored in Tempdb.
  • But this database is destroyed and recreated every time when we restart the instance of SQL Server.
  • The resource database is a hidden, read only database that holds the definitions of all system objects.
  • When we query system object in a database, they appear to reside in the sys schema of the local database, but in actually their definitions reside in the resource db.

#sql server #master system database #model system database #msdb system database #sql server system databases #ssms #system database #system databases in sql server #tempdb system database

Ruth  Nabimanya

Ruth Nabimanya


Preventing Duplicates in Databases while using Rails

For anyone creating a database whether through Rails or any other language, ensuring that there are no duplicates is extremely important. Imagine signing up for a service using a username, and learning later on that another user also has the same username. Not only would this be confusing and concerning for the user, but this could (and more than likely would) prevent a myriad of problems for your database.

If you have ever created a database through rails, you have more than likely used the Active Record helper uniqueness to check if an attribute is unique before saving it to the database like so:

class Account < ApplicationRecord
 validates :email, uniqueness: true

So what is the uniqueness helper doing for us under the hood? Uniqueness makes a SELECT SQL query to that model’s table to find if the attribute already exists, if it does not exist, it will run INSERT and persist the new instance into the database; if it does exist, however, the instance will not persist.

#sql #web-development #database #rails #preventing duplicates in databases while using rails #prevent duplicated database

Django-allauth: A simple Boilerplate to Setup Authentication


A simple Boilerplate to Setup Authentication using Django-allauth, with a custom template for login and registration using django-crispy-forms.

Getting Started


  • Python 3.8.6 or higher

Project setup

# clone the repo
$ git clone

# move to the project folder
$ cd Django-Authentication

Creating virtual environment

  • Create a virtual environment for this project:
# creating pipenv environment for python 3
$ virtualenv venv

# activating the pipenv environment
$ cd venv/bin #windows environment you activate from Scripts folder

# if you have multiple python 3 versions installed then
$ source ./activate

Configured Enviromment

Environment variables

SECRET_KEY = #random string
DEBUG = #True or False
ALLOWED_HOSTS = #localhost
DATABASE_NAME = #database name (You can just use the default if you want to use SQLite)
DATABASE_USER = #database user for postgres
DATABASE_PASSWORD = #database password for postgres
DATABASE_HOST = #database host for postgres
DATABASE_PORT = #database port for postgres
ACCOUNT_EMAIL_VERIFICATION = #mandatory or optional
EMAIL_BACKEND = #email backend
EMAIL_HOST = #email host
EMAIL_HOST_PASSWORD = #email host password
EMAIL_USE_TLS = # if your email use tls
EMAIL_PORT = #email port

change all the environment variables in the .env.sample and don't forget to rename it to .env.

Run the project

After Setup the environment, you can run the project using the Makefile provided in the project folder.

 @echo "Targets:"
 @echo "    make install" #install requirements
 @echo "    make makemigrations" #prepare migrations
 @echo "    make migrations" #migrate database
 @echo "    make createsuperuser" #create superuser
 @echo "    make run_server" #run the server
 @echo "    make lint" #lint the code using black
 @echo "    make test" #run the tests using Pytest

Preconfigured Packages

Includes preconfigured packages to kick start Django-Authentication by just setting appropriate configuration.

django-allauthIntegrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication.
django-crispy-formsdjango-crispy-forms provides you with a crispy filter and {% crispy %} tag that will let you control the rendering behavior of your Django forms in a very elegant and DRY way.


  • Django-Authentication is a simple project, so you can contribute to it by just adding your code to the project to improve it.
  • If you have any questions, please feel free to open an issue or create a pull request.

Download Details:
Author: yezz123
Source Code:
License: MIT License

#django #python 

Ruby on Rails Development Services | Ruby on Rails Development

Ruby on Rails is a development tool that offers Web & Mobile App Developers a structure for all the codes they write resulting in time-saving with all the common repetitive tasks during the development stage.

Want to build a Website or Mobile App with Ruby on Rails Framework

Connect with WebClues Infotech, the top Web & Mobile App development company that has served more than 600 clients worldwide. After serving them with our services WebClues Infotech is ready to serve you in fulfilling your Web & Mobile App Development Requirements.

Want to know more about development on the Ruby on Rails framework?


Share your requirements

View Portfolio

#ruby on rails development services #ruby on rails development #ruby on rails web development company #ruby on rails development company #hire ruby on rails developer #hire ruby on rails developers

 iOS App Dev

iOS App Dev


SingleStore: The One Stop Shop For Everything Data

  • SingleStore works toward helping businesses embrace digital innovation by operationalising “all data through one platform for all the moments that matter”

The pandemic has brought a period of transformation across businesses globally, pushing data and analytics to the forefront of decision making. Starting from enabling advanced data-driven operations to creating intelligent workflows, enterprise leaders have been looking to transform every part of their organisation.

SingleStore is one of the leading companies in the world, offering a unified database to facilitate fast analytics for organisations looking to embrace diverse data and accelerate their innovations. It provides an SQL platform to help companies aggregate, manage, and use the vast trove of data distributed across silos in multiple clouds and on-premise environments.

**Your expertise needed! **Fill up our quick Survey

#featured #data analytics #data warehouse augmentation #database #database management #fast analytics #memsql #modern database #modernising data platforms #one stop shop for data #singlestore #singlestore data analytics #singlestore database #singlestore one stop shop for data #singlestore unified database #sql #sql database