# Conventions

Following a set of database conventions improves the readability and understanding of the database and related sql. Every DBA has their own thoughts about which convention to follow. This is ours

## Naming

* Names must clearly describe the object
* Use PascalCase for all names
* Don’t use Hungarian notation (like intNumber)
* Don’t use abbreviations except if they are well-known

| Applies To        | Convention        | Example        |
| ----------------- | ----------------- | -------------- |
| Tables            | \[Noun], singular | Customer       |
| Stored Procedures | \[Verb]\[Noun]    | UpdateCustomer |
| Views             | \[Noun]           | CustomerOrders |
| Fields            | \[Noun]           | Surname        |

## SQL Queries

* Use consistent indentation
* Use UPPERCASE for keywords, like SELECT, FROM, WHERE, and JOIN
* Use meaningful aliases, not single letters or abbreviations
* Use single quotes ('string') for string literals and double quotes (“identifier”) for identifier

## Links

[Poor SQL - Instant Free and Open-Source T-SQL Formatting](https://poorsql.com/)


---

# 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://docs.linx.software/reference/plugins/database/conventions.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.
