SYS-CON MEDIA Authors: Stackify Blog, Zakia Bouachraoui, Elizabeth White, Pat Romanski, Liz McMillan

Blog Feed Post

A Newbie Guide to Databases

image_pdfimage_print

Databases are an incredibly useful tool for storing data. Similar to a library storing books in an organized structure consisting of categories – such as history or art – a database imposes order on your data so that you can quickly construct the information you are looking for. Different types of databases use different structures to organize the data. The kind of database you need to use depends on the nature of your data and how you plan to use it.

A Brief History of Databases

In 1956, IBM introduced hard disk drives that could directly retrieve the information you needed, without having to trawl through all the data stored on the drive. This required data to be organized so that the computer could find and retrieve the correct record. IT giants of the day – IBM and UNIVAC – developed the early database systems.

Structured query language (SQL) is a way of managing information held in databases. It has been very widely used since its development in the 1970s, and it is still a favorite database manipulation tool today. It’s even been extended into Object Query Language (OQL), which you can use to handle databases that contain objects, such as audio files, images, maps, videos and other data that aren’t simply numbers and characters. However, there are ways to deal with databases that go far beyond simple SQL or OQL commands. The name given to methods of database management that don’t use SQL is “NoSQL.”

Types of Databases

Databases come in many forms. Understanding the distinct differences between them will help you to understand how to use each one to store and retrieve your data.

Relational Databases are Useful for Data with a Clear Structure

Relational databases organize data into tables, with joins linking the tables together. For example, consider a company database that includes two tables: one that stores details about each employee, and one which stores information about the various departments. Each row of the first table contains information about one employee, including the number of the department where the employee works. Each row of the second table contains information about a department, including the department name, number, and location. The department number, which appears in both tables, links the tables together into a single database. Thanks to the join between the two tables, you can look up the location of the department where a particular employee works using this database.

 

 

Figure 1 – Relational tables between Employees and Departments

 

Non-Relational Databases Have a More Flexible Structure

Non-relational databases aren’t based on a series of joined tables like relational databases are. As they do not store data in the traditional rows-and-columns format, non-relational databases are harder to visualize, but they can be useful in some circumstances. For example, because non-relational databases use specialized frameworks to store data, they are often used for big data applications.

Extracting Information from Databases

To unlock the secrets of databases, you need to learn to speak their language. For relational databases, that language is usually SQL – structured query language. Some companies, including Microsoft and Oracle, have their own languages for handling databases. These proprietary languages are still based on the standard version of SQL, so you need to understand the basics of how the language works.

What is SQL?

If you want to look up or edit information stored in a database, you’ll need to write SQL scripts that tell your computer what you want to do with the data.

SQL is useful for retrieving or updating information in a relational database. You can also use SQL commands to manipulate data in a Microsoft Access database – technically the data storage in this system is not relational, but you do not need to worry

SQL vs. NoSQL: Pros and Cons

NoSQL has several advantages over SQL. NoSQL databases do not have to contain information in every row or every column. It is also easier to quickly add information to a NoSQL database.

When you are building a relational database, you first need to define the schema – the structure of the database. For example, if you want to create a database that stores customer data, such as names, phone numbers and email addresses, then you need to define these categories in the database before you start adding data to it. If you later decide that you want to add some more categories, such as customers’ usual orders, then you will need to define a new schema that includes those categories. You then have to migrate all the data in the existing database to the new schema, which for large databases can take a long time. This can lead to downtime, during which your customers cannot access functions on your site that depend on the database. Though such periods are necessary for upgrading your service, they can also damage your business’s reputation with the public.

NoSQL databases instead use dynamic schema. You can insert data into this kind of database without having to stop and redefine the database’s structure or cause any downtime. If you do not know what kind of data you’ll need to add into your database, then a NoSQL database could be a convenient choice.

 Source: http://db-engines.com/en/ranking 

Business Needs determine Scalability Needs

NoSQL databases scale more conveniently than their SQL counterparts. For relational databases, scaling is vertical. That means that as you add more data to create a larger database, you need a bigger server to handle it, and those larger servers can be expensive. It is technically possible to scale a relational database across multiple servers instead (horizontal scaling), but it is tricky to set up.

Horizontal scaling is a breeze with NoSQL databases. That means you can spread your database across multiple servers, which gives you the option of using a cheap cloud server rather than a single dedicated server.

What’s the History of NoSQL?

