Drupal interview questions and answers 👇

  1. General
  2. Drupal Advanced Interview Questions


Explain caching in Drupal?

View answer

Through caching Drupal allows to speed up website using different configuration like page caching, block caching and lifetime for cached pages.

  • Page Caching: It enables the entire HTML of each page to be stored in the database. It reduces the amount of queries needed
  • Block Caching: You can set the cache setting for a block in views, when block created by views
  • Minimum cache lifetime: It is the amount of time before the page cache is cleared. On each cron run, page caches are cleared.
  • Expiration of cached pages: It only applies for an external mechanism, for example, your browser cache or varnish

Can you explain how the database system of Drupal works?

View answer

In a database Drupal stores information, and each information has its own database table. For example, the basic information regarding the nodes of your site are stored and kept in the node table, and if you use the CCK module to add fields to your nodes, the field information is stored in a separate table.

What is a render array in Drupal?

View answer

For Drupal content render arrays are the basic building blocks. In Drupal, render arrays provide you a structured way to programmatically change the content before it is displayed.

What is Drupal’s taxonomy system and what are some of its key features?

View answer

Drupal comes with a built in taxonomy system that allows for categorization of the nodes on a site.The taxonomy system allows for arbitrary definition of terms, as well as arbitrary organization of those terms into vocabularies. There is no limit to the number of vocabularies that can be created, nor is there any limit to the number of terms that can be included in a vocabulary.

A vocabulary can also have free tagging which means that, instead of entering specific terms ahead of time, users may enter tags freely at the time the content is created and those tags automatically become terms in that vocabulary. Drupal’s taxonomy system is one if its most powerful and flexible features.

Explain the concept of “nodes” in a Drupal system.

View answer

All content on a Drupal website is stored and treated as “nodes”. A node is any piece of individual content (e.g., a page, article, forum topic, blog entry, etc.). Note, though, that omments are not stored as nodes but are always connected to a node.

The ability to create different “content types” is a way Drupal allows you to have different kinds of nodes for different purposes. For example, an “article” is one content type, a “book page” is another, and a “blog entry” yet another. You can also create new content types of your own.

Treating all content as nodes provides a great deal of flexibility that facilitates and simplifies creating new types of content. It also makes it easy to apply new features or changes to all content of a particular type.

What Are Hooks?

View answer

Hooks allow modules to alter and extend the behavior of Drupal core, or another module. They are one of the various ways that code components in Drupal can communicate with one another. Using hooks a module developer can change how core or another module works -- without changing the existing code.

What is Node and Block in Drupal?

View answer

In Drupal, if there is any new story or page, forum topic etc. is referred to as a node. Node module is responsible and takes care of adding, removing, and editing operation on any content in a website. A piece of information (block) can be displayed at a particular location and that location is called a region. Regions are like left side bar, header, footer etc. Blocks can be fit into any region based on configuration settings.

What is PDO?

View answer

PDO is referred as PHP Data Objects. It is a consistent way to access the database. It helps the developers to write code in the easier way. It is like a data access layer that uses a unified API. Drupal provides a database abstraction layer, which helps the developer to work easily with multi-database servers. It is used to preserve the syntax and power of SQL and to work with complex functionality. It provides a defined interface for dynamic queries with using security checks and good practices. This process is developed at the top of the PDO database API.

Where should we use theme hook and what is the use of that file?

View answer

template.php in the theme folder. This php file is used to override other theme functions. This file must start with opening PHP tag. PHP Template should be informed to override the theme functions which are not listed in the basic list.

Which design pattern is used by Drupal?

View answer

Singleton Design pattern

How to add custom PHP codes in pages using Drupal?

View answer

Drupal does not allow adding PHP code directly inside a post or in a block by default. To do this, we need to activate a drupal module called PHP filter via Administer Site building Modules.

What are disadvantages of Drupal?

View answer

The disadvantage of Drupal are:

  • Drupal is not user friendly interface. It requires advanced knowledge and few basic things about the platform to install and modify.
  • Drupal is a new content management system. It is not compatible with other software.
  • Performance is low compared to other CMS's. The website which is built using Drupal will generate big server loads and never opens with a slow internet connection.

What does sticky at top of lists do in publishing options while creating the front page?

View answer

It fixes your page at top of lists on your site.

What is the use of Configuration menu?

View answer

This is an important part in the Drupal Back-End. Any changes done in this configuration, will affect the entire website. Here you can do the user account setting, site information setting or any other general site setting.

How would you optimize a Drupal website?

