Skip to main content

All Questions

19votes
3answers
22kviews

Why aren't Object Oriented databases used as much as Relational Databases? [closed]

I have come across many relational database management systems (RDBMS). But recently I used hibernate which made me start wondering why Object Oriented databases aren't more popular. If object ...
user avatar
18votes
4answers
4kviews

How do I know my data is relational or object oriented in nature?

Just read these lines- If your data is object in nature, then use object stores ("NoSQL"). They'll be much faster than a relational database. If your data is relational in nature, the ...
Gulshan's user avatar
  • 9,532
18votes
4answers
2kviews

Staying OO and Testable while working with a database

What are some OOP strategies for working with a database but keeping things unit testable? Say I have a User class and my production environment works against MySQL. I see a couple possible approaches,...
user avatar
14votes
3answers
5kviews

General thought process for "How would you build this website/app" interview questions [closed]

I've collected a bunch of interview questions like "Describe how you would design a photo album application", "Describe how you would design this particular feature of this particular website" (e.g. ...
Mastid's user avatar
8votes
4answers
18kviews

Can anyone explain this one-to-one, one-to-many, many-to-one, many-to-many concept with respect to ORMs?

A lot of ORM sites and SQL tutorials mention these relationships as if they are obvious or to be taken for granted, but I don't fully understand why the distinctions need to be made. Consider two ...
The 29th Saltshaker's user avatar
7votes
3answers
301views

How to model and store an entity which has "one or more" values

I'll use C# to design the model to be persisted Let's suppose I have the following entity: public class Episode { public int Id { get; set; } public string Title { get; set; } public ...
Matias Cicero's user avatar
5votes
1answer
308views

is it common sense to convert database data to object first?

In the framework I am using, I shall group things into models, controller, and views (I added services). When getting things out from database, it is pure data in array form. So they won't have ...
bijiDango's user avatar
4votes
2answers
259views

Why are dependencies typically reversed when representing complex objects as relational tables?

I'm going through some sort of phase where I over analyze and second guess every single decision I make when attempting to write software that has preventing me from getting anything done. I recently ...
plast1k's user avatar
  • 1,569
4votes
3answers
1kviews

OOP and relational databases [duplicate]

I see a lot of talk in the OOP world about principles and laws such as Open/Close and Loose Coupling, I can understand how they are so high valued, However I seem to have ran into a problem with ...
cecilli0n's user avatar
4votes
2answers
2kviews

Should methods be part of your persisted entities?

We are coding a small game and have a Player class. This Player class has certain properties which you would persist in a database like Id, Level, Health. We would like a Player to be able to kill ...
Vqf5mG96cSTT's user avatar
3votes
3answers
257views

How can I mark one of a 1:n relation as the "default"?

I have an "easy" question, but since I am not a very experienced programmer I would like to hear what some of you have to say. If I have for example a Db called MyDb with many tables. Two of them are ...
R. Gomez's user avatar
3votes
1answer
2kviews

Check if object exists before updating/deleting

In an application that doesn't use an ORM, is it good practice to check whether an object exists before attempting to update/delete it? For example: @Route(method="DELETE", path="/posts/\d+") ...
rink.attendant.6's user avatar
3votes
1answer
1kviews

OOP - Should I set the database connection as `public` for other classes to use it, although it might be unsafe?

I have a basic Database class, and it has a mysqli property (an object itself) which contains the connection information. Other classes uses this class to read and manipulate the database. There are ...
Michael Haddad's user avatar
3votes
1answer
839views

Read Only Generic data access layer Best practice

I am trying to write some art of "generic" data access library to access the data of my company's ERP Software, which is our main/core application where all our related data is managed. I am a ...
R. Gomez's user avatar
3votes
1answer
1kviews

Domain Driven Design with an EAV database model

How can one apply DDD to a EAV database model? Consider this EAV database model: How am I supposed to build a domain model if all my entities and their attributes will be stored in the database? ...
Songo's user avatar
  • 6,663

153050per page
close