NoSQL had been around since 2009 when developers met to discuss the possibility of using open-source, non-relational databases to manage complex collections of online data. Since that time, four main types of NoSQL databases have been developed: key value, column-oriented, document stored and graph-based.

Which Database Server Should You Use?

There are various types of SQL and NoSQL database servers, each with its set of use cases.

  • MySQL: As one of the most popular database servers, MySQL is an easy option for developers who are new to using databases. There are many tools and libraries to help you achieve whatever you want to use. Many major industry players use MySQL, including Verizon Wireless and Zyme.

  • PostgreSQL: PostgreSQL is an advanced, open-source database management system. It’s not as easy to get started with as MySQL, but it’s the go-to solution if you need your database to perform elaborate procedures, or you need to migrate it to another solution, such as Oracle, in the future. PostgreSQL is used by many major companies, such as Skype.

  • MSSQL: The Microsoft SQL server is useful for data warehousing and analytics. The industry penetration of MSSQL is wide; if you use a Microsoft server, then it is likely to be running the Microsoft SQL Server

In addition to the SQL databases listed above, four main types of NoSQL databases have been developed:

  • Key Value: A key-value database has a hash table containing keys to particular items of data so that they can be easily retrieved. They are a good choice for large databases, particularly when you need to be able to perform quickly small read and write operations and are simple to implement. Oracle BDB is an example of a key value database.

  • Column Oriented: If you need to store immense amounts of data distributed between many machines, then a column-oriented database is an excellent choice.

  • Document Stored: A document stored database is like a key-value database taken to the next level, as you can associate several nested values with each key. They are great for allowing you to efficiently query the database.

  • Graph Based: Able to store data across multiple machines, a graph-based database has a much more flexible structure than the traditional structure of tables made up or rows and columns. This type of database is useful in social networking applications.

Is NoSQL the Future of Databases?

Despite the name, the aim of NoSQL is not to consign SQL to the history books. In fact, NoSQL stands for “not only SQL”. There are still plenty of applications where SQL is useful, such as those where you know that the structure of the data will not change. However, in situations where the amount of data you have to handle grows rapidly and could require a change in the database structure, a NoSQL database is the right choice.

NoSQL offers the flexibility that modern businesses need to help them manage massive amounts of complex data. As big data becomes increasingly important in a broad range of industries, NoSQL databases provide a format in which many different types of data can be stored and analyzed, allowing companies to gain insight into all aspects of their business.

Interested in learning more about database performance and monitoring? Read more here

The post A Newbie Guide to Databases appeared first on Application Performance Monitoring Blog | AppDynamics.

Read the original blog entry...

More Stories By AppDynamics Blog

In high-production environments where release cycles are measured in hours or minutes — not days or weeks — there's little room for mistakes and no room for confusion. Everyone has to understand what's happening, in real time, and have the means to do whatever is necessary to keep applications up and running optimally.

DevOps is a high-stakes world, but done well, it delivers the agility and performance to significantly impact business competitiveness.

