# Data Structure
PrismStudio incorporates a hierarchical system of data structures to handle different types of data effectively. Understanding the interactions between these structures during data operations is crucial for effective analysis and processing.
</br>

## Hierarchy of Data Structures

PrismStudio employs a hierarchy of data structures, ranging from simpler to more complex representations:

- Value
- DataFrame
- Time DataFrame = Security DataFrame (same level)
- Security Time DataFrame

According to this hierarchy, a key principle governs the behavior of these structures:
</br>

## Inheritance of Complex Data Structures

When a simpler data structure is involved in an operation with a more complex data structure, the resulting data structure inherits the data structure of the more complex one. This ensures that the output can fully accommodate the additional associations and functionalities offered by the complex structure.

However, there are exceptions to this general rule that should be considered:

1. **Inoperable Combinations:** Directly operating or combining a Security DataFrame with a Time DataFrame is not possible. These two data structures represent distinct types of data and lack the necessary reference information to perform meaningful operations. A Time DataFrame lacks securities associations, while a Security DataFrame lacks time elements. Consequently, there is no common basis or shared context for conducting operations between these structures.
2. **Financial DataFrame operating with other DataFrame:** When a Financial DataFrame is operated with any other data structure (excluding Value and another Financial DataFrame), the resulting data structure is a Security Time DataFrame. During this operation, the value columns are collapsed into a single column, maintaining the integrity of the financial data while incorporating the necessary time and security associations.
3. **Financial DataFrame operating with Value or Financial DataFrame:** If a Financial DataFrame is operated with a singular Value or another Financial DataFrame, it retains its structure as a Financial DataFrame. Operating with a single value or another Financial DataFrame does not require any structural changes to accommodate the operation.

