Tag: tutorial

A look at algorithms used in RDBMS implementations of DWH systems

When you’re using a data warehouse, some actions get repeated over and over. We will take a look at four common algorithms used to deal with these situations.Most DWH (data warehouse) systems today are on a RDBMS (relational database management system) platform. These databases (Oracle, DB2, or Microsoft SQL Server) are widely used, easy to work with, and mature – a very important thing to bear in mind when choosing a platform. Although they include special features for DWH configuration (like bitmap indexes, partitioning, and materialized views) we still have to take care of data transformation ourselves.

A Database Model for a MOOC Platform

If you ran a MOOC online learning platform like edX or Coursera, how would you keep it organized? In this article, we’ll look at a database model that would do the job.You’ve probably heard of MOOC (Massive Open Online Course), a trending way to learn online. And if you haven’t, think of a MOOC program as university subjects with all materials, tests, and feedback available online. Two of the most popular online MOOC providers are

A Database Model for a Taxi Service

Call them taxis or cabs, these convenient rides for rent have been around for centuries. Nowadays, it’s a lot more complicated to run a taxi service. In this article, we’ll look at a database model designed to meet the needs of a cab company.The history of “calling a cab” began in 17thcentury London. In most places, cabs are more affordable than ever. They are also becoming a lot more accessible: we can order a taxi by phone, via mobile applications, or on the Web. Or we can use the same techniques that have been working for hundreds of years – line up at a cab station or flag one down on the street.

Again and Again! Managing Recurring Events In a Data Model

A recurring event, by definition, is an event that recurs at an interval; it’s also called a periodic event. There are many applications which allow their users to setup recurring events. How does a database system manage recurring events? In this article, we’ll explore one way that they are handled.Recurrence is not easy for applications to deal with. It can become a hurricane task, especially when it comes to covering every possible recurring scenario – including creating bi-weekly or quarterly events or allowing the rescheduling of all future event instances.

A Gentle Introduction to Common SQL Window Functions

Mastering SQL analytical functions is a necessity for an aspiring BI/DWH professional. In this article, we’ll explore the history of SQL in a BI environment. We’ll also introduce some of the more common SQL analytical functions, including RANK, LEAD, LAG, SUM, and others.SQL can be used for business intelligence (BI) applications that combine data retrieval, analysis, and computation. These computations are more complex than what we see in OLTP systems. If you’re interested in getting into data warehousing (DWH) or business intelligence, you need to go beyond plain SQL and start digging into the analytical functions (also known as window functions, windowing functions, or OVER clauses).

A Data Model for Listing Apartments and Other Rental Units

Everyone planning to move to a new location looks for good accommodations. In the Internet era, the very first place they tend to look at sites dedicated to listing rental properties. According to a poll by one well-known agency, 76% of people looking to rent turn to the internet first; this figure rises to 88% for those aged 25–34.Let’s dive into a full-fledged data model that supports such sites and their underlying features. Our model also enables site users to conveniently filter search results.

Serving Delicious Food (and Data) – A Data Model for Restaurants

What part does database design play in running a restaurant? What might the data model for a restaurant database look like? Find out in this article.A restaurant serves people with ready-made food. This is a type of business that is thriving all over the world, and often with a lot of flare. People feel very comfortable going to restaurants, and they are starting to expect a wide range of options when it comes to their next meal.

How to Develop a Simple Tic Tac Toe Game with Spring Boot and AngularJS

Everyone likes to play games, especially the simple ones. Tic tac toe is about as simple as you can get, and despite its age it is still widely played. In the past, the only way to play tic tac toe was on paper; now there are plenty of computerized options. In this article (inspired by our recent post, A Database Model for Simple Board Games ), we’ll present a tutorial on building a tic tac toe web application with Spring Boot and AngularJS. The final code is hosted on GitHub.

Viewing Holidays With Data Modeler’s Eyes

