Today I heard during a popular lecture about the applications of category theory, than an object in the category should always be some kind of mathematical structure e.g. a set, ring, monoid, etc. So I can't just say let's define database tables as objects in the category of...Or lets define data types as objects in the category of...and so on, because it's wrong. I have to proof in some way that some thing is really an object in the category. So as I understood there are some laws or criterias that every object in any category should satisfy or we can't call them "objects".
But I couldn't find any really formal definition of an object in the category. I always thought that category theory is very abstract and we can call objects not only mathematical structures but whatever we want just declaratively. I agree with the point that if I say:"Let objects of the category be magmas. Than - yes, I should proof this". But can I call an object every thing I want without formal proof?
So I' interested are there really some laws that object in the category should satisfy and we define some kind of category we should proof that some element is really an object.
This is a really restricted point of view on category theory. Of course, the simplest examples that come to mind when talking about categories are such, but if category theory was only about those, it would be nothing else than a fancy language.
I give you some examples where the objects are not mathematical structures:
For any monoid $M$, there is an associated category $\mathbf M$ with a unique object that I denote $\star$ and such that $\hom_{\mathbf M}(\star,\star) = M$ (where composition is the product in $M$). In that example, the object $\star$ is completely "inert", it can be anything and you don't care.
For any poset $(P,\leq)$, there is a category $\mathbf P$ whose objects are the elements of $P$ and such that: $$ \hom_{\mathbf P}(x,y) = \left\{ \begin{aligned} \{\ast\} &\quad \text{if $x\leq y$,}\\ \emptyset &\quad \text{otherwise} \end{aligned} \right.$$ and the composition is the only one possible. For example, taking the poset of strictly positive natural numbers with the divisibility relation, one gets a category where the object are natural numbers (in particular, not structures!).
For a topological space $X$, there is a category (in fact a groupoid) $\Pi_1(X)$ called the fundamental groupoid of $X$. Its objects are the points of $X$ (again, these are not structures) and the morphisms are the paths between those points up to homotopy. (Composition is the concatenation of paths.)
It seems that you can in fact look at database from the categorical point of view. I don't know much about database, so I let you be the judge of the document.