A database is a collection of related data that can be accessed in multiple ways. Flat-file systems hold all data in a single table, which can cause redundancy, integrity, and consistency problems and prevents data sharing. Relational databases, developed in the 1970s, address these issues by separating data into multiple tables linked by common attributes, allowing for more flexible querying while maintaining data integrity, reducing redundancy, and ensuring consistency. Relational databases provide advantages over flat-file systems.