Celebration!! Family time!! Long drive!! A day at the beach!! All these words buzz into our minds when we think of holidays. Have you ever considered how a multinational company keeps track of holidays across the globe? There must be a data dictionary to maintain all these details so that they can ensure seamless business with their local partners.This article will explain such a data model.The Project Requirements in a Nutshell

Creating a Data Model for Carpooling

Nowadays, carpooling is accepted and promoted by people around the globe. It certainly reduces one’s personal carbon footprint, and it can be more cost-effective than renting or buying a car.Carpooling also takes a lot of work – organizational work that can readily be done by a well-designed database. This article explains a detailed data model that a carpooling website could use.Data Design, Meet CarpoolingSo, we need to design a data model for a ride-share (aka carpooling) website.

Problem Set 2 – Identifying Entities and Attributes

In an earlier article on data modeling we promised to give you a set of exercises to practice finding entities and attributes. Here is the second installment of our problem set. Enjoy.Problem 1: CountriesDescription:Find the right entities and their attributes to represent all the countries in the world, their interior regions (which can be called states, provinces, or regions) and their cities. We want to represent each country’s name, continent, date of independence, type of government and population. For each region (or province, state, etc.) we wish to store the capital city, the name of the governor, and the population. Finally, for each city we want to have the name, founding date, population, and the number of schools per inhabitant. We would also like to represent what every country calls its interior regions.

Renting out Cars Is as Simple as Driving: A Data Model for a Car Rental Company

You might have rented a car on your last vacation. You reserved your car online, and then picked it up from its designated location after paying all the previously-agreed charges. Once you were done, you returned it to the agency and perhaps paid some additional fees. Did you ever think about the system that makes all these things happen? In this article, we’ll look at a data model for a car rental system.

Problem Set 1 – Identifying Entities

In an earlier article on data modeling we promised to give you a set of exercises to practice finding entities. Well, here they are. Have fun!Problem 1: Language SchoolMr. Trotter, the proprietor of a rapidly-growing language school, wants to introduce a new system in his company. He can no longer keep track of all the information on his own, so he’s asked for our help. He is a bit chaotic, though. This is what he said:

Database Modeling

I wrote a song about dental floss but did anyone’s teeth get cleaner?Frank ZappaWhen we think of the dental office, our first associations are the drill, the pain, and the fear. OK, that sounds bad. Besides taking care of teeth, a dentist has many other obligations that are professional, legal, or both. All of them require proper data management.To meet this documentation requirement, many dental and medical offices use paper records. Slowly but surely, though, there’s a trend towards the digital records and management of the 21st century.

How Does Database Design Help Organize Teachers, Lessons, and Students?

An investment in knowledge pays the best interest.Benjamin FranklinIn the modern world, education is omnipresent. Now more than ever before, it plays an important role in our society. It’s so important, in fact, that many of us continue our education well after finishing school or college.We have all heard of lifelong learning, non-formal education, and workshops for all ages. These methods differ from formal education in many ways, but they also have things in common. There are classes, lessons, teachers, and students. And just as in a traditional setting, we’ll want to keep track of the class schedule, attendance data, and instructor or student achievement. How can we design a database to meet these needs? That’s what we’ll cover in this article.

Vertabelo Advent Calendar

From today until Christmas Eve, we’re going to publish some tips & tricks for Vertabelo . Check our blog every day for a new one!List of all available tips: How to move a column up or down Use keyboard shortcuts in Vertabelo! How to copy tables between models How to make a column unique How to quote table names in generated SQL script How to create a multicolumn primary key

Database Modeling Course (2)

You’re finally ready to get down to real data modeling. We’ll start off with entities and their attributes. Entities are the basic building block of every data model. In this post, you’ll find out what they are and how to identify them.What Is an Entity? What is a Specific Instance of an Entity?Data models help us to identify what kind of information we’ll store in our system. We use such models to address the question

Database Model for a Messaging System