View answer

The steps to optimize the Drupal site are:

  • Enable Page Caching
  • Compress CSS files
  • Js Aggregation
  • Moving Media Files and Static files to a CDN
  • Optimize Images Size and Their Number
  • Theme Optimization

What are the advantages of Drupal?

View answer

The advantages of Drupal are:

  • Drupal is a flexible CMS that allows handling content types including video, text, blog, menu handling, real-time statistics etc.
  • It provides a number of templates for developing web applications. So there is no need to start from scratch if you are building simple or complicated web applications.
  • Drupal is easy to manage or create blog or website. It helps to organize, structure, find and reuse content.
  • Drupal provides some interesting themes and templates which gives your website an attractive look.
  • Drupal has over 7000 plug-ins to boost your website. Since Drupal is an open source, you can create your own plug-ins.

How to remove breadcrumbs from my Drupal pages?

View answer

Breadcrumbs or breadcrumb trail is a navigation aid used in drupal interfaces. Normally it appears in between the top banner area and the page title. It gives users a way to keep track of their location within programs. Breadcrumbs are really useful in a comparatively bigger website with plenty of sections and subsections. But when it comes to smaller websites, it may found useless. In those cases you may either hide it using CSS (eg. .breadcrumb {display: none;}) or in the page.tpl.php file remove the line that says

How to add custom PHP codes in my Drupal pages or blocks?

View answer

By default, drupal will not allow inserting PHP code directly inside a post or in a block. To do this, you need to activate a drupal module called PHP filter via, Administer Site building Modules. Even though this module ships with drupal, it remains disabled by default.

How do I get my site to have SEO-friendly URLs?

View answer

The Pathauto module automatically generates URL/path aliases for various kinds of content (nodes, taxonomy terms, users) without requiring the user to manually specify the path alias. This allows you to have URL aliases like /category/my-node-title instead of /node/123. The aliases are based upon a “pattern” system that uses tokens which the administrator can change.

How can I enable clean URLs in Drupal?

View answer

Drupal’s default URL structure is like “http://www.sitename.com/?q=node/10″ This URL format can be hard to read, and can sometimes prevent search engines from indexing all your pages properly. In this case you can eliminate this “?q=” and clean the URLs through the following: Navigate to Administer Site configuration Clean URLs. By default, it will be disabled. Select enabled and click the save configuration button.

You can make your URLs cleaner with the help of path module: Home Administer Site building Modules: enable the Path Module.

When can a Drupal user not edit a node they created?

View answer

Symptoms: An authorized Drupal user loses “edit” access to nodes they’ve created, even if they have appropriate node (or other module) access permissions. Or, user cannot edit a node that should be editable by them, based on access control or node access settings. No errors or warnings are presented to the user. Nothing in the Drupal watchdog log.

Possible Cause: The user does not have permission to use the input filter currently assigned to the node. (An administrator or other privileged user may have changed the input filter settings, or, input filter permissions may have been changed to exclude the node author since the node was created. As a result, the user never had, or no longer has permission to use the input filter associated with the node.)

What is the difference between Drupal and Ruby on Rails?

View answer

Drupal is a Content Management System, it is a huge pile of code that give you a full working website directly after install. It already handles users, articles, permissions, uploading data so that you can start a small website even if you don’t know a word of code. However, if you want to change it, you will have to learn about the internals of the beast, and develop your own plug-ins to alter its behavior.

Ruby on Rails is a framework, it’s more like an empty shell to fill with the logic you need. It is a set of useful classes and functions so that you don’t waste time on low-value tasks when developping a website. At first, a RoR application does nothing, but you can start developping features very quickly, and you can do basically anything you want. It is infinitely much more flexible than Drupal but you have have to do everything yourself.

What is database abstraction layer in Drupal?

View answer

Drupal provides a database abstraction layer to provide developers with the ability to support multiple database servers easily. The intent of this layer is to preserve the syntax and power of SQL as much as possible, but also allow developers a way to leverage more complex functionality in a unified way. It also provides a structured interface for dynamically constructing queries when appropriate, and enforcing security checks and similar good practices. The system is built atop PHP's PDO (PHP Data Objects) database API and inherits much of its syntax and semantics.

Explain the path system of Drupal?

View answer

When you visit a URL within your Drupal site, the part of the URL after your base site address is known as the path. When you visit a path in your Drupal site, Drupal figures out what information should be sent to your browser, via one or more database queries. Generally, Drupal allows each module you have enabled on your site to define paths that the module will be responsible for, and when you choose to visit a particular path, Drupal asks the module what should be displayed on the page.

