Introduction to the Images Table
The images table is designed to store metadata for images uploaded during manufacturing processes. This table plays a crucial role in organizing and linking visual data to specific process entries and unique identifiers within the Serial system.Table Structure
The images table is structured to efficiently manage image metadata while maintaining relationships with other key entities in the system. Here’s a detailed breakdown of its columns:| Column Name | Data Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | Unique identifier for each image entry |
| company_id | uuid | foreign key, not null | Reference to the company associated with the image |
| process_entry_id | uuid | foreign key, not null | Reference to the process entry associated with the image |
| unique_identifier_id | uuid | foreign key, not null | Reference to the unique identifier associated with the image |
| file_name | text | not null, default ‘image’ | Name of the image file |
| bucket_name | text | not null, default ‘data-images’ | Name of the storage bucket containing the image |
| dataset_id | uuid | foreign key, not null | Reference to the dataset associated with the image |
| created_at | timestamp with time zone | not null, default now() | Timestamp of when the image entry was created |
Usage and Functionality
The images table is designed to be a central repository for image metadata within the Serial application. Here are some key points about its usage:- Image Metadata Storage: The table stores essential information about images without containing the actual image data. This approach optimizes database performance while maintaining crucial relationships.
- Process and Identifier Linkage: Each image is directly linked to a specific process entry and unique identifier, allowing for precise tracking of visual data throughout the manufacturing process.
- Company and Dataset Organization: Images are associated with both a company and a dataset, enabling efficient organization and retrieval of visual data within the context of specific organizational units and data collections.
Notes
-
The actual image files are stored in Supabase storage, with the
bucket_namecolumn indicating the storage location. - Row-level security is enabled on this table, ensuring that access to image metadata is properly controlled based on user permissions and company associations.
-
Example of inserting a new image entry:
- When retrieving image data, you’ll need to combine the metadata from this table with the actual image retrieval from Supabase storage.

