Diferencia entre revisiones de «19/Campos de la base de datos»

De MoodleDocs
Sin resumen de edición
Línea 16: Línea 16:
=== Caja de selección ===
=== Caja de selección ===


Allows one or more checkboxes. Each line in the options box is a different checkbox. The text entered is what will be the case if the checkbox is checked e.g. 'valid' for something that can be valid or not. This word will appear beside the checkbox on entry, and then by itself when viewing if the box has been checked. If you wish to ensure that the user actively selects one of the options you can use [[Campos de la base de datos#Radio buttons|radio buttons]] instead
Allows one or more checkboxes. Each line in the options box is a different checkbox. The text entered is what will be the case if the checkbox is checked e.g. 'valid' for something that can be valid or not. This word will appear beside the checkbox on entry, and then by itself when viewing if the box has been checked. If you wish to ensure that the user actively selects one of the options you can use [[Campos de la base de datos#Botones de radio|Botones de radio]] instead


Multiple checboxes could be use, for example, in a movie database that has Horror, Comedy, Western etc. checkboxes for different film genres, and you would be able to check more than one in the case of Horror-Comedies or Comedy-Westerns. The [[Campos de la base de datos#Menu (multi-select)|menu (multi-select)]] field also achieves this, but clicking multiple checkboxes is usually a more obvious interface.
Multiple checboxes could be use, for example, in a movie database that has Horror, Comedy, Western etc. checkboxes for different film genres, and you would be able to check more than one in the case of Horror-Comedies or Comedy-Westerns. The [[Campos de la base de datos#Menu (multi-select)|menu (multi-select)]] field also achieves this, but clicking multiple checkboxes is usually a more obvious interface.

Revisión del 18:53 11 jul 2006

Podemos agregar muchos tipos de campos que formarán parte de nuestrabase de datos. Cada campo admite distintos tipos de datos, con diferentes interfaces. Después de crear los campos deseados podemos añadir información en la base de datos.

Nota: Pendiente de Traducir. ¡Anímese a traducir esta página!.     ( y otras páginas pendientes)

Primero, crear un campo

Un campo es el nombre de la unidad de información. Cada entrada en una base de datos puede tener múltiples campos de diversos tipos e.g. a text field called 'favourite color' which allows you to type in your favourite shade, or a menu called 'state' that lets you choose one from a list of the 50 that make up the United States of America. By combining several fields with appropriate names and types you should be able to capture all the relevant information about the items in your database.

Field name and description

All fields ask you for a name and a description when you create them.


Tipos de campos

Caja de selección

Allows one or more checkboxes. Each line in the options box is a different checkbox. The text entered is what will be the case if the checkbox is checked e.g. 'valid' for something that can be valid or not. This word will appear beside the checkbox on entry, and then by itself when viewing if the box has been checked. If you wish to ensure that the user actively selects one of the options you can use Botones de radio instead

Multiple checboxes could be use, for example, in a movie database that has Horror, Comedy, Western etc. checkboxes for different film genres, and you would be able to check more than one in the case of Horror-Comedies or Comedy-Westerns. The menu (multi-select) field also achieves this, but clicking multiple checkboxes is usually a more obvious interface.

Fecha

Allows users to enter a date by picking a day, month and year from a drop down list.

Archivo

Asks users to upload a file from their computer. If it is an image file then the picture field may be a better choice.

Menú

The text entered in the options area will be presented as a drop-down list for the user to choose from. Each line become a different option.

Menú (selección múltiple)

The text entered in the options area will be presented as a list for the user to choose from and each line become a different option. By holding down control or shift as they click, users will be able to select multiple options. This is a fairly advanced computer skill so it may be wise to use multiple checkboxes instead.

Número

Asks the user to enter a number. The number must be an integer, though it can be negative ( e.g. ...,-2,-1,0,1,2,3,...). If you enter anything else but numbers and a leading minus sign the number will be truncated or converted to zero e.g. "3.14" becomes "3", "1,000,000" becomes "1" and "six" becomes "0".

Dibujo

The user can upload an image file from their computer.

Botones de radio

Allows the user to choose one from a range of options. If the user doesn't select any of these options then they will be prompted to do so and can only submit the entry when one option is chosen.

If you only have two options and they are opposites (true/false, yes/no) then you could simply use a single checkbox instead. However checkboxes default to their unchecked status and so people could submit without actively selecting one of the options. This may not always be appropriate.

Texto

Users can enter text up to 60 characters in length. For longer text, or for text that requires formatting such as headers and bullet points, you can use a textarea field.

Área de texto

Allows users to enter a long piece of text including formatting similar to that found when creating forum posts.

URL

Ask the user to enter a URL. If you select autolink then the URL becomes a clickable link. If you also enter a forced name for the link then that text will be used for the hyperlink. For example in a database of author's you may wish people to enter the author's website. If you enter the text 'homepage' as a forced name then clicking on text "homepage" will take you to the entereed URL.