Search This Blog

Showing posts with label database. Show all posts
Showing posts with label database. Show all posts

9/15/2011

Care about Entity-Relationship Model

Entity-Relationship Model is the famous model of databases and their entities, properties and relationships.

At first, it looks a simple model if we concentrate in the reality. This is true, if the properties of each entity and the relationship between entities are realy consistent with truth at any condition. It is important to take care about the names used for each entity and the point in wich they can be broken into other entities to avoid duplicate data.

Although, there are details that I have saw recently: I think there is a natural trend for modelers to link some entities to entities that represent actors (people) instead of linking where they really would need to be linked (to preserve the referential integrity).

6/25/2011

Unicode

If you work with Web programming, you might have used character encoding. At begining, computers have used ASCII, that provides basic symbols of English language and some special computer control characters. It was done using 1 byte per character, that could provide 256 characters. In practice, there were only 128 characters, because the first bit was not used.

When other countries starts to use computer, they needed to work with their own language, but ASCII did not provide all language symbols. To resolve that, it was created table maps that associates a symbol with a specific byte. One common charset was ISO-8859-1, that provides Latin symbols. Although, was created many different charsets, incompatible between them and was hard to make programs that suports many languages (many charsets).

To solve this new problem, the Unicode was created. This article shows what unicode is, what are its benefits and how to work with it.

6/01/2011

PDO - PHP Data Objects

What is PDO?

PDO (PHP Data Objects) is a PHP module created in the Object Oriented Paradigm, and its goal is to provide a standarized way to PHP connect/comunicate to a Relational Database. It was created in PHP version 5. So, PDO is an interface that defines a set of classes and its method signatures to comunicate with a Database.

Each Database Management System (DBMS) can provide its own driver to PDO. Although PDO provide method signatures, some features can not be supported by some DBMS. So, calling this kind of method may be "useless", depending the driver was used or the DBMS model/version. For example, some engines of MySQL DBMS do not support transactions, so, the method "beginTransation" (that begin a new transation) simply take no effect at this condition.

5/10/2011

Data Warehouse

Data Warehouse is a computer system that keeps organization data. Since sectors names until operational data. For example, in a university system, the data warehouse provides classes informations (avaliations, students, professors), it is the operational level of any university.

4/22/2011

How to create an ORM layer

Last post was about the concept of ORM. This post is about what we expect in an ORM layer and some tips of how to implement an ORM layer by yourself.

Object Relational Mapping (ORM)

Well, for my first post about technology, I decided to write about something high level and, suddenly, that is not so known between PHP programmers: ORM. I expect, initially, to show the concept and maybe, in future posts, inspect it with more acuracy.