Editing a Relational Database using Tables and Forms

Editing a Relational Database using Tables and Forms

Understanding Relational Databases

  • A relational database is a collection of data items organised as a set of tables.
  • Each table represents a specific entity and its attributes. The entities could be a person, a product, or an event.
  • The tables are linked using primary and foreign keys, creating relationships between different sets of data.
  • Understanding these relationships is key to effective database design and use.

Working with Tables

  • Tables in databases hold the actual data of the entity. They are made up of rows (records) and columns (fields).
  • The Primary Key is a unique identifier for each record in a table. No two records can have the same primary key.
  • You can create, delete, or modify tables based on the requirements of your database.
  • Data types need to be specified for each field during table creation. Data types could be text, number, date/time, etc.

Using Forms for Data Entry and Editing

  • Forms are an essential tool in databases for inputting new records or editing existing ones.
  • Working with forms is often easier and less prone to errors than directly entering data into tables.
  • A well-designed form corresponds directly to a single record in a specific table.
  • Like tables, forms have fields that correspond to the attributes of the entity.
  • These fields can be text boxes, drop-down lists, checkboxes, etc., based on the nature of the data.
  • The data entered into a form is automatically updated in the corresponding table.

Referential Integrity and Data Validation

  • Referential integrity is a set of rules applied to maintain consistency and accuracy between linked tables.
  • It ensures any changes (addition, modification, deletion) in the data remain consistent across related tables.
  • Forms can also provide data validation to ensure the data entered meets specific criteria. This helps reduce data entry errors.
  • Data validation could include range checking, format checking, or presence checking.

Modifying Forms for Improved Usability

  • Customise your forms by adding buttons, images, tabs, and more to enhance usability.
  • Conditional formatting can also be used to highlight key information. For instance, overdue payment records could be highlighted in red.
  • Organise form controls in logical groupings and label them clearly for ease of data entry.
  • Maintain consistent design elements across forms for a coherent user experience.
  • Consider user needs and application requirements when modifying forms.