Evolutionary Database Design - Excercises

Comprehension questions

Dealing with Change

  1. What are the main advantages of Agile Methodology?
    • higher flexibility to change of development plans - changes to a system are controlled at each stage of a project
    • higher quality through earlier feedback from customers
    • shortened development cycle time
    • higher stability of workloads
  2. What is the main difference between planned and evolutionary design?
    • in planned methodology: treat design as a independent phase of project development before implementation and testing
    • evolutionary design: run the entire software life-cycle many times during the life of a project
  3. Why does agile methodology appear, at first glance, unsuitable for database design?
    • “Most people consider that database design is something that absolutely needs up-front planning. Changing the database schema late in the development tends to cause widespread breakages in application software. Furthermore, changing a schema after deployment result in painful data migration problems.”
  4. What limitations do the authors admit to in using an evolutionary approach to database design?
    • They developed an application database for a single application rather than an integration database that tries to integrate multiple databases.
    • They don’t have to keep the production databases up 24/7

The Practices

  1. Why is close contact between developers and DBAs essential?
    • “ Every task that a developer works on potentially needs a DBA’s help. Both the developers and the DBA need to consider whether a development task is going to make a significant change to the database schema. If so the developer needs to consult with the DBA to decide how to make the change. The developer knows what new functionality is needed, and the DBA has a global view of the data in the application. To make this happen the DBA has to make himself approachable
  2. What allows individual programmers to independently test their own solutions on a database without negative consequences for the project?
    • “It’s important for each developer to have their own sandbox where they can experiment, and not have their changes affect anyone else. Many DBA experts see multiple databases as anathema, too difficult to work in practice, but we’ve found that you can easily manage a hundred or so database instances. The vital thing is to have to tools to allow you to manipulate databases much as you would manipulate files.”
  3. What is the difference between a source code and database integration?
    • “With source code, much of the pain of integration is handled by source code control systems. For databases there’s a bit more effort involved. Any changes to the database need to done properly, as automated database refactorings. In addition the DBA needs to look at any database changes and ensure that it fits within the overall scheme of the database schema. For this to work smoothly, big changes shouldn’t come as surprises at integration time - hence the need for the DBA to collaborate closely with the developers.”
  4. What is the purpose of having test data?
    • “ The main reason is to enable testing. We are great believers in using a large body of automated tests to help stabilize the development of an application. Such a body of tests is a common approach in agile methods. For these tests to work efficiently, it makes sense to work on a database that is seeded with some sample test data, which all tests can assume is in place before they run.” • It allows the testing of migrations as the schema of the database are altered.
  5. How are automated changes in databases accomplished?
    • “Every database refactoring is automated by writing it in the form of SQL DDL (for the schema change) and DML (for the data migration). These changes are never applied manually, instead they are applied to the master by running a small SQL script to perform the changes. Once done, we keep hold of these script files to produce a complete change log of all the alterations done to the database as a result of database refactorings. We can then update any database instance to the latest master by running the change log of all the changes since we copied the master to produce the older database instance.”
  6. What are the advantages of separating the database layer from the code base?
    • It minimizes the areas of the system where developers need SQL knowledge to manipulate the database, which makes life easier to developers who often are not particularly skilled with SQL.
    • It provides DBA with a clear section of the code that he can look at to see how the database is being used.
    • It helps in preparing indexes, database optimization, and also looking at the SQL to see how it could be reformulated to perform better.

Possible topics for discussion

Possible difficulties

It is quite a long text but it can be read quite easily.

Reading suggestions