object-oriented-database

JSON to Javascript Class

与世无争的帅哥 提交于 2019-12-10 18:12:34
问题 I have a http request that gets this Json object from a nosql database: let jsonBody = { birthday : 1997, firstname: 'foo', lastname:'bar' } Then I want to load this information into the Student model: class Student{ constructor(){ } getFullname(){ return this.lastname+' '+this.firstname } getApproxAge(){ return 2018- this.birthday } } Normally, I would add this method to this class: fromJson(json){ this.studentId = json.studentId; this.birthday = json.birthday; this.firstname = json

Migrating from 'native' OODBMS to ORM (Entity Framework / SQL Server)

痞子三分冷 提交于 2019-12-10 11:14:30
问题 A while ago we started developing a new project which internally has about 25-30 different classes/types/models that are heavily related to each other either via 1:n, n:m or n:1 relationships. Back then we went with a native .net oodbms system basically because what it allowed us to do was to take our object model and simply add a few persistence related methods(-calls) here and there and we were ready to go. However, over time we ran into more and more caveats, really bad, non-fixable

Object-oriented / Relational-Hybrid Database?

…衆ロ難τιáo~ 提交于 2019-12-08 21:22:24
I've been using relational databases + object relational mappers for object persistence. I don't think this is a truly adequate solution for persistence, because it adds unnecessary overhead. It also forces me to fit objects in a table-like structure, which sometimes can't be done gracefully - it's like fitting a square in a circle - it won't work well. Now, I am aware that there are object-oriented databases out there, but for one thing they lack support, and also the relational model works for most of the data - just not all of it. So, are there DBMS that support both object-oriented and

Can object oriented databases be a better option than a relational database with an ORM?

◇◆丶佛笑我妖孽 提交于 2019-12-07 18:06:41
问题 Just thinking that a relational db with an ORM is in many ways very similar to an object oriented database. My experience lies solely with RDMS with a hint of ORM, so it seems to me that object oriented databases are very similar but without the experience I can't say for sure. If you have used object oriented databases and ORMs can you compare them? What are the weak points associcated with object oriented databases compared to RBMS+ORM? 回答1: What are the weak points associated with object

Referencing a row from another table (PostgreSQL)

别等时光非礼了梦想. 提交于 2019-12-07 06:10:30
I'm new to PostgreSQL and I'm struggling to understand how to use a reference to an 'instance' (or row) from a table as a value within a row of another table. Here is my desired result: class User{ int age; Post[] posts; } class Post{ int postId; ... } // Sql script sqlMain{ User k = new User(20); k.addPost(10, ...); } As you can see, I want an (dynamic prefereably, like an ArrayList) array of posts as an attribute of a user. So far I have the following Script: CREATE TABLE Post( postId INT ) CREATE TABLE User( id INT, posts Post[] ) // Member function of User class CREATE FUNCTION addPost

DB4O scalability

独自空忆成欢 提交于 2019-12-06 10:26:09
问题 I'm looking for information about DB4O object database. I know it has client/server mode, but I have no idea how scalable it is. I'm a big lover of object db idea, but still couldn't find an appropriate OODB to use in any of my projects. So my questions are: I'm interested if anyone deployed DB4O in a multi client environment and how does it perform compared to RDBMS? Is any web app to date powered by DB4O? Can I use DB4O as a replacement for SQL Server (SQL Express at least)? How many

Migrating from 'native' OODBMS to ORM (Entity Framework / SQL Server)

我与影子孤独终老i 提交于 2019-12-06 08:33:08
A while ago we started developing a new project which internally has about 25-30 different classes/types/models that are heavily related to each other either via 1:n, n:m or n:1 relationships. Back then we went with a native .net oodbms system basically because what it allowed us to do was to take our object model and simply add a few persistence related methods(-calls) here and there and we were ready to go. However, over time we ran into more and more caveats, really bad, non-fixable (within a reasonable timeframe) limitations that forced us to implement slow workarounds resulting in

Method for indexing an object database

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 04:01:14
问题 I'm using an object database (ZODB) in order to store complex relationships between many objects but am running into performance issues. As a result I started to construct indexes in order to speed up object retrieval and insertion. Here is my story and I hope that you can help. Initially when I would add an object to the database I would insert it in a branch dedicated to that object type. In order to prevent multiple objects representing the same entity I added a method that would iterate

Can object oriented databases be a better option than a relational database with an ORM?

旧时模样 提交于 2019-12-05 20:13:48
Just thinking that a relational db with an ORM is in many ways very similar to an object oriented database. My experience lies solely with RDMS with a hint of ORM, so it seems to me that object oriented databases are very similar but without the experience I can't say for sure. If you have used object oriented databases and ORMs can you compare them? What are the weak points associcated with object oriented databases compared to RBMS+ORM? What are the weak points associated with object oriented databases compared to RBMS+ORM? The biggest weakness is the lack of standardization : no standard

PHP Domain Model

会有一股神秘感。 提交于 2019-12-05 16:04:01
问题 I have been programming in PHP for several years and have in the past adopted methods of my own to handle data within my applications. I have built my own MVC in the past and have a reasonable understanding of OOP within php but I know my implementation needs some serious work. In the past I have used an is-a relationship between a model and a database table. I now know after doing some research that this is not really the best way forward. As far as I understand it I should create models