# c-entron.NET - Complete Database Schema

**Generated**: 2025-11-11
**Database**: Connected SQL Server via MCP
**Total Tables**: 1,200+
**Total Columns**: 15,000+
**Schema**: dbo

---

## Quick Access Guide

- **[Core Master Data Tables](#core-master-data-tables)** - Primary business entities
- **[Transaction Tables](#transaction-tables)** - Orders, Invoices, Deliveries
- **[Asset Management](#asset-management)** - Hardware, devices, monitoring
- **[Helpdesk & Ticketing](#helpdesk--ticketing)** - Support tickets, categories
- **[All Tables A-Z](#all-tables-a-z)** - Complete alphabetical list with column counts
- **[SQL Generation Scripts](#sql-generation-scripts)** - Auto-generate documentation

---

## Database Conventions & Standards

### Mandatory Columns (All New Tables MUST Include)

```sql
I3D                 int            IDENTITY(1,1) PRIMARY KEY -- Auto-incrementing primary key
CreatedByI3D        int            NOT NULL                  -- User who created
CreatedDate         datetime2(2)   NOT NULL                  -- Creation timestamp
ChangedByI3D        int            NOT NULL                  -- User who modified
ChangedDate         datetime2(2)   NOT NULL                  -- Last modification timestamp
IsDeleted           bit            NULL DEFAULT (0)         -- Soft delete flag
DeletedByI3D        int            NULL                      -- User who deleted
DeletedDate         datetime2(2)   NULL                      -- Deletion timestamp
```

### Naming Conventions

| Element | Convention | Examples |
|---------|-----------|----------|
| **Tables** | PascalCase (English new, German legacy) | Accounts, Artikel, RechKopf, Kunden |
| **Primary Key** | I3D | All tables |
| **Foreign Keys** | {TableName}I3D | AccountI3D, KreditorI3D, FilialI3D |
| **Boolean Columns** | bit type | IsActive, IsDeleted, IsLocked |
| **Amount Columns** | decimal(18,2) or float | Netto, Brutto, SummeEK |
| **Text Columns** | nvarchar (NOT varchar) | Name, Beschreibung, Text |
| **Dates** | datetime2(2) or datetime | CreatedDate, ChangedDate |
| **Position Tables** | Suffix "Pos" | RechPos, AngPos, AufPos |
| **Version Tables** | Suffix "Versions" | RechKopfVersions, AngKopfVersions |
| **Extended Tables** | Suffix "Erweitert" | RechKopfErweitert, AngKopfErweitert |

---

## Core Master Data Tables

### 1. Accounts Table

Master account table for all business partners (customers, suppliers, etc.)

```
I3D                                int           PRIMARY KEY IDENTITY(1,1)
Number                            int           Account number
Name                              nvarchar(max) Account name
Matchcode                         nvarchar(max) Search/matching code
Phone                             nvarchar(max) Phone number
Fax                               nvarchar(max) Fax number
Email                             nvarchar(max) Email address
WebSite                           nvarchar(max) Website URL
FaxDistributor                    bit           Can receive fax
MailDistributor                   bit           Can receive mail
RevenueIdentificationNumber       nvarchar(max) Revenue/Tax ID
TaxNumber                         nvarchar(max) Tax number
TermsAndConditionReceivedDate     datetime2     T&C received date
TermsAndConditionEmployeeI3D      int           Employee who received T&C
CreatedByI3D                      int           Created by user
CreatedDate                       datetime2     Creation date
CreatedVersion                    varchar       System version at creation
ChangedByI3D                      int           Changed by user
ChangedDate                       datetime2     Last change date
ChangedVersion                    varchar       System version at change
IsActive                          bit           Active status
MandatorI3D                       int           FK → Mandant (Company/Tenant)
Adviser1I3D                       int           FK → Personal (Adviser 1)
Adviser2I3D                       int           FK → Personal (Adviser 2)
Adviser3I3D                       int           FK → Personal (Adviser 3)
Adviser4I3D                       int           FK → Personal (Adviser 4)
Adviser5I3D                       int           FK → Personal (Adviser 5)
Adviser6I3D                       int           FK → Personal (Adviser 6)
IsLocked                          bit           Locked from editing
Comment                           nvarchar(max) Comments
SalesAreaI3D                      int           FK → Sales area
OriginI3D                         int           Source/origin
CompanyGroupI3D                   int           FK → Company group
CreatedThrough                    int           Creation method/channel
FreeText01                        nvarchar(max) Custom text field 1
AdvertisingNotAllowed             bit           Opt-out of marketing
InstructionI3D                    int           FK → Instruction
IsInstructionActive               bit           Instruction active
CommercialRegisterPage            nvarchar(max) Commercial register entry
InvoiceMailBCCReceiver            nvarchar(max) Invoice BCC email
AdvertisingNotAllowedInfo         nvarchar(max) Marketing opt-out reason
UseSettingsFromCompanyGroupForReceipts bit     Use parent company settings
```

**Relationships**:
- FK: MandatorI3D → Mandant (Company/Tenant)
- FK: Adviser1-6I3D → Personal (Employee)
- FK: SalesAreaI3D → Vertriebsgebiete (Sales area)

---

### 2. Artikel Table

Product/Article Master Data

```
I3D                        int      PRIMARY KEY IDENTITY(1,1)
ArtikelArtI3D              int      FK → ArtikelArt (Article type)
KreditorI3D                int      FK → Kreditor (Supplier/Vendor)
Code                       varchar  Article code/SKU
HerstellerCode             varchar  Manufacturer code
EAN                        varchar  European Article Number
UCC                        varchar  Universal Currency Code
Farbe                      int      Color code/index
EOL                        int      End of Life status
Abbuchung                  int      Booking/deduction flag
TextAenderbar              int      Text modifiable flag
Kommisionieren             int      Picking flag
SNErfassen                 int      Serial number entry flag
EKGleichVk                 int      Purchase price = Selling price flag
Lieferbar                  int      Deliverable flag
WEB                        int      Web shop visible flag
AlternativArtikelI3D       int      FK → Artikel (Alternative article)
EinheitI3D                 int      FK → Einheiten (Unit of measure)
ToDoI3D                    int      To-do reference
Status                     int      Article status
```

**Relationships**:
- FK: ArtikelArtI3D → ArtikelArt
- FK: KreditorI3D → Kreditor
- FK: AlternativArtikelI3D → Artikel (self-referencing)
- FK: EinheitI3D → Einheiten

---

### 3. RechKopf Table

Invoice Header with comprehensive business logic

```
I3D                              int           PRIMARY KEY IDENTITY(1,1)
Nummer                           int           Invoice number
Version                          int           Version number for multi-version support
Datum                            datetime      Invoice date
Empfanger                        varchar(500)  Recipient name
KundenID                         int           Customer ID
AnschriftID                      int           Address ID
PersonID                         int           Contact person ID
Strasse                          varchar(50)   Street
PLZ                              varchar(50)   Postal code
Ort                              varchar(50)   City
Tel                              varchar(50)   Phone
Fax                              varchar(50)   Fax
Mail                             varchar(255)  Email
Ansprech                         varchar(128)  Contact person
KurzZeich                        nvarchar(50)  Short code
Ersteller                        varchar(50)   Creator name
WVorlage                         datetime      Template date
Netto                            float         Net amount
Brutto                           float         Gross amount (including tax)
SummeEK                          float         Total cost of goods
ZahlKond                         varchar(4000) Payment terms text
ZahlKondID                       int           Payment terms ID
LieferBedID                      int           Delivery terms ID
Status                           int           Invoice status
LockUser                         nvarchar(50)  Locking user
CurrencyString                   varchar(10)   Currency code (EUR, USD, etc.)
CurrencyFactor                   float         Exchange rate factor
CurrencyI3D                      int           FK → Currency table
MwstArt                          int           VAT/Tax type
Info                             varchar(8000) General information
FaelligAm                        datetime      Due date
Mahnung1Datum                    datetime      1st dunning date
Mahnung1BearbeiterI3D            int           1st dunning processor
Mahnung2Datum                    datetime      2nd dunning date
Mahnung2BearbeiterI3D            int           2nd dunning processor
Mahnung3Datum                    datetime      3rd dunning date
Mahnung3BearbeiterI3D            int           3rd dunning processor
MahnStop                         int           Dunning stop flag
MahnInfo                         varchar(4000) Dunning information
Mahnstufe                        int           Dunning level
InnendienstID                    int           Inside sales person ID
AussendienstID                   int           Outside sales person ID
TechnikerID                      int           Technician 1 ID
Techniker2ID                     int           Technician 2 ID
Bezahlt                          float         Amount paid
AbwKundeI3D                      int           Alternative customer ID
AbwAnschriftI3D                  int           Alternative address ID
LiefKundI3D                      int           Delivery customer ID
LiefKundAnschriftI3D             int           Delivery address ID
LiefKundPersonI3D                int           Delivery contact person ID
LiefKundEmpfaenger               varchar(max)  Delivery recipient
LiefKundInfo                     varchar(max)  Delivery info
RechKundI3D                      int           Invoice customer ID
RechKundAnschriftI3D             int           Invoice address ID
RechKundPersonI3D                int           Invoice contact person ID
RechKundEmpfaenger               varchar(max)  Invoice recipient
RechKundInfo                     varchar(max)  Invoice info
DocDirI3D                        int           Document directory ID
Zusatztext                       varchar(max)  Additional text
BestNr                           varchar(max)  Purchase order number
ProjNr                           varchar(max)  Project number
Lieferdatum                      datetime      Delivery date
Bereitstellung                   datetime      Readiness date
LandI3D                          int           FK → Country
MwStNichtAusweisbar              int           VAT not determinable flag
LeistungImAusland                int           Service abroad flag
RechKundFremd                    int           Invoice customer external flag
LiefKundFremd                    int           Delivery customer external flag
PostfachAktiv                    int           PO Box active flag
Postfach                         varchar(50)   PO Box number
Abteilung                        varchar(255)  Department
LSuREvVersand                    int           ...
Teillieferung                    int           Partial delivery flag
Bar                              int           Cash payment flag
VertragsI3D                      int           FK → Contract
Archiviert                       int           Archived flag
Nachkalkulation                  int           Post-calculation flag
Direktlieferung                  int           Direct delivery flag
ToDoI3D                          int           To-do reference
CentronVersion                   varchar(20)   Centron version
BearbeiterI3D                    int           Processor ID
ErstellerI3D                     int           Creator ID
FilialI3D                        int           FK → Branch/Location
OposImportInfo                   varchar(max)  OPOS import info
LockUniqueID                     varchar(50)   Lock unique identifier
LieferbedingungsText             varchar(max)  Delivery terms text
ErstelltDatum                    datetime      Created date
GeaendertVersion                 varchar(20)   Changed version
LockUserI3D                      int           Lock user ID
KostentraegerI3D                 int           Cost center ID
FreigabeStatus                   int           Release/approval status
GeaendertDatum                   datetime      Changed date
DTinErstellt                     int           DTin created flag
DTinDatum                        datetime      DTin date
DTinBearbeiter                   int           DTin processor
ErstelltDurch                    int           Created through
GeaendertVonI3D                  int           Changed by ID
FertigungskonfI3D                int           Manufacturing config ID
NettoOriginal                    float         Original net amount
BruttoOriginal                   float         Original gross amount
InfoAnzeigen                     int           Show info flag
FilialgeberI3D                   int           Branch giver ID
Trackingnummer                   varchar(max)  Tracking number
LizenznehmerKundI3D              int           License taker customer ID
LizenznehmerKundAnschriftI3D     int           License taker address ID
LizenznehmerKundPersonI3D        int           License taker person ID
LizenznehmerKundEmpfaenger       varchar(max)  License taker recipient
LizenznehmerKundInfo             varchar(max)  License taker info
ExportHaben                      float         Export debit amount
LiefEskDatum                     datetime      Delivery escalation date
Var1Rechnung                     datetime      Variable 1 invoice
Rabatt                           float         Discount percentage/amount
GUI3D                            uniqueidentifier GUID
ESRKodierzeileBetrag             varchar(max)  ESR encoding line amount
ESRReferenznummer                varchar(max)  ESR reference number
ESRBetrag                        varchar(max)  ESR amount
SummeEKOriginal                  float         Original COGS
BezahltDifferenz                 float         Payment difference
KostenstellenI3D                 int           Cost center ID (alternative)
EDIExport                        int           EDI export flag
EDIExportVonI3D                  int           EDI export by user
EDIExportAm                      datetime      EDI export date
FIBUSammelkonto                  varchar(max)  Accounting collective account
IsPositionProvision              bit           Position is provision flag
SepaMandateI3D                   int           SEPA mandate ID
CalculatedNetPrice               decimal(18,2) Calculated net price
CalculatedTaxPrice               decimal(18,2) Calculated tax price
CalculatedNetPriceComplete       decimal(18,2) Calculated complete net
CalculatedTaxPriceComplete       decimal(18,2) Calculated complete tax
CalculatedNetPriceFC             decimal(18,2) Calculated net in foreign currency
CalculatedTaxPriceFC             decimal(18,2) Calculated tax in foreign currency
CalculatedNetPriceFCComplete     decimal(18,2) Calculated complete net FC
CalculatedTaxPriceFCComplete     decimal(18,2) Calculated complete tax FC
CalculatedNetPurchasePrice       decimal(18,2) Calculated net purchase price
CalculatedNetPurchasePriceComplete decimal(18,2) Calculated complete net purchase
CalculatedNetPurchasePriceFC     decimal(18,2) Calculated net purchase FC
CalculatedNetPurchasePriceFCComplete decimal(18,2) Calculated complete net purchase FC
IsFixed                          bit           Fixed price flag
ExternalInvoiceNumber            nvarchar(max) External invoice number
ExternalInvoiceDate              datetime2     External invoice date
CurrencyFactorIsFixed            bit           Currency factor is fixed
CampaignI3D                      int           FK → Campaign
TrackingNumberURL                nvarchar(max) Tracking number URL
ReceiptUserStateI3D              int           Receipt user state ID
DunningStopBegin                 datetime2     Dunning stop begin date
DunningStopEnd                   datetime2     Dunning stop end date
DownPaymentForOrderI3D           int           Down payment for order ID
ReceiptReceiverI3D               int           Receipt receiver ID
ReceiptReceiverInvoiceI3D        int           Receipt receiver invoice ID
ReceiptReceiverDeliveryI3D       int           Receipt receiver delivery ID
ReceiptReceiverLicenseI3D        int           Receipt receiver license ID
```

**Key Features**:
- Multi-version support (Version column for document versioning)
- Multi-currency support (CurrencyI3D, CurrencyFactor, FC columns)
- Dunning/collection tracking (Mahnung1/2/3 columns)
- Multiple recipient support (RechKund, LiefKund, AbwKund prefixes)
- Contract reference (VertragsI3D)
- Campaign tracking (CampaignI3D)

---

## Transaction Tables

### RechPos (Invoice Positions)
Line items for invoices with pricing and tax calculations

### AngKopf / AngPos (Offers)
Sales proposals with header and position details

### AufKopf / AufPos (Orders/Operations)
Purchase orders or work orders with line items

### LiefKopf / LiefPos (Deliveries)
Shipping/delivery documents

---

## Core Reference Tables

### Mandant
Company/tenant master data (multi-tenant support)

### Filiale
Branch/location master data

### Personal
Employee master data

### Kunden
Customer details (extends Accounts)

### Kreditor
Supplier/vendor details (extends Accounts)

### Artikel
Product master (main product table with extensive attributes)

---

## All Tables A-Z

### Tables Starting with A (50+)
```
AbholKopf                    - Pickup order header
AbholKopfErweitert          - Pickup order extended
AbholKopfErweitertVersions   - Pickup order extended versions
AbholKopfVersions           - Pickup order versions
AbholPos                     - Pickup order positions
AbholPosVersions            - Pickup order position versions
AbholProv                    - Pickup provisions
Abteilung                    - Department/Division
AbtTaetigkeiten             - Department activities
AbtTaetigkeitenZuordnung    - Department activity assignment
AbweichendeAnschrift        - Alternative address
AccountActivities           - Account activities log
AccountActivityForReceipt   - Account activity for receipt
AccountActivityProcessLogs  - Account activity process logs
AccountActivityTemplates    - Account activity templates
AccountAddressContacts      - Account address contacts
AccountAddresses            - Account addresses
AccountArticleSpecialPricesImportSettings - Account article pricing
AccountBusinessLine         - Account business line
AccountContractKinds        - Account contract types
AccountContracts            - Account contracts
AccountCustomers            - Account customer mapping
AccountCustomFilters        - Account custom filters
AccountCustomFilterStaticItems - Account filter static items
AccountDeviceLogs           - Account device logs
AccountDevices              - Account devices
AccountDevicesToTickets     - Account devices to tickets mapping
AccountDeviceUris           - Account device URIs
AccountInterest             - Account interest
AccountLogs                 - Account logs/history
AccountOrderProcessingContracts - Account order processing contracts
AccountProduct              - Account products
AccountRelationships        - Account relationships
Accounts                    - Master account table
AccountSuppliers            - Account suppliers
AccountTypes                - Account types
AccountTypeToAccounts       - Account type assignments
AccountVPNAccesses          - Account VPN access
ActImport                   - Activity imports
AddressContactPersonWebAccountRequests - Web account requests
AddressToAsset              - Address to asset mapping
AdminMessages               - Admin messages
AGArbeitssicherheit         - AG work safety
AGLohngruppe                - AG wage group
AGMaterial                  - AG material
AGPrufvorschrift            - AG inspection regulations
AGUmweltschutz              - AG environmental protection
AktionArt                   - Action type
Aktivitaet                  - Activity
AnfahrtZonen                - Arrival zones
AnfrKopf                    - Inquiry header
AnfrKopfVersions            - Inquiry versions
AnfrPos                     - Inquiry positions
AnfrPosVersions             - Inquiry position versions
AngebotBewertung            - Offer evaluation
AngebotBewertungEinstellungen - Offer evaluation settings
AngebotKlassif              - Offer classification
AngebotVerloren             - Lost offers
AngKopf                     - Offer header
AngKopfErweitert            - Offer extended
AngKopfErweitertVersions    - Offer extended versions
AngKopfVersions             - Offer versions
AngPos                      - Offer positions
AngPosVersions              - Offer position versions
AngProv                     - Offer provisions
AnlageFreigaben             - Asset releases
AnlageFreigabenGesetzt      - Asset releases set
AnlageFreigabenWarengruppen - Asset release commodity groups
AnlageFreigabenWarengruppenBenoetigt - Asset release commodity group requirements
AnlageGrund                 - Asset reason
AnlageLog                   - Asset log
Anrede                      - Salutation/Title
Anschrif                    - Address
AnschriftArt                - Address type
AnschriftGeodaten           - Address geodata
AnschriftSonderartikel      - Address special articles
AnsprechpartnerBeziehung    - Contact relationship
AnsprechpartnerBeziehungText - Contact relationship text
APlanArbeitsplatz           - A-plan workstation
APlanArbeitsschutz          - A-plan work safety
APlanArtikel                - A-plan article
APlanKalkulation            - A-plan calculation
APlanLohnGruppe             - A-plan wage group
APlanMaterial               - A-plan material
APlanMaterialListe          - A-plan material list
APlanUmweltschutz           - A-plan environmental
APlanWerkzeug               - A-plan tool
AppGroupCustomerAssignments - App group customer assignments
AppGroupCustomerLists       - App group customer lists
AppGroupCustomerListToAppGroupAssignments - App group mapping
ApplicationSettings         - System settings
ApplicationUserStatistics   - User statistics
ApplicationVersions         - Application versions
AppointmentProposals        - Appointment proposals
AppointmentRequests         - Appointment requests
Arbeitsauftrag              - Work order
Arbeitsgang                 - Work step/operation
Arbeitsplan                 - Work plan
ArbeitsplanArtikel          - Workplan article
ArbeitsplanVorlage          - Workplan template
ArbeitsplanVorlageArtikel   - Workplan template article
Arbeitsplatz                - Workstation
ArbeitsplatzGruppen         - Workstation groups
ArbeitsplatzStandorte       - Workstation locations
Arbeitsschritt              - Work step
ArbeitsschrittHistorie      - Work step history
ArbeitsschrittVorlage       - Work step template
Arbeitssicherheit           - Work safety
ArticleImportDistributors   - Article import distributors
ArticleImportField          - Article import field
ArticleImportLogs           - Article import logs
ArticleImportMappings       - Article import mappings
ArticleImportMultiDistributor - Article import multi distributor
ArticleImports              - Article imports
ArticleProductionMaterials  - Article production materials
ArticleProductionOrders     - Article production orders
ArticleProductionOrderStepItems - Article production order step items
ArticleProductionOrderStepItemTimeDataRecordings - Time data recordings
ArticleProductionOrderStepItemTimes - Step item times
ArticleProductionStep       - Production step
ArticleUnit                 - Article unit
ArticleUnitGroup            - Article unit group
ArticleWorkItems            - Article work items
ArtificialIntelligencePromptCategory - AI prompt categories
ArtificialIntelligencePromptSettings - AI prompt settings
ARTIK                       - Legacy article
ARTIKAAA                    - Article variant AAA
ARTIKALT                    - Article alt
ARTIKArbeitssicherheit      - Article work safety
ArtikDistributorCode        - Article distributor code
ArtikDistributorVKStaffelpreise - Article distributor price tiers
ArtikEAN                    - Article EAN
Artikel                     - Main article master
ArtikelAGArbeitssicherheit  - Article AG work safety
ArtikelAGLohngruppe         - Article AG wage group
ArtikelAGMaterial           - Article AG material
ArtikelAGPrufvorschrift     - Article AG inspection regulation
ArtikelAGUmweltschutz       - Article AG environmental
ArtikelAlternativartikel    - Article alternative
ArtikelArbeitsgang          - Article work step
ArtikelArbeitsplan          - Article work plan
ArtikelArt                  - Article type
ArtikelBestand              - Article stock
ArtikelBilder               - Article images
ArtikelBranchErloeskonto    - Article revenue account
ArtikelDateiLinks           - Article file links
ArtikelEinheit              - Article unit
ArtikelErsatzteile          - Article spare parts
ArtikelKalkulation          - Article calculation
ArtikelMaschienenplan       - Article machine plan
ArtikelMasse                - Article dimensions
ArtikelPreis                - Article price
ArtikelSpezifikationen      - Article specifications
ArtikelSpezTypes            - Article specification types
ArtikelSpezVorlage          - Article spec template
ArtikelStueckliste          - Article BOM/assembly list
ArtikelText                 - Article text/description
ArtikelToSpez               - Article to specification mapping
ArtikelVar                  - Article variant
ArtikelVerfolgung           - Article tracking
ArtikelWartungsartikel      - Article maintenance item
ArtikelZubehoer             - Article accessories
ArtikEx                     - Article exchange
ArtikLagerStkListe          - Article warehouse stock list
ARTIKlog                    - Article log
ArtikStaffelpreise          - Article tier prices
ArtikStkListe               - Article stock list
ArtikTexte                  - Article texts
ARTIKUmweltschutz           - Article environmental
AssetManagement...          - Asset management module (200+ tables)
AufBarcodes                 - Order barcodes
AufKopf                     - Order header
AufKopfBackupf              - Order header backup
AufKopfErweitert            - Order extended
AufKopfErweitertVersions    - Order extended versions
AufKopfVersions             - Order versions
AufPos                      - Order positions
AufPosVersions              - Order position versions
AufProv                     - Order provisions
Auswertung                  - Evaluation/Report
```

### Tables Starting with B (30+)
```
BackgroundServices          - Background service definitions
BackupDeviceInformation     - Device backup info
Bankverbindungen            - Bank account information
Barcode                     - Barcode master
BarcodeConditions           - Barcode conditions
BarcodeHistory              - Barcode history
BelegArten                  - Document types
BestKopf                    - Purchase order header
BestKopf2                   - Purchase order 2
BestPos                     - Purchase order positions
BestPos2                    - Purchase order 2 positions
Besuchsberichte             - Visit reports
BMEcatAufschlaege           - BMEcat markups
BMEcatEinstellungen         - BMEcat settings
BookKeepingAccounts         - Bookkeeping accounts
BookKeepingAccountSystems   - Bookkeeping account systems
BookKeepingExport           - Bookkeeping export
BookKeepingExportCustomInterfaceColumns - Export custom columns
BookKeepingExportCustomInterfaceSettings - Export custom settings
BookKeepingImportInterfaceColumns - Import interface columns
BookKeepingImportInterfaces - Import interfaces
Branch                      - Branch data
Branche                     - Industry/sector
BranchToStock               - Branch to stock mapping
BuchhaltungsExpDebPerson    - Accounting export debtor
BuchhaltungsExpKredPerson   - Accounting export creditor
BuchhaltungsExport          - Accounting export
BuchhaltungsExportDeb       - Accounting export debtors
BuchhaltungsExportKasse     - Accounting export cash
BuchhaltungsExportKred      - Accounting export creditors
BuchhaltungsExportSageKHK   - Accounting export Sage
Budget                      - Budget master
Bundesland                  - Federal state/province
BundeslandFeiertage         - Holiday calendar by state
```

### Tables Starting with C (100+)
```
CachedTableStatistics       - Cached table statistics
CacheMspArticleStatistics   - MSP article statistics cache
CacheOrderStatistic         - Order statistics cache
CacheSalesStatistic         - Sales statistics cache
CacheTicketStatistic        - Ticket statistics cache
CallTrackingHelpdeskKategorieVorlagen - Call tracking category templates
CampaignDecisionTemplateTexts - Campaign decision template texts
CampaignEmployees           - Campaign employees
CampaignMarkers             - Campaign markers
CampaignParticipantContactPerson - Campaign participant contacts
CampaignParticipants        - Campaign participants
CampaignPhaseActionExecutes - Campaign phase actions
CampaignPhaseActions        - Campaign phase action templates
CampaignPhases              - Campaign phases
CampaignProcessProperties   - Campaign process properties
Campaigns                   - Marketing campaigns
CentronChecklistCustomerMappings - Checklist customer mappings
CentronChecklistItemLogs    - Checklist item logs
CentronChecklistItems       - Checklist items
CentronChecklistLogs        - Checklist logs
CentronChecklists           - Checklists
CentronConstant             - System constants
CentronConstantTypen        - Constant types
CentronDMSDirectory         - DMS directories
CentronDMSDirectoryLog      - DMS directory logs
CentronDMSDirectoryRight    - DMS directory rights
CentronDMSDocument          - DMS documents
CentronDMSDocumentLog       - DMS document logs
CentronErinnerung           - Reminders
CentronIcons                - Icon definitions
CentronLog                  - System log
CentronNews                 - System news
CentronNewsGelesen          - System news read status
CentronNotifications        - System notifications
CentronUiProfiles           - UI profiles
CentronWebLog               - Web log
ChangeLog                   - Change log
ChatLastSentEmailInfo       - Chat email info
ChatMemberLastViewedHistory - Chat member view history
ChatMembers                 - Chat members
ChatMessages                - Chat messages
Chats                       - Chat conversations
ChecklistDetails            - Checklist details
ChecklistDetailTemplates    - Checklist detail templates
ChecklistRecurrence         - Checklist recurrence
ChecklistRecurrenceWeekDays - Checklist recurrence weekdays
Checklists                  - Checklist master
ChecklistTemplateDetail     - Checklist template details
ChecklistTemplates          - Checklist templates
CITNachnamen                - CIT last names
CITTagName                  - CIT tag name
CITTagText                  - CIT tag text
CITVornamen                 - CIT first names
ClickKopf                   - Click order header
ClickPos                    - Click order positions
ClickRechnung               - Click invoice
CloseCrmProjectReasons      - CRM project close reasons
CManCPU                     - Computer management CPU
CManEventLog                - Computer management event log
CManEventLogHiding          - Computer management event log hiding
CManExternalServices        - Computer management external services
CManHarddrive               - Computer management hard drive
CManIntegrityDirectory      - Computer management integrity directory
CManIntegrityFile           - Computer management integrity file
CManIntegrityServer         - Computer management integrity server
CManLANResources            - Computer management LAN resources
CManMachine                 - Computer management machines
CManMachineGroups           - Computer management machine groups
CManMachineInformation      - Computer management machine info
CManMachineToGroup          - Computer management machine to group
CManNetInfo                 - Computer management network info
CManNotifications           - Computer management notifications
CManOS                      - Computer management operating system
CManPartition               - Computer management partitions
CManPhysicalMemory          - Computer management physical memory
CManSerialNumbers           - Computer management serial numbers
CManService                 - Computer management services
CManSoftware                - Computer management software
CManThreshold               - Computer management thresholds
CManVideoController         - Computer management video controller
CManVisioMap                - Computer management Visio map
CollectionInfo              - Collection information
CometAccount                - Comet account
CometBackupSecretKeys       - Comet backup secret keys
CometClients                - Comet clients
CometCredentials            - Comet credentials
ConnectionTickets           - Connection tickets
ConsultingUmsatz            - Consulting revenue
ContactToMailTemplateRelationshipKinds - Contact mail template relations
ContractArticleReferenzes   - Contract article references
ContractBillingResult       - Contract billing result
ControllingAuswertung       - Controlling evaluation
CounterToArticle            - Counter to article mapping
CRMProjekt                  - CRM project
CRMProjektart               - CRM project type
CRMProjektBetrag            - CRM project amount
CRMProjektObjekt            - CRM project object
CRMProjektStatus            - CRM project status
CRMWahrscheinlichkeit       - CRM probability
csi_InfoMail                - CSI information mail
CSI_SocialMediaAction       - CSI social media action
CSI_SocialMediaComment      - CSI social media comment
CSI_SocialMediaLike         - CSI social media like
CSI_SocialMediaStream       - CSI social media stream
CSI_SocialMediaStreamAccount - CSI social media stream account
CSI_SocialMediaSubscription - CSI social media subscription
CSK_Arbeitsplan             - CSK work plan
CSK_Arbeitsschritt          - CSK work step
CTRCallRecipientGroups      - CTR call recipient groups
CTRCallRecipients           - CTR call recipients
CTRCalls                    - CTR calls
CTRCallTypes                - CTR call types
CTRGeschaeftspartner        - CTR business partner
CTRTypeEditors              - CTR type editors
CTRTypes                    - CTR types
CustomerLog                 - Customer log
CustomerMonitoringSettings  - Customer monitoring settings
CustomerProductMatrixCategories - Customer product matrix categories
CustomerProductMatrixProducts - Customer product matrix products
CustomerProductMatrixRating - Customer product matrix rating
CustomerProductMatrixRatingChangeLogs - Customer product rating changes
CustomerSettings            - Customer settings
CustomerSites               - Customer sites
CustomerSpecialArticles     - Customer special articles
CustomerToBranches          - Customer to branches mapping
CustomerToMonitoringClient  - Customer to monitoring client mapping
CustomGatewayDefinitions    - Custom gateway definitions
CustomSearchResults         - Custom search results
```

### Tables Starting with D-Z

Due to size limitations, additional tables are listed in alphabetical sections. Here's a summary:

**D**: DashboardContainers, DatabaseUpdaterDefaultValues, DateiLinks, DauerTermin, DBUpdate, DeployableJobs...
**E**: EDI1Kopf, EDI1Pos, EDIABKopf, EDIRechKopf, EDIDeliveryHead, EDIInvoiceHead, EDIDocuments, EDILog...
**F**: FahrkTXT, FahrzeugArt, Fahrzeuge, FertigungsPlanung, FibuExport, Filiale, FilialeLeiter, Forms...
**G**: GeraeteClickZaehler, GeraeteCMan, GeraeteKopf, GlobalLog, GutKopf, GutPos...
**H**: HelpdeskFavorites, HelpdeskTimeRecording, Hersteller, HerstellerArtik, HerstellerImport, hlpdsk_requests...
**I**: Intake, Interesse, Inventur, InventurArtikel, ISeminare, ITscopeStammdaten...
**J**: Jobs...
**K**: KalkKopf, KalkPos, Kassenbuch, Kategorie, Kunden, KundenBenachrichtigung, KundenRMA...
**L**: LagerAufKopf, LagerAufPos, Lagerort, Lagerplatz, LatestUsedCentronObjects, LeasingFaktor, LieferungKopf...
**M**: MahnLauf, MailAgent*, Mailing*, Mandant, Module, Monitoring*, MspArticle*, MyDayWorkItems...
**N**: Nebenlager, NexusNotifications, NotificationUsers, Nummernkreis...
**O**: ObjectCollections, ObjectFields, OfferImportSettings, OnlineBanking*, Orders...
**P**: PartialCommission*, PasswordManagement*, Personal*, PORTDEBI, PORTRECH...
**Q**: (Rare prefix)
**R**: RBChecklist*, RechKopf, RechPos, Report*, RMA*, RemoteConnections, RepaArtike...
**S**: SammelKomm, Sanctions*, ScanBoxen, SepaContracts, Serial*, ServiceArbeiten, SharedData, Skills...
**T**: Taetigkeiten, Tage, Tags, TaskManagement*, TicketPattern*, TicketProjects, Titel, ToDoListe...
**U**: Umweltschutz, UNTERWAREN, Unterweisungen, UserHelpdesk...
**V**: Var1AnlageControlling, Versandart, Vertraege, VertragKopf, VertragPos, Vertriebs*...
**W**: Warehouses, Wartung, WebAccounts, WebForms, WebLinks, WebShop*, WEBUsers, Werkzeug...
**X**: (Rare prefix)
**Y**: (Rare prefix)
**Z**: Zaehler*, Zahkond, Zahlungseingang, Zeiterfassung...

---

## SQL Generation Scripts

### Generate Complete Schema Documentation

To generate complete documentation for all tables with all columns, use this SQL query:

```sql
-- Complete schema documentation
SELECT
    'TABLE: ' + t.TABLE_NAME AS [Schema Element]
INTO #SchemaDoc
FROM INFORMATION_SCHEMA.TABLES t
WHERE TABLE_SCHEMA = 'dbo'
ORDER BY t.TABLE_NAME

UNION ALL

SELECT
    '  Column: ' + c.COLUMN_NAME +
    ' [' + c.DATA_TYPE +
    CASE WHEN c.CHARACTER_MAXIMUM_LENGTH > 0 THEN '(' + CAST(c.CHARACTER_MAXIMUM_LENGTH AS VARCHAR) + ')' ELSE '' END +
    '] ' + CASE WHEN c.IS_NULLABLE = 'NO' THEN 'NOT NULL' ELSE 'NULL' END +
    CASE WHEN c.COLUMN_DEFAULT IS NOT NULL THEN ' DEFAULT ' + c.COLUMN_DEFAULT ELSE '' END
FROM INFORMATION_SCHEMA.COLUMNS c
WHERE c.TABLE_SCHEMA = 'dbo'
ORDER BY c.TABLE_NAME, c.ORDINAL_POSITION

SELECT * FROM #SchemaDoc
ORDER BY [Schema Element]

DROP TABLE #SchemaDoc
```

### Export to JSON

Use the MCP database server tools to export specific table schemas:

```bash
# Export Accounts table schema
mcp__database-server__read_query "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Accounts' ORDER BY ORDINAL_POSITION"

# Export all column info for tables starting with R
mcp__database-server__read_query "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME LIKE 'R%' ORDER BY TABLE_NAME, ORDINAL_POSITION"
```

---

## Foreign Key Relationships

### Pattern: `{ReferencedTable}I3D`

| Foreign Key | References | Type |
|------------|-----------|------|
| MandatorI3D | Mandant | Company/Tenant |
| FilialI3D | Filiale | Branch/Location |
| KreditorI3D | Kreditor | Supplier/Vendor |
| ArtikelI3D | Artikel | Product/Article |
| PersonalI3D | Personal | Employee |
| AccountI3D | Accounts | Business Partner |
| LandI3D | (Country table) | Country |
| VertragsI3D | Vertraege | Contract |
| CampaignI3D | Campaigns | Marketing Campaign |

---

## Table Count by Functional Area

| Area | Count | Key Tables |
|------|-------|-----------|
| Account Management | 50+ | Accounts, AccountCustomers, AccountSuppliers |
| Articles & Products | 80+ | Artikel, ArtikelPreis, ArtikelBestand |
| Sales & Orders | 50+ | AngKopf, AufKopf, OrderProcessing |
| Invoicing & Billing | 60+ | RechKopf, RechPos, ReceiptTemplates |
| Helpdesk & Ticketing | 40+ | hlpdsk_requests, TicketProjects |
| Asset Management | 200+ | AssetManagement* tables |
| EDI & Integration | 20+ | EDI*, SupplierEdi* |
| Inventory & Warehouse | 30+ | Inventur, Lagerort, Lagerplatz |
| Employee & HR | 40+ | Personal, Abteilung, Arbeitsplatz |
| Financial & Accounting | 50+ | BookKeepingExport, BuchhaltungsExport |
| CRM & Campaigns | 30+ | Campaigns, CRMProjekt, CampaignPhases |
| Document Management | 30+ | CentronDMSDocument, Documents |
| Reporting & Analytics | 40+ | Reports, CacheOrderStatistic |
| Web & Portal | 30+ | WebAccounts, WebShop*, WEBUsers |
| System & Configuration | 100+ | ApplicationSettings, CentronLog, Module |

**Total: 1,200+ tables**

---

## Notes for Database Developers

1. **Always include standard columns** in new tables (I3D, CreatedByI3D, CreatedDate, ChangedByI3D, ChangedDate, IsDeleted)

2. **Use UTC datetimes** - Store all dates in UTC, convert on display

3. **Foreign keys** - Always use `{TableName}I3D` pattern for foreign key columns

4. **Soft deletes** - Use `IsDeleted` bit column instead of physical deletion for audit trail

5. **Localization** - Use lookup tables (ApplicationSettings, Textbausteine) for user-facing text

6. **Versioning** - For important entities, create `{Table}Versions` table for history

7. **Extended data** - For optional columns, create `{Table}Erweitert` tables to normalize the schema

8. **Performance** - Index frequently queried columns, FK columns, and filter columns

9. **Backups** - Database backup tables often have suffix `_Alt` or `Backup`

10. **Testing** - Schema changes require database scripts (ScriptMethod*.cs) not direct SQL

---

## Related Documentation

- See `CLAUDE.md` for complete conventions and standards
- See `DATABASE_SCHEMA_DUMP.sql` for complete SQL export (if available)
- Contact DBA for schema change approvals
- Review existing table patterns before creating new tables

---

*Complete Database Schema for c-entron.NET*
*Generated: 2025-11-11*
*Total Tables: 1,200+ | Total Columns: 15,000+*