For instance, this site (drupal.org) is (of course) built with Drupal. The page you are now viewing is http://drupal.org/node/19828, whose path is “node/19828?. The module that is responsible for this path is the core Node module, so when you visit this page, Drupal lets the Node module determine what to display.

To determine the path to a particular page on your site, for purposes of creating a link, go to the page you want to link to and look at the URL in the address bar. By default the URL, after the base address of your site, will begin with ‘?q=’. When ‘Clean URLs’ are enabled you will see a directory structure in the URL. The “path” for use in a menu item is the part of the URL after the site’s base address and without the “?q=”.

Explain Modules in Drupal?

View answer

A module is a software (code) that extends Drupal functionality. Modules fall into one of three categories:

  • Core modules are those included with the main download of Drupal. These can be turned on or off without downloading additional components. Examples include
  • Contributed modules are downloaded from the Modules download section of drupal.org, and installed within your Drupal installation. Examples include
  • Custom modules are modules you write yourself. This requires a thorough understanding of Drupal, PHP programming, and Drupal’s API.

What are some most commonly used PHP based CMS?

View answer

Following are some most commonly used PHP based CMS:

  • Drupal
  • Joomla
  • WordPress
  • TYPO3

Why is Ctools used in Drupal?

View answer

Ctools is a set of APIs and tools which is used to improve the developer experience.

What are patches in Drupal?

View answer

Patches are the files that contain a list of differences between one set of files, and another. You can make changes like addition, deletion in codes through patches. Patches can also be used to make changes to another copy of the original or main file.

What is Drupal cron?

View answer

The term weight in Drupal is used to order nodes. Nodes with lower weight will be at top of the list while nodes with heavier weight will be at lower position.

Why is the 'search' function in Drupal is better than other CMS?

View answer

Drupal integrates well with external search engines such as Xapian, Apache solr if the built-in search engine does not meet your needs properly.

Why you shouldn’t modify core drupal files ?

View answer

No matter how easy it is to modify core files to make Drupal do what you want it to do, resist the temptation.

  • Doing so will make it complicated, difficult or near impossible to apply site updates such as Security and bug fixes.
  • You will make it difficult for those that come after to maintain the site.
  • You could possibly leave your site vulnerable to exploits.

The Drupal core has been designed to be modular, so there should be no reason to hack it. If there is a feature you want and it cannot be accomplished outside of modifying core, consider submitting your hack as a patch. Create an issue and tell the community the feature you want to accomplish. It will then be tested and your feature may become a part of the Drupal core.

Why does Drupal need a database? What databases are supported?

View answer

Drupal stores its information – the individual pages, the registered users, and so on – in the database. The database forms the back-end for your Drupal site. At this time, Drupal supports MySQL (or an equivalent such as MariaDB), PostgreSQL, and in Drupal 7, SQLite.

What Does Drupal Do?

View answer

Drupal is the choice for many great web sites because it does a lot of different things very well, and allows different kinds of information to interact effectively through its flexible, open architecture. Drupal’s feature set is far more economic and practical for most organization.

What is teaser in Drupal?

View answer

A short introductory sentence or paragraph about a piece of content that informs readers about the subject of the content. By default, the first paragraph or two of the content is used (there is a setting for how much), usually with a link to the complete node.

What is drupal weight?

View answer

A term used by Drupal to define the priority or order in which a function is processed or a block / node is displayed. From Drupal 6, the weight field is adjusted dynamically using a drag-and-drop interface. Note: A lower weight value (-10) will float to the top of lists, while heavier (+10) weights will appear lower in lists

What Is Comment Moderation In Drupal?

View answer

Drupal core contains settings that allow you to moderate comments. Drupal’s user access controls allow you to specify whether or not users must already have an account before they can post comments to the site. You can also specify whether a user (logged in or anonymous) may leave a comment without approval. Comment moderation is made simpler via the contributed module called Notify. Notify will send an email to the administrator whenever someone leaves a comment on their site.

What is entity api module?

View answer

The entity api module extends the entity API of Drupal core in order to provide a unified way to deal with entities and their properties. Additionally, it provides an entity CRUD controller, which helps simplifying the creation of new entity types.

What are available SEO modules in Drupal?

View answer

There are various SEO modules available in Drupal :

  • Pathauto
  • Meta tags/ Node words
  • Service Links
  • Google Analytics
  • Related Links
  • Search 404
  • Site map
  • Url list

