Questions tagged [object-relational-model]
93 questions
12
votes
2 answers
Object oriented vs. object relational database difference
I have been reading about database models and still do not understand what are the fundamental differences between object oriented and object relational models.
I learned so far that object relational database is a relational database also which…
![](../../users/profiles/1449676.webp)
ps-aux
- 9,706
- 17
- 67
- 117
6
votes
2 answers
Update a table and its related model in laravel?
I have client table and client_address info table. I need to update both table when updating client.my model classes given below,
class Client extends Model {
public function addressInfo() {
return…
![](../../users/profiles/4617250.webp)
gsk
- 2,119
- 4
- 25
- 53
6
votes
2 answers
Is it a bad idea to use a database's primary key as business object identifier?
I wonder, is it bad or good idea to use auto increment primary key as business entity identifier such as Partner Id or Account Number?
Also, what pitfalls I can face if I'll choose that approach?
![](../../users/profiles/208062.webp)
Vokinneberg
- 1,852
- 2
- 18
- 31
5
votes
2 answers
Should I learn Linq to SQL even though its being rolled into Entity Framework?
I am looking to learn Linq to query MS SQL databases, but am unsure of which path to take. I read recently that Linq to SQL is being rolled into Entity Framework, and development has maybe stagnated.
Is it worth learning Linq to SQL still? Or should…
![](../../users/profiles/1292.webp)
csjohnst
- 1,648
- 2
- 18
- 24
5
votes
1 answer
multiple/split class associations in sqlalchemy
I have the following objects and relations defined. This is actually quite a simple case, and I am providing all those fields just to show why I believe inhalation and injection anesthesia should be defined by two different classes.
class…
![](../../users/profiles/1893275.webp)
TheChymera
- 12,857
- 13
- 46
- 81
4
votes
3 answers
Which Javascript MVC framework best handles relational data?
I'm looking to try, for the first time, a JavaScript MVC framework like Knockout, Backbone.js, Spine, JavaScriptMVC, etc.
I've started looking at some of the documentation available for these frameworks and I'm having trouble finding examples of how…
![](../../users/profiles/284685.webp)
Adam
- 39,529
- 15
- 101
- 139
4
votes
2 answers
connect SQLAlchemy ORM with the objects from sql core expression?
I have to use SQLalchemy Core expression to fetch objects because ORM can't do "update and returning". (the update in ORM doesn't has returning)
from sqlalchemy import update
class User(ORMBase):
...
# pure sql expression, the object returned…
![](../../users/profiles/2130573.webp)
WeiChing 林煒清
- 4,102
- 2
- 25
- 54
4
votes
6 answers
Does exist ORM / Framework that converts data automatically when I want to change column datatype in table?
Assume that I have existing database with existing data.
Is there any framework / ORM that generates data conversion SQL scripts when I need change column datatype?
Of course there is problem with conversions like
float to int
string to int
,…
![](../../users/profiles/621023.webp)
Michał Kuliński
- 1,828
- 3
- 26
- 50
4
votes
2 answers
How can I define a type in oracle11g that references a collection of that type?
I want to do something like this
create type Item as object (
id number,
subitems table of ref Item
)
but oracle throws an exception when I try to do it. Is this possible, and if yes then how?
![](../../users/profiles/116712.webp)
pablochan
- 5,269
- 23
- 40
3
votes
1 answer
What is an extended SQL schema?
I have an assignment where one of the questions is asking for an "extended SQL schema" of a given object-relational database. Does anyone have an idea of what this question means?
The given database tables are: car_parts, engine_parts, tires and…
![](../../users/profiles/700494.webp)
Mason
- 31
- 1
3
votes
1 answer
How can I represent this Game Owner Relationship in Laravel's Eloquent
I'm trying to tease out a logical problem that I'm having and I didn't know where else to ask!
I have two Objects whose relationship I'm trying to describe; the User and the Game. So, right now, I have that a User belongs to many Games, and that a…
![](../../users/profiles/1925245.webp)
Martin Tracey
- 315
- 1
- 6
- 17
3
votes
1 answer
Oracle sqlplus - defining typed table with no attributes but nested tables
I have an problem with my homework. I have the following type definitions:
-- Type definitions
CREATE OR REPLACE TYPE languages_table_t AS TABLE of VARCHAR2(20);
/
CREATE OR REPLACE TYPE phones_table_t AS TABLE of NUMBER;
/
CREATE OR REPLACE TYPE…
![](../../users/profiles/667599.webp)
Throoze
- 3,700
- 8
- 40
- 62
2
votes
3 answers
Dynamic Database/Key - Value/Entity - Key Value Dillemma
I have been programming relational database for many years, but now have come across an unusual and tricky problem:
I am building an application that needs to have very quick and easily defined entities (by the user). Instances of these entities…
![](../../users/profiles/864763.webp)
Paul Grimshaw
- 14,406
- 5
- 32
- 55
2
votes
3 answers
Implement 1:N relation in postgreSQL (object-relational)
I'm struggling with postgreSQL, as I don't know how to link one instance of type A to a set of instances of type B. I'll give a brief example:
Let's say we want to set up a DB containing music albums and people, each having a list of their favorite…
![](../../users/profiles/300732.webp)
das_weezul
- 5,682
- 2
- 25
- 31
2
votes
2 answers
Is the Python object mapping that I'm doing for neo4j too naive?
I'm looking for some general advice on how to either re-write application code to be non-naive, or whether to abandon neo4j for another data storage model. This is not only "subjective", as it relates significantly to specific, correct usage of the…
![](../../users/profiles/1507854.webp)
turanc
- 171
- 5