# MySQL: Neo4J

```
create table customer (id int,name varchar(100));
insert into customer values (1, 'Rachel');
```

```
create table creditcard (id int, number varchar(16));

insert into creditcard values (101, '1234567890123456');
```

```
create table merchant (id int, name varchar(100));

insert into merchant values (1001, 'Macys');
```

Set Relation

```
create table customer_creditcard (id int, cust_id int, cc_id int)
insert into customer_creditcard values (999, 1,101)
```

```
create table transaction (id int, customer_cc_id int, amount float, ts datetime);
insert into transaction(111, 999, 100.00, '2023-01-01 11:23:34')
```

Clear all nodes

```
match(n) detach delete n
```

```
CREATE (rachel:Customer {name: 'Rachel'})

CREATE (card1:CreditCard {number: '1234567890123456'})

CREATE (macys:Merchant {name: 'Macys'})

CREATE (rachel)-[:OWNS]->(card1)

CREATE (tx1:Transaction {amount: 100, timestamp: datetime()})

CREATE (card1)-[:USED_IN]->(tx1)-[:MADE_AT]->(macys)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gchandra.gitbook.io/big-data-and-tools-with-nosql/nosql/neo4j/examples/mysql-neo4j.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