What are the five conceptual layers in Drupal system?

View answer

  • Data (nodes, etc)
  • Modules
  • Blocks and menus
  • User permissions
  • Themes and templates

What are Drupal blocks?

View answer

Blocks are container objects that are used to organize your content of your website.

What is Drupal Pane module?

View answer

Pane module is used to translate the custom panel’s pane with optional title that will be stored as variables and it can be translate or edit quickly.

Can you explain the Function and Working of Dashboard Module ?

View answer

The Dashboard module provides a Dashboard page in the administration menu. The intention of the Dashboard page is to give administrators a quick overview of important information on the website.

How to use the contextual filter?

View answer

In Drupal, each type of information has its own database table. For instance, the basic information about the nodes of your site are stored in the Node table, Comments and Users also have their own database tables, and roles, permissions, and other settings are also stored in database tables.

What is a Web Content Management System?

View answer

A Web content management system is content management system software, implemented as a Web application, for creating and managing HTML content. It is used to manage and control a large dynamic collection of Web material. A WCMS facilitates content creation, content control, editing, and essential Web maintenance functions. The software provides authoring tools designed to allow users with little knowledge of programming languages or markup languages to create and manage content with relative ease. Most systems use a database to store content, metadata, or artifacts that might be needed by the system. Content is frequently, but not universally, stored as XML, to facilitate reuse and enable flexible presentation options.

Most systems use server side caching boosting performance. This works best when the WCMS is not changed often but visits happen on a regular basis. Administration is typically done through browser-based interfaces, but some systems require the use of a fat client.

How you can drop the table using module?

View answer

To drop the table you can use db_drop_table in install file.

What is subtheme?

View answer

A Drupal subtheme (or sub-theme) is a theme that is based on a “base theme”. The base theme provides basic (and sometimes more than basic) functionality. The subtheme styles the site with a unique look, and adds any unique extra functionality.

What is responsive theme?

View answer

A responsive theme (as the one used for this website), is an approach to web development that allows a website to break itself down smoothly across multiple monitor sizes, screen resolutions, and platforms, be it a computer, tablet or mobile device. It allows the developer to create a site that is optimized for each platform, both in navigation, readability and load time.

As you can see when resizing the window (if you are viewing this site on a computer), the layout of the page shifts depending on the size of the screen; with different layouts for content depending on viewing area. Themes (or layouts) such as this, allow for a single site and single look to the site, to be viewed on various devices without the need for additional themes or resizing by the user.

When do I need a contextual filter vs. a relationship?

View answer

A relationship is a join. Just think of it terms of SQL:

  • a ‘relationship’ is a JOIN on another table
  • a ‘filter’ (contextual or not) is a WHERE clause.

Contextual just means the parameter comes from the current context, e.g. part of the URL, something in the session,

How to interact with Drupal search system?

View answer

The search module lets users search for specific content on your site. You can search both for users and for particular words. When you are on the “content” tab of Search, you will be able to search for words appearing in the default rendering of node content on your site, which would include the default rendering of any CCK fields, Location fields, Taxonomy, etc., as well as comments. When you are on the “users” tab of Search, you will be able to search the user names of registered users on your site, and if you have sufficient permissions, also their email addresses.

What is a patch in Drupal and how will we apply patch in drupal?

View answer

A patch is a file that consists of a list of differences between one set of files and another. All code changes, additions, or deletions to Drupal core and contributed modules/themes between developers are done through patches. The differences are presented in a structured, standard way, which means that a program (also named patch) can be used to apply the changes to another copy of the original file.

How to use preprocess function?

View answer

The main role of the preprocessor is to set up variables to be placed within the template (.tpl.php) files. From Drupal 7 they apply to templates and functions, whereas in Drupal 6 preprocess functions only apply to theming hooks implemented as templates. Plain theme functions do not interact with preprocessors.

What is Drupal error handling?

View answer

Error Handling is a process of detection and finding the resolutions for the errors, this can be programming application errors or communicable errors.

What is Drupal Pane module?

View answer

Pane module is used to translate the custom panel's pane with optional title that will be stored as variables and it can be translate or edit quickly.

What is the use of server field in setup payments?

View answer

We should select the server from either of the one i.e. Production or Sandbox.

What modules do you always recommend and why?