People love to communicate. We often joke that any software system always evolves into a messaging system. This article will explain the system requirements and step by step approach to design a data model for a messaging system.Requirements in NutshellThe core functionality of a messaging system in an application is tosend notifications/messagesto a user or a set of users. Our system also allows one to send messages to a user group. User groups can obviously be formed on some parameters like access privileges, geographical location of users, etc.

Database Modeling Course (1)

Data modeling is an essential step in the process of creating any complex software. It helps developers understand the domain and organize their work accordingly. In this article, which begins a new series devoted to database modeling, we’ll try to convince you why you should include it in your projects and what it looks like.Do I Really Need Data Modeling?As a novice developer, you often start your programming adventure withsimpleapplications like the sieve of Eratosthenes or enumerating the Fibonacci sequence. In such cases, a data model is not required – these programs are quite simple and they have a clearly defined input and clearly defined output. The difficulty of these tasks lies in the algorithm which has to work correctly and quickly. The data themselves are easy to understand: you provide some parameters and you get a set of numbers as a result.

Modeling a Database for Recording Sales. Part 1

Storing sales data properly and later combining it can lead to creating a predictive model with a high rate of accuracy. In this and the next few articles we’ll analyze a database design for recording sales.Everyone lives by selling something.Robert Louis StevensonIn today’s world,selling productsis ubiquitous. And salespeople who have access to robust tools that leverage historical data to analyze trends and enable an enterprise to adjust business strategies accordingly have an advantage over their competitors. There are lots of parameters that can affect company results: the current global economic situation, clients’ location, age, material and marital status, and history of previous contacts or sales to clients.

Tackling Your Troubles – Building a Bug and Problem Database

Death and taxes – add “software problems” to that list of the inevitable. There is always a new issue, a new failure, a new key opportunity that an organization must address. And to avoid repeating the problems, or to revise your prior fixes, it is critical to capture the problems accurately and completely. You need a history of what happened and when. In this piece, we create the logical model for a problem or “bug” reporting system.

Generate jOOQ Classes With Vertabelo and Gradle

jOOQ is a Java Object-Relational Mapper that lets you build type safe SQL queries through its fluent API. Using built-in Vertabelo support we can generate sufficient code from the previously designed model. Generated Java classes correspond to database tables, records, etc. This time, we automate this process by using Gradle build system.There are two ways to generate ready to use Java classes with Vertabelo : Generate jOOQ classes via Vertabelo XML

Defining Identifying and Non-Identifying Relationships in Vertabelo

Various data modeling tools allow modelers to define relationships in a data-model as identifying or non-identifying. We can define a relationship as identifying or non-identifying in Vertabelo as well. This article will explain the way to do so.IntroductionBefore moving ahead with the article, I’d like to explain whatidentifyingornon-identifyingmean.Let’s take a real time example of a book storing system. In the system, a book belongs to an owner, and an owner can own multiple books. But the book can also exist without the owner and it can change the owner. Thus the relationship between a book and an owner is a non-identifying relationship.

Database Model for a Driving School’s Reservation System. Part 2

Let’s build further changes into the data model, which I created in my earlier blog post , such as having an automated approach to assigning an instructor and vehicle to a lesson, invoicing to customers and tracking of them.First off, I need to build logic on the application side to assign an instructor and vehicle to lessons before they actually take place. The main thing to ensure here is availability, i.e. an instructor or vehicle can be assigned to a lesson only if both of them are available on the scheduled time of the lesson.

How to Keep Track of What the Users Do

In several of the projects we have worked on, customers have asked us to log more user actions in the database. They want to know all of the actions the users perform in the application, but capturing and recording all human interactions can be challenging. We had to log all modifications of data performed via the system. This article describes some of the pitfalls we encountered and the approaches that we used to overcome them.

Designing a Data Model for a Hotel Room Booking System

