Skip to main content

Working with Databases

  • Chapter
Pro Drupal Development
  • 355 Accesses

Abstract

Drupal depends on a database to function correctly. Inside Drupal, a lightweight database abstraction layer exists between your code and the database. In this chapter, you’ll learn about how the database abstraction layer works, how to use it, and even how to write your own driver. You’ll see how queries can be automatically modified by modules to restrict the scope of these queries. Then you’ll look at how to connect to additional databases (such as a legacy database). Finally, you’ll examine how to create, populate, and even delete tables when a module is installed, updated, or disabled, respectively.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints and permissions

Copyright information

© 2007 John K. VanDyk and Matt Westgate

About this chapter

Cite this chapter

(2007). Working with Databases. In: Pro Drupal Development. Apress. https://doi.org/10.1007/978-1-4302-0190-8_5

Download citation

Publish with us

Policies and ethics