Week - 01 DBMS
Week - 01 DBMS
Give an example
Ans: A composite attribute in database design is an attribute that can be divided into smaller
sub-parts, each representing a distinct piece of information. These sub-parts can be
considered atomic attributes, meaning they cannot be divided further. Composite attributes
are often used when a single attribute naturally comprises multiple pieces of related data.
For example, consider the attribute "Address" in a database for storing customer
information. Instead of having separate attributes for street name, city, state, and zip code,
you can have a composite attribute called "Address" that includes these sub-parts. So, the
"Address" attribute would be composed of the following sub-attributes:
- Street
- City
- State
- Zip Code
Each of these sub-attributes contributes to the overall "Address" attribute, but they are
distinct pieces of information that together form a complete address. This helps in
organizing and managing data more efficiently in the database schema.