It’s common knowledge that the best way to learn something is to practice it in a real-life scenario. Obviously, the same applies to database modeling. Therefore, in this article I decided to teach you how to create a simple database structure, taking a textbook example of a hotel room reservation system. I will show you how to get started and give you some ideas for extending the model.Database Modeling: Discover, Discover, Discover

jOOQ and Vertabelo – Getting Started

jOOQ and Vertabelo perfectly complement each other in the application development lifecycle. With Vertabelo you can easily design a database structure that saves you from writing DDL code manually, while jOOQ handles the generation of Java classes corresponding to database tables, and allows to construct SQL queries through its fluent API.The integration of Vertabelo and jOOQ has been the subject of several articles published on our blog. Unfortunately, all of them, including

Database Model for a Driving School’s Reservation System. Part 1

I need to design a data model for a reservation system for a driving school. The subject area looks quite straightforward, but complexities are still involved. You have to track all requests from clients and keep track of resources (vehicle, time and instructor) consumed during lessons.IntroductionI like to use adomain driven approachfor designing a data model. It makes me put technology obsession aside and concentrate primarily on modeling the subject area revolving around its associated entities and relationships amongst themselves.

How to Design a Database Model for a Movie Theater Reservation System

Do you like going to the movies? Have you ever considered what the database design behind their reservation system looks like? In this article we’ll prepare an example database model for a movie theater.There are a few assumptions we have to bear in mind:contemporary multiplex movie theaters can have one or more auditoriums within a larger complex,each auditorium can have a different number of seats,seats are numerated with row number and seat position within a row,

Adding More Advanced Features Like Managing Categories and Voting on Threads and Posts

In my second article about an online forum, I mentioned that there might be several more advanced features to be added:Forumcategoriesand sub-categories where each category has a subject, several moderators and additional information like creation date of the category.Apostmight have asubjectin addition to the content.We might want to allow users tovote upandvote downon threads and posts.To be able to grasp the model more easily, we have prepared an example of such a forum with categories, threads, posts, etc. We hope that this makes it easier to understand things:

Making a More Advanced Model With User, Thread, and Post Statuses

In my first article about an online forum, I mentioned that there might be several more advanced features to add:Moreformal details about the userinstead of a single “name” field. You may want the user’s first name, last name and username or nickname. A nice forum would also allow users to have a profile picture, email, roles, status (to allow users to be blocked), and other information like when they last visited the forum.

How to Convert a Data Model Between Two Database Management Systems

Even though Vertabelo doesn’t provide a direct conversion of a data model from one database engine to another, this can be easily done in a few simple steps.The user’s questionWe’ve been developing a web application for a while. Initially, we wanted to use MySQL for our database but finally we decided to choose Postgres. Unfortunately, the entire data model was created for MySQL. How can we quickly migrate it to the new database type? Is there a simple way to do this in Vertabelo?

A Database Model for an Online Survey. Part 4

In this final article in a four-part series, I complete the design for an online survey database to provide flexibility for multiple surveys, question re-use, multiple choice answers, ordering of questions, conditional jumps in the survey based on responses, and control over the users’ access to surveys via groups of survey owners.IntroductionIn the conclusion to Part 3 of this series of articles, I mentioned that I would be adding more advanced features in this article. Those advanced features are:

New Features in Vertabelo Released in April 2015

Tell us what you want!If you have your own ideas for new features or you think that something could be improved in our application, do not hesitate to share your opinion. Send your suggestions to us via our Support Service . There, you can upvote or downvote new feature requests placed by other users. That way, you can have a significant impact on the development of our application. Go to Vertabelo’s Support Service »

How to Generate Flask-SQLAlchemy Models Using Vertabelo

Flask is a web microframework for Python. It uses Flask-SQLAlchemy for object relational mapping. It is a Flask wrapper for SQLAlchemy – a powerful relational database framework that offers a high level ORM and low level access to a database’s native SQL functionality.For each database table, SQLAlchemy uses a regular Python class with attributes that match the columns of a corresponding database table. The database instance from Flask-SQLAlchemy provides a base class for models called

