14 Replies - 2650 Views - Last Post: 09 August 2010 - 06:13 AM

#1 Sergio Tapia  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1251
  • View blog
  • Posts: 4,168
  • Joined: 27-January 10

How do you know when your database fits your needs?

Post icon  Posted 06 August 2010 - 09:20 AM

I'm creating a website database for the project I posted in the Share Your Project forum. I think I have it to the point where I can start implementing it, but I was wondering how other people go about the process.

How do you know when a database is fit for your requirements?
Is This A Good Question/Topic? 0
  • +

Replies To: How do you know when your database fits your needs?

#2 thursdayniac  Icon User is offline

  • D.I.C Regular

Reputation: 6
  • View blog
  • Posts: 255
  • Joined: 26-April 09

Re: How do you know when your database fits your needs?

Posted 06 August 2010 - 10:09 AM

View Poststapia.gutierrez, on 06 August 2010 - 08:20 AM, said:

I'm creating a website database for the project I posted in the Share Your Project forum. I think I have it to the point where I can start implementing it, but I was wondering how other people go about the process.

How do you know when a database is fit for your requirements?


I would say when it holds the information you need it to hold without being redundant(ie.. not being relational, having the same info in multiple tables).

You can always change your tables, so I'd start with what you got and see if its adequate.
Was This Post Helpful? 0
  • +
  • -

#3 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,957
  • Joined: 21-March 08

Re: How do you know when your database fits your needs?

Posted 06 August 2010 - 10:35 AM

I normally just do my best in the beginning because it never fails that I have to end up changing something in the database. Maybe that shows my lack of architecting skills.

For me, the database isn't "right" until I am done with the project.
Was This Post Helpful? 0
  • +
  • -

#4 Sergio Tapia  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1251
  • View blog
  • Posts: 4,168
  • Joined: 27-January 10

Re: How do you know when your database fits your needs?

Posted 06 August 2010 - 10:40 AM

I thought I'd share my process. I usually write up what sort of functionality I'll have to give to my end users and according to that I create my database.

For example.

Users want to see a list of comments ordered by karma.
Does my database have a simple way of querying this? "User.GetComments().Sort(karma)".

If my database cannot easily (and efficiently) have this sort of query then it's time to step back and fix the problem.
Was This Post Helpful? 0
  • +
  • -

#5 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 610
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: How do you know when your database fits your needs?

Posted 06 August 2010 - 10:55 AM

A project I'm working on now is actually the first time I've ever needed to use a real database. I'm using MongoDB.

I'm not actually designing anything. As I go along, I figure out what I need and go with that. I'm sure I'll have to change things in the end, but experimentation is my way to go on things like this.
Was This Post Helpful? 0
  • +
  • -

#6 thursdayniac  Icon User is offline

  • D.I.C Regular

Reputation: 6
  • View blog
  • Posts: 255
  • Joined: 26-April 09

Re: How do you know when your database fits your needs?

Posted 06 August 2010 - 11:29 AM

View Poststapia.gutierrez, on 06 August 2010 - 09:40 AM, said:

I thought I'd share my process. I usually write up what sort of functionality I'll have to give to my end users and according to that I create my database.

For example.

Users want to see a list of comments ordered by karma.
Does my database have a simple way of querying this? "User.GetComments().Sort(karma)".

If my database cannot easily (and efficiently) have this sort of query then it's time to step back and fix the problem.


I may be way off in understanding what you are saying but sorting with databases is usually pretty easy.

For example if you have a comments table and two of the fields in the table are "Comment" (the actual text) and "Karma", which I'm guessing is a number of some sort... You can sort the comments using an SQL statement like: SORT BY Karma
Was This Post Helpful? 0
  • +
  • -

#7 Sergio Tapia  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1251
  • View blog
  • Posts: 4,168
  • Joined: 27-January 10

Re: How do you know when your database fits your needs?

Posted 06 August 2010 - 12:19 PM

The point of my process was 'does this database allow me to find comments by area, users, etc.'
Was This Post Helpful? 0
  • +
  • -

#8 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10180
  • View blog
  • Posts: 37,585
  • Joined: 27-December 08

Re: How do you know when your database fits your needs?

Posted 06 August 2010 - 12:27 PM

View Poststapia.gutierrez, on 06 August 2010 - 01:40 PM, said:

Users want to see a list of comments ordered by karma.
Does my database have a simple way of querying this? "User.GetComments().Sort(karma)".

