Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

New to agile and I'm not sure how to start. The idea is to create small parts of the project in sprints. However the project I'm working of requires a database and the database must be almost functional to do anything with the project.

So how do Agile projects handle this, do you start by creating the database?

How would you do so, for example if using Scrum how would you do the user stories and test the db.

Would you rather do parts of the db in a story that also requires code.

Say you have a story that is "As a user you must be able to register..." you would create the user table in the database as a part of this story?

How can agile help you design the database?

share|improve this question
1  
re:"As a user you must be able to register..." I'd suggest reading through blog.gdinwiddie.com/2011/06/11/dont-you-have-to-login-first and the posts he mentions. There may be no one "right" answer; it's good to understand the various reasoning in the discussion. –  StevenV Sep 1 '11 at 13:54
    
If you are starting Agile, or any other methodology for that matter, please make sure it is fit for your team, project and organization's style in dealing with software projects (or your customer's). It is not true that every methodology works for every project and every organization. –  Emmad Kareem Sep 1 '11 at 14:01

6 Answers 6

up vote 11 down vote accepted

Yes you will build database incrementally by adding required tables and columns as they are required by the story. You usually don't need the whole database when you start your first story - for example "As a user you must be able to register ..." most probably requires single table with exactly defined set of columns.

If you have a story which really requires the whole database the story is Epic - it is simply too big and must be divided.

share|improve this answer

the database must be almost functional to do anything with the project.

Largely false.

So how do Agile projects handle this, do you start by creating the database?

An empty database, yes. Then add tables as required to finish a sprint.

how would you do the user stories and test the db?

What are you asking? Agile has nothing to do with database design.

You write the story.

You design a solution.

You create tables and code.

You test the code.

Would you rather do parts of the db in a story that also requires code?

What other choice is there? Do all the DB first? That's impossible.

"As a user you must be able to register..." you would create the user table in the database as a part of this story?

First, that's a useless story, since there's no value in registering. That's merely a technical hurdle that users are forced to pass through.

Second, you'd create just enough tables to implement the story.

How can agile help you design the database?

What are you asking?

Agile is project management. It doesn't help with any design.

It merely helps you break a big job into small pieces.

share|improve this answer

New to agile and I'm not sure how to start.

After reading your post I think you're misunderstanding it and you should start with reading what agile really means and tries to accomplish.

The idea is to create small parts of the project in sprints.

Close, but not close enough. The idea is to deliver working software at the end of each sprint (one part of the system can fit into one sprint, or not). The database can be seen as working software if and only if the database is what you deliver to the customer.

However the project I'm working of requires a database and the database must be almost functional to do anything with the project.

Why does it have to be almost functional? Does every feature of the system use the entire or most of the content of the database? Because if it doesn't, there's no point in designing the whole database beforehand.

So how do Agile projects handle this, do you start by creating the database?

Agile doesn't handle database or system design. It tells you how to manage your project. With that in mind, you start by identifying all the features of the system and put them in the product backlog. Then you, along with the product owner, assign priorities to the features in the backlog. After you've done that you start taking features from the backlog and create sprints (usually 2 to 4 weeks long). When a sprint is over you should have a new working feature in the system that can be delivered to the customer.

How would you do so, for example if using Scrum how would you do the user stories and test the db.

I might be wrong, but there's no point in testing the database. You can test the code that updates the database. Of course, you can test your programmable part of the database but that can be achieved by testing the code that calls it.

Would you rather do parts of the db in a story that also requires code.

Yes.

Agile is by no means a silver bullet to project management and can spell disaster when not applied correctly. Try to spend some time reading about it (you can find plenty of resources here or on stackoverflow), maybe find someone that has already done agile and can help you to get up to speed.

share|improve this answer

If your question is around using agile techniques for database development then the following blog post might be of use Agile database development 101

share|improve this answer

Well firstly follow an incremental approach.Select a module define its requirements, chalk out the functionality, target a functional area and then comes the modeling, db design, algos, codes and finally test it and repeat the process.

share|improve this answer

Your question screams of the AgileFall development anti-pattern.

What is it? It is usually an organization that traditionally developed software in a Waterfall method, but then because they realize it isn't working, they struggle internally to adopt Agile techniques. The resulting "fail-gasm" usually occurs because true Agile DEMANDS a fundamental organizational shakeup from the way that many established Waterfall shops are structured. And of course they will tend to stay structured that way as a lot of powerful and tenured people feel they need to inject themselves into the process when Agile shows how useless those people REALLY are to software development.

You need to escape this notion that somehow you start from the bottom, design and build your database, and then move onto the middle tier and never have to touch your database again. This is the wrong way to do it in Agile.

Start at the domain model for a user story, and work your way up to the database, and DOWN to the middle-tier and presentation.

share|improve this answer
    
Yeah I see most answer hint at this and I even kind of figured it while writing the question. No worries about AgileFall, this is mostly a test project where I'm trying out methods and patterns to learn how they work, not a serious project. –  Ingó Vals Sep 1 '11 at 14:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.