Latest Stories
Docker and Kubernetes are key elements of modern cloud native deployment automations. After building your microservices, common practice is to create docker images and create YAML files to automate the deployment with Docker and Kubernetes. Writing these YAMLs, Dockerfile descriptors are really painful and error prone.Ballerina is a new cloud-native programing language which understands the architecture around it - the compiler is environment aware of microservices directly deployable into infra...
10ZiG Technology is a leading provider of endpoints for a Virtual Desktop Infrastructure environment. Our fast and reliable hardware is VMware, Citrix and Microsoft ready and designed to handle all ranges of usage - from task-based to sophisticated CAD/CAM users. 10ZiG prides itself in being one of the only companies whose sole focus is in Thin Clients and Zero Clients for VDI. This focus allows us to provide a truly unique level of personal service and customization that is a rare find in th...
Signs of a shift in the usage of public clouds are everywhere. Previously, as organizations outgrew old IT methods, the natural answer was to try the public cloud approach; however, the public platform alone is not a complete solution. Complaints include unpredictable/escalating costs and mounting security concerns in the public cloud. Ultimately, public cloud adoption can ultimately mean a shift of IT pains instead of a resolution. That's why the move to hybrid, custom, and multi-cloud will ...
In his session at 20th Cloud Expo, Mike Johnston, an infrastructure engineer at Supergiant.io, will discuss how to use Kubernetes to setup a SaaS infrastructure for your business. Mike Johnston is an infrastructure engineer at Supergiant.io with over 12 years of experience designing, deploying, and maintaining server and workstation infrastructure at all scales. He has experience with brick and mortar data centers as well as cloud providers like Digital Ocean, Amazon Web Services, and Rackspace....
Between the mockups and specs produced by analysts, and resulting applications built by developers, there exists a gulf where projects fail, costs spiral, and applications disappoint. Methodologies like Agile attempt to address this with intensified communication, with partial success but many limitations. In his session at @DevOpsSummit at 19th Cloud Expo, Charles Kendrick, CTO at Isomorphic Software, presented a revolutionary model enabled by new technologies. Learn how business and develop...
Using serverless computing has a number of obvious benefits over traditional application infrastructure - you pay only for what you use, scale up or down immediately to match supply with demand, and avoid operating any server infrastructure at all. However, implementing maintainable and scalable applications using serverless computing services like AWS Lambda poses a number of challenges. The absence of long-lived, user-managed servers means that states cannot be maintained by the service. Lo...
Serverless applications increase developer productivity and time to market, by freeing engineers from spending time on infrastructure provisioning, configuration and management. Serverless also simplifies Operations and reduces cost - as the Kubernetes container infrastructure required to run these applications is automatically spun up and scaled precisely with the workload, to optimally handle all runtime requests. Recent advances in open source technology now allow organizations to run Serv...
With the rise of Docker, Kubernetes, and other container technologies, the growth of microservices has skyrocketed among dev teams looking to innovate on a faster release cycle. This has enabled teams to finally realize their DevOps goals to ship and iterate quickly in a continuous delivery model. Why containers are growing in popularity is no surprise — they’re extremely easy to spin up or down, but come with an unforeseen issue. However, without the right foresight, DevOps and IT teams may lo...
GCP Marketplace is based on a multi-cloud and hybrid-first philosophy, focused on giving Google Cloud partners and enterprise customers flexibility without lock-in. It also helps customers innovate by easily adopting new technologies from ISV partners, such as commercial Kubernetes applications, and allows companies to oversee the full lifecycle of a solution, from discovery through management.
Docker is sweeping across startups and enterprises alike, changing the way we build and ship applications. It's the most prominent and widely known software container platform, and it's particularly useful for eliminating common challenges when collaborating on code (like the "it works on my machine" phenomenon that most devs know all too well). With Docker, you can run and manage apps side-by-side - in isolated containers - resulting in better compute density. It's something that many developer...
The use of containers by developers -- and now increasingly IT operators -- has grown from infatuation to deep and abiding love. But as with any long-term affair, the honeymoon soon leads to needing to live well together ... and maybe even getting some relationship help along the way. And so it goes with container orchestration and automation solutions, which are rapidly emerging as the means to maintain the bliss between rapid container adoption and broad container use among multiple cloud host...
Take advantage of autoscaling, and high availability for Kubernetes with no worry about infrastructure. Be the Rockstar and avoid all the hurdles of deploying Kubernetes. So Why not take Heat and automate the setup of your Kubernetes cluster? Why not give project owners a Heat Stack to deploy Kubernetes whenever they want to? Hoping to share how anyone can use Heat to deploy Kubernetes on OpenStack and customize to their liking. This is a tried and true method that I've used on my OpenSta...
Skeuomorphism usually means retaining existing design cues in something new that doesn’t actually need them. However, the concept of skeuomorphism can be thought of as relating more broadly to applying existing patterns to new technologies that, in fact, cry out for new approaches. In his session at DevOps Summit, Gordon Haff, Senior Cloud Strategy Marketing and Evangelism Manager at Red Hat, discussed why containers should be paired with new architectural practices such as microservices rathe...
Emil Sayegh is an early pioneer of cloud computing and is recognized as one of the industry's true veterans. A cloud visionary, he is credited with launching and leading the cloud computing and hosting businesses for HP, Rackspace, and Codero. Emil built the Rackspace cloud business while serving as the company's GM of the Cloud Computing Division. Earlier at Rackspace he served as VP of the Product Group and launched the company's private cloud and hosted exchange services. He later moved o...
As you know, enterprise IT conversation over the past year have often centered upon the open-source Kubernetes container orchestration system. In fact, Kubernetes has emerged as the key technology -- and even primary platform -- of cloud migrations for a wide variety of organizations. Kubernetes is critical to forward-looking enterprises that continue to push their IT infrastructures toward maximum functionality, scalability, and flexibility. As they do so, IT professionals are also embr...