View answer

  • Views - This module is essential in every website I build. It makes displaying lists of content very easy. If you want an image slideshow, a list of blog posts, a list of products, etc., views is the best place to start.
  • Panels - Panels gives you the ability to create custom pages easily. These custom pages can have multiple regions of content. For example, you may want to create a home page that has a Slideshow on the top, and a two column layout below.
  • Ctools - On its own, Ctools does not seem to do a lot. However, it is actually a very powerful framework if you begin developing your own modules. I have used Ctools in the past for developing multi-step forms, modal dialog boxes, and even multi-step forms inside of modal dialog boxes.
  • Token - Tokens are little snippets of text that can be used as replacement patterns. For example, if your website sends out emails and you want to add in the users name, or you want fill in a link path with a node id to provide a helpful link to content, tokens will save the day.
  • Pathauto - The Pathauto module is a necessity for any website that frequently adds new content. It is also especially important if you have a website that allows users to create content using content types. Pathauto simplifies creating clean and search engine friendly URLS for the various content you add to your site.
  • Webform - If you want to provide easy to fill out forms for the visitors of your site, the Webform module will help you out.
  • Rules - Drupal rules will allow you to set up condition actions.
  • Date - This is useful for allowing the easy selections of dates in content types (with a nice date popup). It also integrates nicely with the views module.
  • Quicktabs - Makes it easy to add tabbed content without having to write your own Javascript/Jquery. What more do I have to say?
  • Libraries - Makes organizing your various libraries of functionality easy (see Jquery UI above for an example). Google Analytics - I don’t build a Drupal website without adding Google Analytics. This module makes it very simple. What gets measured, gets improved after all.

how to improve DRUPAL performance for anonymous and authenticated users ?

View answer

  • Anonymous Traffic: Lighter user, basic configuration and performance tuning should handle more use cases.
  • Authenticated Traffic: Heavier user, can lead to more complex configurations to handle load and performance.

Explain the capabilities of views module.

View answer

The Views module provides a flexible method for Drupal site designers to control how lists and tables of content (nodes in Views 1, almost anything in Views 2) are presented. Traditionally, Drupal has hard-coded most of this, particularly in how taxonomy and tracker lists are formatted. This tool is essentially a smart query builder that, given enough information, can build the proper query, execute it, and display the results. It has four modes, plus a special mode, and provides an impressive amount of functionality from these modes.

Among other things, Views can be used to generate reports, create summaries, and display collections of images and other content.

What are the technical differences between Joomla and Drupal?

View answer

  • Joomla only supports one Section and one Category for each content, while you can assign Drupal contents to several Sections/Categories.
  • Joomla does not support multi-site setups, whereas drupal supports multisite setups.
  • Drupal has built-in forum discussion, so you don't need to install additional modules.
  • The term Blog in Joomla is not same as blog in Internet dictionary. 'Blog' term in Joomla is actually a teaser view of contents containing: Title, Introduction and a Read More link. So, in short, 'Blog' in Joomla terminology is not 'Weblog'! If one is asking if Joomla supports a 'Blog' by default, then the answer is yes, but with a different meaning.
  • Comments on contents are not available in Joomla by default, but Drupal supports comments for all content-types by default.

Do you keep regular backups?

View answer

We should have automated backups running for the database (most important), code, files and server at least once a day (hourly is better).

What is drupal panels?

View answer

The drupal panels is a module in drupal which allows a drupal website administrator to create customized layouts for multiple uses. At its core it is a drag and drop content manager that lets you visually design a layout and place content within that layout. Integration with other systems allows you to create nodes that use this, landing pages that use this, and even override system pages such as taxonomy and the node page so that you can customize the layout of your site with very fine grained permissions.

What is drupal cache?

View answer

The core Drupal cache stores assembled pages and blocks for anonymous visitors in the cache tables in the database. Other popular Drupal caching options include boost,memcache, and authcache.

What is critical path?

View answer

The code that is run when serving a cached page.

What is triage?

View answer

A new bug or issue is assigned a priority based on its severity, frequency, risk and other predetermined factors, borrowed from medical term triage.

Can Drupal work with JavaScript?

View answer

Drupal provides methods for implementing JavaScript. Using these methods will help to keep your code clean and to ensure compatibility with the way other modules implement JavaScript.

A couple of simple principles guide Drupal's JavaScript approach:

  • All pages should be perfectly functional without scripts. JavaScript provides alternatives or supplements, not replacements for standard elements.
  • No JavaScript is hard-coded into pages. Rather, actions are attached dynamically to page elements--and only if the needed JavaScript support is present.

Explain the flow of information between the 5 main layers of Drupal?

View answer