The whole point of SQL is that you don't have to worry about how the query is executed, only that it is and you get the desired result. SQL is a non-procedural language. If you start noticing a significant lag, it is because your server is serving too many clients, or it has a significant number of records to weed through for your query. Significant varies amongst engines.

As for my process, I look at the tables like class and OO design. What elements do I need to couple (FKs)? What do the tables need to model?
Was This Post Helpful? 0
  • +
  • -

#9 mostyfriedman  Icon User is offline

  • The Algorithmi
  • member icon

Reputation: 724
  • View blog
  • Posts: 4,471
  • Joined: 24-October 08

Re: How do you know when your database fits your needs?

Posted 07 August 2010 - 09:18 AM

I start by reading the requirements, then extract user stories. I understand the user stories very well, then i start drawing the ERD that will help me implement these user stories as efficiently as possible. of course while working on the project, the database changes a lot, columns added and removed, relations added, relations removed etc etc.. I know the database is good to go when i can extract any data i need as efficiently a possible, given that the design has no redundancies,no circular dependencies, and with the minimum possible number of joins.
Was This Post Helpful? 1
  • +
  • -

#10 WolfCoder  Icon User is offline

  • Isn't a volcano just an angry hill?
  • member icon


Reputation: 781
  • View blog
  • Posts: 7,604
  • Joined: 05-May 05

Re: How do you know when your database fits your needs?

Posted 07 August 2010 - 02:31 PM

I actually wrote my own database system for video games. It's very basic and has a read-only, and save section. A database like this for a video game I call a compendium. It meets my needs once it cuts lots of hard work down (and it does).
Was This Post Helpful? 1
  • +
  • -

#11 Sethro117  Icon User is offline

  • Still the sexiest mofo.
  • member icon

Reputation: 236
  • View blog
  • Posts: 2,378
  • Joined: 14-January 09

Re: How do you know when your database fits your needs?

Posted 07 August 2010 - 04:21 PM

View Postmacosxnerd101, on 06 August 2010 - 12:27 PM, said:

The whole point of SQL is that you don't have to worry about how the query is executed, only that it is and you get the desired result.


I disagree with that. The whole point of optimization is not to not to worry about how it works. You want and need to know how it works to develop better procedures as your project develops and becomes more complicated. Writing simple select statements arent going to work as you get more records. You have to worry about how it executes to better develop your queries to ensure you get the fastest execution time and you're not trying to execute a query with a bunch of crap you dont need.
Was This Post Helpful? 0
  • +
  • -

#12 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10180
  • View blog
  • Posts: 37,585
  • Joined: 27-December 08

Re: How do you know when your database fits your needs?

Posted 07 August 2010 - 04:30 PM

Expanding on what I said, you can't control with SQL if it searches for the data using binary, linear, or fibonacci searches. So in terms of lower-level searching and optimization possible with traditional programming, you are out of luck. That being said, it is definitely possible to optimize in regards to the parameters of the searches. But SQL is designed for higher-level querying than traditional procedural programming.
Was This Post Helpful? 0
  • +
  • -

#13 Sergio Tapia  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1251
  • View blog
  • Posts: 4,168
  • Joined: 27-January 10

Re: How do you know when your database fits your needs?

Posted 08 August 2010 - 11:54 AM

Without delving too much into the lower-level aspects, I was referring to the more functional-requirements of your database schema. :)

I think one of the key advantages Document-based databases such as CouchDB have over relational ones is that they are very flexible to change. Check out my blog for a small introduction of CouchDB and what it can offer.
Was This Post Helpful? 0
  • +
  • -

#14 Longblob  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 12-December 09

Re: How do you know when your database fits your needs?

Posted 09 August 2010 - 02:32 AM

in my opinion the database should fit with your script so you can use it well
Was This Post Helpful? 0
  • +
  • -

#15 cfoley  Icon User is online

  • Cabbage
  • member icon

Reputation: 1906
  • View blog
  • Posts: 3,949
  • Joined: 11-December 07

Re: How do you know when your database fits your needs?

Posted 09 August 2010 - 06:13 AM

Do you have a clear, precise list of your needs? If so, you can go through them one by one and determine analytically if your database meets each one. You can then take it further by writing a test suite to make sure your analysis was correct.

If you don't have a clear, precise list of needs, you can't prove anything. The best you can do is evolve a test suite as your application evolves.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1