Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Looking at Drupal's database

From: Drupal 7: Reporting and Visualizing Data

Video: Looking at Drupal's database

To be honest, you don't need to watch this video to create a great data-driven web site. In fact, we won't look at Core Drupal at all. We're going to dig below Drupal, into the database it uses to store all your site's data and settings. I'm going to do this because sometimes, not often, mind you, but sometimes it's most convenient to grab a quick and dirty export directly from the database. And even if you never have to do that, it's instructive to see how Drupal works with data behind the scenes. So let's take a look. We're running Acquia Dev Desktop which has a button on it that lets us manage our database.

Looking at Drupal's database

To be honest, you don't need to watch this video to create a great data-driven web site. In fact, we won't look at Core Drupal at all. We're going to dig below Drupal, into the database it uses to store all your site's data and settings. I'm going to do this because sometimes, not often, mind you, but sometimes it's most convenient to grab a quick and dirty export directly from the database. And even if you never have to do that, it's instructive to see how Drupal works with data behind the scenes. So let's take a look. We're running Acquia Dev Desktop which has a button on it that lets us manage our database.

If you're using Drupal on a web host, there's a good chance that they also use phpMyAdmin, the same program that Acquia Dev Desktop does. So while the interface you see might not be exactly the same, the same concepts should be true for you. phpMyAdmin can store multiple databases. The one that we're using is called twotrees. You might remember that from when we installed the site in the first place. You can click on twotrees to see a list of tables, or if you prefer, go back to the front page and click on this Databases link.

Here you have some additional options. But in either case, it leads to the same place. As we scroll through these tables, some of the names will look familiar to you. For example, field_data_field_first_name. As you might guess, when I click that, it shows us all of the data that goes with the first name field that we put into our web site. We can further look at any individual row by clicking this little Pencil icon, although to be honest, now we're digging very, very deeply into the database itself.

So I'm just going to go back to our first_name table. If you want to export this, you click the Export tab up here. Then you have a lot of different options. I'll simply scroll to the bottom. I'll simply scroll to the bottom, And instead of saving it as a file, I'm going to show you what it looks like on the screen. I click Go and there it is. These are the instructions to the database program on how to recreate the database that's behind your Drupal web site. And there are all the values. So that's how you can get data out of a Drupal site, even if you don't have Drupal running.

That also shows why it's not enough simply to secure Drupal if you want to keep your data safe; you also have to make the database secure. lynda.com has a few MySQL courses that can help you with that. And for immediate help, scroll back up to the top and click this little Help balloon. I find phpMyAdmin to be extremely useful, and in fact, that's how I created the exercise files for this course. If you'd like to learn how to import those exercise files, see the video "Using the exercise files." I want to mention one other method of getting your database in and out of Drupal; however, this requires that you already have Drupal running.

To show it, I'll go to my site where I've already installed the module called Backup and Migrate. You can get it from drupal.org/project/backup_migrate. But I'll just go back to my site where I have it installed. You click Configuration, and Backup and Migrate. This is a different view of the same information. If we click the advanced backup page, you'll see that in fact we can select which tables to include in our backup and which ones to exclude. Very often people will exclude the caches because it's a lot of stuff that's only held temporarily and can really bloat your database quite a bit.

Again, you might never need the information from this video, but the fact is, Drupal doesn't exist in a vacuum. You often need to make it work with non- native data sources, or you have to get data in or out using the SQL language. I can't teach you that. Again, it's a very big subject, and there are other lynda.com courses that do. But knowing just a little about the backend database can speed up your work and get you out of a lot of trouble.

Show transcript

This video is part of

Image for Drupal 7: Reporting and Visualizing Data
Drupal 7: Reporting and Visualizing Data

44 video lessons · 6897 viewers

Tom Geller
Author

 
Expand all | Collapse all
  1. 13m 50s
    1. Welcome
      50s
    2. What you need to know
      4m 49s
    3. Using the exercise files
      8m 11s
  2. 12m 58s
    1. A yoga studio
      3m 18s
    2. A national organization
      2m 51s
    3. An entertainment company
      4m 3s
    4. An organization with hyperlocal branches
      2m 46s
  3. 40m 49s
    1. Planning your site's data structure
      3m 31s
    2. Creating record templates
      5m 40s
    3. Understanding Drupal 7's data-template model (entities)
      4m 27s
    4. Creating categories using two methods
      6m 14s
    5. Creating unusual field types
      6m 38s
    6. Reusing and grouping fields
      6m 25s
    7. Looking at Drupal's database
      3m 56s
    8. Migrating custom fields from Drupal 6
      3m 58s
  4. 20m 46s
    1. Connecting two fields using references
      5m 35s
    2. Importing data using Feeds
      8m 48s
    3. Changing the appearances of fields
      6m 23s
  5. 53m 15s
    1. Understanding why views are useful
      5m 1s
    2. Learning from built-in views
      5m 52s
    3. Creating and deleting a simple view
      5m 41s
    4. Diving into the Views interface
      8m 48s
    5. Surveying field types
      6m 16s
    6. Adjusting the settings of individual fields
      5m 31s
    7. Sorting and filtering data
      8m 11s
    8. Changing Views' administrative options
      7m 55s
  6. 33m 33s
    1. Varying how a view appears in different displays
      10m 10s
    2. Formatting views with grid, list, table, and jump menu appearances
      6m 43s
    3. Rewriting field output for interesting results
      4m 21s
    4. Creating multipart views using attachments
      6m 8s
    5. Styling the output of views
      6m 11s
  7. 33m 56s
    1. Importing and exporting views
      6m 21s
    2. Controlling access to data
      6m 44s
    3. Adding dynamic filters to views
      5m 41s
    4. Extending views with relationships
      6m 24s
    5. Improving data administration with Views Bulk Operations
      8m 46s
  8. 29m 43s
    1. Understanding locational data
      4m 43s
    2. Setting up the Location module
      9m 42s
    3. Displaying basic maps with the GMap module
      8m 37s
    4. Displaying custom maps
      6m 41s
  9. 23m 50s
    1. Exporting data in simple text form
      7m 4s
    2. Adding dates and calendars
      8m 32s
    3. Displaying content in a slideshow
      8m 14s
  10. 1m 20s
    1. Next steps
      1m 20s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Drupal 7: Reporting and Visualizing Data.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.