Every element of information is called node. At the base of the system is the data pool which is the collection of nodes. Next are the modules that are functional plug-ins. Modules may be drupal core or a contributed item. Blocks and menus form the next layer of drupal. Blocks are output tool. A user can configure blocks to create a display that he wants and show only a few pages. In the next layer, user permissions are determined to the type of users who would be allowed to work on the database. Template, which is the theme of the site, is the last layer. It is made of a combination of XHTML, CSS and PHP.

Can you comment on the Scalability factor of Drupal?

View answer

There are many Drupal websites which are maintained with over millions of views every day. Drupal has grown very much towards the optimization factor and Drupal is easily scalable across higher bandwidths with efficient and stable platform for management.

Explain coding standards in Drupal?

View answer

As per the Coding standards, omit the closing ?> tag. Including the closing tag may cause strange runtime issues on certain server setups. (Note that the examples in the handbook will show the closing tag for formatting reasons only and you should not include it in your real code.)

All functions in your module that will be used by Drupal are named {modulename}_{hook}, where "hook" is a pre-defined function name suffix. Drupal will call these functions to get specific data, so having these well-defined names means Drupal knows where to look. We will come to hooks in a while.

How to install a new module in Drupal?

View answer

After finding and downloading a module, the next step would be to copy it the modules folder. Most people copy the file to the default modules folder here http://sitename.com/drupal/modules this is where all the modules that ship with Drupal are stored so it seems somewhat logical to do this. But this folder is actually meant to store only Drupal's default modules. Instead you should go to http://sitename.com/drupal/sites/all folder, there you will see a readme.txt file. This file will clearly tell you the trick. You just need to create a new folder named modules here. Now copy the modules folder here. That's all, you have successfully installed the module.

Next step would be to enable the module through the Admin interface. To do this navigate to Administer Site Building Modules. Here you will see a list off all installed modules, and our newly installed module will also be listed here. You just have to check the enable check box against the new module and then click the Save Configuration button. That's all.

Drupal Advanced Interview Questions

Explain Drush, Drupal weight, and Drupal Cron briefly?

View answer

Drush is a UNIX scripting interface for Drupal. It is command line shell. It is mainly helpful for those who are mainly worked on command line tools only. Drupal weight tells the priority or order to process the particular function and display of the block or node. Drupal Cron is used to executing the commands or scripts automatically at a particular date and time intervals.

What Is Difference Between Diff And Patch?

View answer

diff creates patch In simple terms, the diff command is used to compare differences between two versions of a file. The resulting file is called a patch, and typically is given (by the user) a “.patch” suffix.

This patch file then can be used on other copies of the “old” file by using the patch command, thus updating their “old” file(s) to match the “new” file(s).

Why you would use diff When might one use diff to create a patch file? Let’s say you are customizing a module to fix a bug, and have saved a new version of the module. How will you pass on your bug fix to others? Simply passing on your version of the module may not work, because it’s quite possible someone else has modified some other aspect of the code at the same time and you both would be overwriting each others’ changes.

So instead, what you do is run diff between the two files, and then upload the resulting patch — which others can then apply to their files using the patch command. (And you can apply other people’s patches against your files, without losing your own changes.).

The added benefit of this type of workflow is that changes to the code can easily be tracked — and undone, if necessary — which is essential in a community-developed project such as Drupal.

What is entity and entity api?

View answer

They provide a unified way to work with different data units in Drupal. Drupal 7 is all about entities. They are everywhere: nodes, users, taxonomy terms, vocabularies etc.

But how, as developers, can we create our own entities? When do we really need to do that? I think these questions are really very project-specific. We can probably use nodes for nearly everything. But when it comes to performance-sensitive projects, nodes should really only be used for content, and we should separate as much as possible from nodes. Why? Nodes are revisioned, they fire a lot of hooks, and they have functionality that we likely won’t need. Also if we know exactly what fields we should have in our entities, we can create our own custom entities to avoid all those joins of Field API tables.

What is difference between innodb and myIsam?

View answer

First major difference I see is that InnoDB implements row-level lock while MyISAM can do only a table-level lock. You will find better crash recovery in InnoDB. However, it doesn’t have FULLTEXT search indexes, as does MyISAM. InnoDB also implements transactions, foreign keys and relationship constraints while MyISAM does not.

What is difference between update and alter query?

View answer

ALTER is a DDL (Data Definition Language) statement. Whereas UPDATE is a DML (Data Manipulation Language) statement. One is used to update the structure of the table (add/remove field/index etc). Whereas UPDATE is used to update data.