V
V
Vlad1712015-09-29 04:51:03
Drupal
Vlad171, 2015-09-29 04:51:03

How is a foreign key implemented when working with a database in Drupal 7?

I am learning a little with Drupal. One of the fundamental questions I have left is the principle of working with the database. Much implicitly somehow implemented. Or I'm used to Django, where everything is more than obvious: I created a table model, entered data, assigned a list with a selection to a variable, displayed a variable where you need it.
The task is more than trivial. For example, there is a list of Edita Piekha's music albums. Each album has a certain number of tracks, naturally all hits. On the site you need to display, for example, a list of album names by clicking on each of which opens a list of mp3 files with names. Using Views is of no interest by definition, because there is a need to understand the mechanism of work.
I understand that you need to create 2 types of material: album (fields - title, cover, etc.) and track (fields - mp3 file, title). How to connect one to the other on the output? Through taxonomy? Then how to do it programmatically?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question