database

Search Entity by Current Version as well as Previous Version

A search function for a management software was supposed to be able to lookup a customers data by searching with their address. Addresses can change and if for example a customer moved and thus their address changed, it should still be possible to find said customer with their old address. This functionality was required for some other entities as well, so implementing it generally was favorable. Instead of explicitly modeling for every such entity that it can have multiple values over time, I used an extensions for the Hibernate persistence framework called Envers for auditing tables. Which effectively means that an update to any row in an audited table will automatically insert the old row in an extra table which contains all previous versions of the row. Now instead of just searching the address table with the current addresses, I could also search all previous address versions in the respective auditing table. Thus being able to find a customer by its old address.

Best way to save files?

My first idea would be to just use a filesystem and store my files there, but there are many advantages to use a database, since it's faster and supports ACID consistency. After looking at the pros and cons we decided to just use a MongoDB and save the bytestreams of the files in there. The data is more consistent, we can get them very quickly and since we already had a database setup we had not much effort to create our own "filesystem" in the database.

The answer is: it depends.
It depends on the programming language you are using and partially on the database you are using.
Most of the databases are services running on a web service. We can communicate with them using a special protocol, while we know the address and the port of the server where it runs. There are also databases stored in files, where we specify the target file.
Most of the programming lanugages and frameworks provide a "Connector" for databases, which allows us to communicate with the database. Of course you need to check if your programming language has a driver for the database type you want to connect to. Some frameworks or programming languaes also offer a higher level control structures called object-relational mapping, where the user can easily read or write some objects defined in the project.

OperatingSystem:

ProgrammingLanguage:

How to connect to a database? How to read or write data?

How to make a website with dynamic content? We need to store the content somewhere. And a good, searchable storage is a database. Almost every webservice needs a database. But how do connect to the database? And how do we read and write the data?

How to extract and analyze data from a machine on a production line?

During an internship in a company that produced hydraulic devices for construction machines, there was a test station on each production line that would test the characteristic of each device after its assembly. The data extracted by the station was stored in a software called Business Object that is part of the SAP package, but only a small amount of people knew how to use this database. In order to make this database usable, I created templates on the software that were usually needed. Example: A template for how to extract the number of pieces not in conformity due to a reason X per line of production. So the user only needed to enter the production lines involved, the reason X and the time period that he wanted to study and a table and graphics were automatically implemented.

Optimizing SQL Queries

In a typical university course, performing an SQL query was always a fast thing. However, when you are working on a project that grows over time, you at first might not give the performance of a query much thought. As the project grew, I had complex queries and lots of records in the database, distributed over many tables. What I didn't expect, was that from one day to another, the performance of the page went from zero complaints to constant user complaints (the page loads too slowly). As I found out way later, the bottleneck comes suddenly. It does not build up. And at that point I was stressed and had to do an overnight shift, dealing with temporarily shutting down the users and optimizing the backend queries (take a look at the JOINS, and narrow it down as much as you can). For future reference I know that I will give SQL query performance way more attention, and as the query complexity and database size grows, you should in the same step perform a check how the performance scales.

What is the most important difference between H2 and PostgreSQL

During the software implementation, it is always difficult for us to decide which one of the database should we use as the technology stack. Especially for the database. So what is the mainly difference between H2 and PostgreSQL.

how to manage unstructured data?

Require a very agile delivery system that is easily able to processes unstructured data. The system of engagement would need to be extremely dynamic.

Conversion of TechScreen from Drupal 6 to Drupal 7

A new Drupal 7 installation, module installation and database conversion

I can not set a database connection

You are unable to set your database connection.

Pages

Subscribe to database