A Database Model for an Online Survey. Part 3

In the conclusion to Part 2 of this series of articles, I mentioned that I would be adding more advanced features, such as:Conditional ordering of questionsin a survey or, in other words, the possibility for a conditional path through the surveyAdministrationof the surveyReportsandanalyticsIn this third article related to anonline survey, I will extend the functionality to support conditional ordering of questions.In the future, we may add questions that require a rated response. For example: “How much do you like database design, rate between 1 and 100 (with 1 indicating that you like it very little and 100 indicating that you like it immensely)?”

Designing & Deploying a PostgreSQL Database in the Cloud

Our users sometimes say to us: “Vertabelo is awesome but… how can I add the data?”  Oh, come on! Vertabelo is not a database engine or a database administration tool. At least not at the moment. For now, Vertabelo is intended mainly to design database models. This doesn’t mean that we don’t care about what you can do next with models created in our application. Of course, we do! That’s why we provide our users with some useful tools on

A Database Model for an Online Survey. Part 1

I need to create the design for a new database which will be thedata layerfor an application; the application will be an onlinesurveyor polling like Survey Monkey. My challenge is that the functionality that I require is not supported by existing survey sites, so I need to build my own. What I need is a conditional survey (if the answer to question 4 is “yes,” then we ask question 5 and skip question 6; but if the answer to question 4 is “no,” then we skip question 5 and ask question 6).

Modeling a Basic Data Structure to Manage Users, Threads, and Posts

An online discussion forum is a site wherepeoplecan holdconversationsin the form of postedmessages. Discussion forums allow conversations to take place when people are not on-line, and messages may be temporarily archived. Also, depending on the forum set-up, a message might need to be approved by a moderator before it becomes visible to other users. Forums have a specific set of terms, for example, a single conversation is generally referred to as a “thread”. Threads can be replied to by as many people as would like to. Most forums require users to register and subsequently log in to post messages. However, on most forums, users do not have to log in to read existing messages.

Now You Can Print a Diagram

We hadn’t planned on adding a feature to print diagrams. Our original idea was that Vertabelo would supersede paper diagrams. Nevertheless, some of our users pointed out that they rely heavily on printouts ( Export to PDF  topic). So, I’d like to announce a new feature called “Export to PDF” also known as “Printing.”Note that exporting a database model to a PDF file is available for Premium and Team account plans only (see the comparison of the plans’ features in our

Database Design 101

In this video you will learn how to start creating your database model. You will find out why nouns are important and how you should handle them when creating a database model.If you want to learn more, read our beginner tutorial on how to create a database model .

How to Create a Database Model From Scratch

So you want to create your first database model but you don’t know how to start? Read on!I assume you already know a little about tables, columns, and relationships. If you don’t, watch our video tutorials before you continue.Start With a System DescriptionYou should always start creating a database model with a description of a system. In a classroom situation, a system description is given to you by a teacher. In real life, preparing a description is a

Database Design 101

In this video tutorial you will learn about references – how to create a relationship between the tables, how it affects their structure, and how it looks in the data.

Database Design 101

Vertabelo presents part 2 of our Database Design 101 series that brings you easy-to-understand introduction to databases. This time we will focus on table columns and most commonly used data types.

Database Design 101

Welcome to our new Database Design 101 series that brings you an easy-to-understand introduction to databases. Let’s begin with answering the question what a database is and how data is stored in databases.

Database Design 101

A good data modeling exercise for beginners is to create a data model of an online store. Every time I give this exercise to my students, I’m surprised at how difficult it is for them.Find the Concepts…Let’s see how it can be done. We know we have to create a table for every concept in the domain. Think about thenouns and noun phrases you would use to describe the domain. Roughly, every noun iseither a concept, an attribute of a concept, or an example