Intro to Databases

Patrick Brown Jr.
Aug 23, 2017 · 3 min read

What is a Database?

A database is an organized collection of data held on a computer. It is a collection schemas, tables, queries, reports, views, and other objects. Database designers typically organize the data to model aspects of reality in a way that supports processes requiring information.

A database-management system (DBMS) is a computer-software application that interacts with end-users, other applications, and the database itself to capture and analyze data. A general-purpose DBMS allows the definition, creation, querying, update, and administration of databases. Well-known DBMSs include MySQL, PostgreSQL, MongoDB, MariaDB, Microsoft SQL Server, Oracle, SAP HANA, SQLite and IBM DB2. — Wikipedia

Relational vs Non-Relational Databases

As hinted above, there are two main types of databases. These can also be referred to as SQL and NoSQL databases respectively. These databases differ greatly in how they are built, the information they store, and how they store that information. Relational databases are very structured, much like how phone numbers and addresses are stored in a phone book. Being the opposite, non-relational databases are much less structured and free flowing. Non-relational databases can be compared to file folders that could hold everything from your phone number, to the type of car you drive, to your ten closest friends.

Relational/SQL Database

Developed by IBM in the 1970s, SQL databases were created for maximum organization. These databases consist of two or more tables that contain columns and rows. Each row represents a single entry and each column represents a specific type of information, such as a street name or phone number. The relationship between tables and how the database is organized is called a schema. Because of the rigidity of these databases, the schema must be clearly defined before any information can be added to the database. Planning and knowing the data expected in the database is key in keeping an effective SQL database. If for example you set an SQL database to store 10 digit phone numbers, but later realize that you need an extra digit to store international numbers, the whole database would need to be edited. As you can see, the great organization can result in less flexibility.

Non-Relational/NoSQL Database

In comparison, NoSQL provides less structure with more flexibility. These databases have been around since the 1960s but have gained popularity recently with the surge of big data and companies like Facebook, Google, and Amazon. These databases are also beneficial if you don’t have the luxury of knowing your data requirements before starting a project. Instead of using tables, these databases or document-oriented. This allows unstructured data (articles, photos, social media data) to be stored in documents that can be easily found. Though more intuitive, NoSQL databases often require more processing power and more overall storage since they are not quite as organized.

Which is best to use?

As I am sure you can gather by now, there is no one perfect database type to use when deciding how to organize your data. For this reason, many large companies use a combination of relational and non-relational databases to store and manipulate their data. It is best to do extensive research, make a detailed plan, and even consult an experienced professional when deciding which database is best for you.

)
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade