A database record is one stored row containing a related set of field values. In a table, each row represents an individual record, while each column represents a field. This structure improves on a single CSV row by giving fields defined data types instead of treating every value as text. section 10.3.1 section 10.2
A record participates in a database structure through several related parts:
- Fields hold values such as names, addresses, product names, quantities, integers, decimals, or binary objects. section 10.3.1
- A primary key uniquely identifies the record within its table. section 10.3.1
- A foreign key connects the record to a primary key in another table, allowing related data to be stored separately. section 10.3.1
From order data to database records
An online store may begin with CSV rows containing a customer, address, product, and quantity. Repeating customer and address values across orders creates redundancy. Separate Customer, Address, Product, and Order records reduce that repetition. SQLAlchemy models turn parsed CSV data into model instances, and session.commit() persists them, generating primary-key values used when creating related orders and items. section 10.2 section 10.7.1
Use the Customer ERD to inspect how a record’s fields, data types, and primary key are represented visually. section 10.3.1











