2

It is possible to reuse the already created fields via Add existing field option. From optimization perspective and the way Drupal stores and manages such fields in database I would like to know, does adding fields this way cause any extra efficacy or not?

4

Add new field is used to create a new field; Add existing field is used to connect the existing field with another content type.

I don't think it's a big difference but it's a good option for developer to attach their fields to other content types. For existing field, after you have created the new field, you can attach that field to multiple content types.

See also When should I use an existing field?

2

Add new field is used to create a new field; a new table for storing that field data will be created in the database. It is a simple and easy way of creating a new field.

Add existing field is used to use an existing field of a content type in another content type. All settings of existing fields will be inherited. Also, the same database table will be used to store data, cutting off the number of new tables in the . It is a simple and easy way of creating a new field.

The main advantage of using the existing field is that in views and in queries, we can use same field, or same query for different content types, we does not need to create different views or queries of same type.

Suppose, we want to create a slider of images(from images of contents from different content types) using a view, if we have used the same field, we can make it very easily, calling one field, else we will need lots of customization to do such simple task.

It is a good practice to use existing fields whenever possible, even Drupal core fields (title, body, etc) are built in same way.

0

Its depends on the size of your website. If it's a huge site with lots of data or small site which may grow in near future then I would suggest you to use new fields.Each field has a database table associated with it and if you use reuse fields then table will grow and at sometime this will affect your site performance. By creating new fields, each field will have its own database table and this will less affect your site performance.

On the other hand, if you are doing any back end code and if your site has manageable amount of data. Then you can use reuse fields which makes coding easy. It will also make life with views easier, since you won't have select a from multiple fields.

In short, for each field Drupal create one database table and when you reuse that field, all the values be saved together in same table.

This article will give you more understanding: https://www.ostraining.com/blog/drupal/re-using-drupal-fields

0

"Add existing field" is a field that you have already created in some other entity. Say, for example: you have a content type video with field "video". Now you want to use the same "video" field in some other content type. You can do so, by choose add existing field option.

In this way, you prevent database forming an new table for some new field and will use existing table of existing field.

As, every new field creates two new tables in database and you prevent this extra occupying space in database by using existing field option.

0

enter image description here The Field UI has two parts:

1.A list of field instances of the element being edited (e.g. Basic page or Tags). In the above image, the field instances are Title and Body.

2.A pair of subforms for adding new field instances. These subforms are:

*.Add new field. This is used to both create a new field and to add an instance of that field to the element being edited.

*.Add existing field. This is used to add an instance of a field that already exists.

To add images or tags to a page, you use "Add existing field" because when Drupal is first installed, it predefines the fields Image and Tags.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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