*Start by reading [[Database]]*
*I suggest you also see [[DATABASING]]*
https://nl-db.princ3lewis.com
[[NL-DB]] is a project I decided to do to illustrate the advantages of visual databasing analysis. Using the idea of non-linearity, database can be structured to increase analysis and make predictions using AI.
It's based on the simple principle of hierarchy. The idea is to link object-oriented data using “nodes” and “edges” by attributes.
On the graph data are represented by points. These points (dots) contain attributes associated with them that provide descriptions or tell you something about the data. A point could be John. John's age, date of birth and address are all attributes of John.
```
class key = age ; value = 45;
if (age == int){
key = int;
value = int;
}
return value;
```
In our database, we characterize John as an Employee of Google. John is now a subordinate of Employee. Therefore, John is also a subordinate of Google. Hierarchically, Employee is a parent node of John and Google is a parent node of Employee. However, non-linearly, Google is also a parent node of John. This relationship involves Employee hence, Employee becomes the primary key linking John and Google. Without Employee, John has no connection to Google.
$
R(G, J) \implies \exists E \, (R(G, E) \land R(E, J))
$
Understanding this relationship, we can visually link John to Google by first linking John to Employee. However, if we make Google an attribute of John with ``key = workplace ; value = google`` John now has a direct link to Google that is solely based on attribute rather than hierarchy. Though we still do understand that John in an employee of Google.
$
P(x) :
P(J) = E \quad
P(E) = G \quad
P^2(J) = P(P(J)) = G
$
$
A(x, k) :
A(J, \text{workplace}) = G \quad
A(J, \text{workplace}) = G \quad
P^2(J) = G \quad
$
$
A(J, \text{workplace}) = G \implies P^2(J) = G
$
*Now we can interpret John → Employee → Google using attribute as John -(emp)→ Google*
```mermaid
graph TD
%% Nodes
J[John] --> E[Employee]
E --> G[Google]
J -.->|Attribute| G
%% Styles
classDef attribute color:blue,stroke-width:2,stroke-dasharray:5,fill:none;
class J,G,E default;
linkStyle 2 stroke-dasharray:5 stroke-width:2 color:blue;
```
This is the logic of [[NL-DB]]. There can be as many subordinates connected to a node and more sub-subordinates on a subordinate. Attributes allow you to form direct seamless connections while maintaining the database structure.
This direct relationship is what object-oriented database rely on but in a more complex way. Object-oriented databases treat data like objects making each data unique even if some data may be a child of another. However, with objects, the data structure becomes difficult to manage since objects are treated uniquely.
With attributes, it's almost the same thing but different visual. On the graph, a dotted line shows attribute related data (data with the same `attribute = label`). A straight line shows parent to child relationship data. There can be multiple parents to children relationships and multiple attributed relationships.
In essence, the main purpose of this visualization is to perform accurate and insightful analysis by being able to see what connections are within the database.
> [!example]
> How does John relate to Google? Does John enjoy working at Google? How does John spend his income at Google? What does John spend most of his time doing? THIS IS THE SMALLER PICTURE
**ON A BIGGER SCALE:**
**What does Google spend most of their budget on? What could they improve to maximize profit? What is the most important thing holding the company together?**
Data analysis this way can help us make crucial decisions when it comes to work or things as simple as our lives. You can analyze what's taking more of your finance, what's taking more of your time. How do you maximize one activity over another if you want to excel at it?
### How to perform analysis:
When you think about analyzing data, you must first have an intent. An intent should start with a question or a statement. Analysis depends on how much data is present.
I'm adding more comprehensive information to this doc to further explain my idea. Come back soon.
> [!important]
>
> GO TO:
>
> [[Database]]
> [[DATABASING]]
> [[NL-DB]]