diff --git a/SqlDBM/src/Tables/CRM.Account.sql b/SqlDBM/src/Tables/CRM.Account.sql new file mode 100644 index 0000000..97cc556 --- /dev/null +++ b/SqlDBM/src/Tables/CRM.Account.sql @@ -0,0 +1,19 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.Account +CREATE TABLE CRM.Account +( +AccountId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each account in the CRM system.'), +Name string(80) NOT NULL OPTIONS(description = 'The name of the account, such as a business or individual customer.'), +AccountNumber string(40) OPTIONS(description = 'A unique number associated with the account for tracking purposes.'), +Industry string(40) OPTIONS(description = 'The industry to which the account belongs (e.g., Technology, Finance).'), +AnnualRevenue numeric(18, 2) OPTIONS(description = 'The annual revenue of the account, used for analysis and segmentation.'), +Rating string(10) OPTIONS(description = 'A qualitative rating of the account (e.g., Hot, Warm, Cold) to prioritize engagement.'), +Type string(40) OPTIONS(description = 'Specifies the type of account (e.g., Customer, Partner, Prospect).'), +BillingCity string(40) OPTIONS(description = 'The city in the accounts billing address.'), +BillingCountry string(40) OPTIONS(description = 'The country in the accounts billing address.'), +CreatedDate date OPTIONS(description = 'The date when the account record was created in the CRM.') +) +OPTIONS(description = 'Stores core information about companies or individuals with whom the organization has business relationships, including customers, partners, and prospects.', +friendly_name = 'Account'); diff --git a/SqlDBM/src/Tables/CRM.Campaign.sql b/SqlDBM/src/Tables/CRM.Campaign.sql new file mode 100644 index 0000000..f3ee24f --- /dev/null +++ b/SqlDBM/src/Tables/CRM.Campaign.sql @@ -0,0 +1,17 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.Campaign +CREATE TABLE CRM.Campaign +( +CampaignId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each campaign, serving as the primary key.'), +Name string(120) NOT NULL OPTIONS(description = 'The name of the campaign (e.g., Spring Sale or Customer Retention Drive).'), +Type string(40) OPTIONS(description = 'Specifies the type of campaign (e.g., Email, Social Media, Direct Mail).'), +Status string(20) OPTIONS(description = 'The current status of the campaign (e.g., Active, Completed, Planned).'), +StartDate date OPTIONS(description = 'The start date of the campaign.'), +EndDate date OPTIONS(description = 'The end date of the campaign.'), +BudgetedCost numeric(18, 2) OPTIONS(description = 'The estimated financial budget allocated for the campaign.'), +CreatedDate date OPTIONS(description = 'The date when the campaign record was created.') +) +OPTIONS(description = 'Tracks marketing campaigns, including details about their type, duration, budget, and status.', +friendly_name = 'Campaign'); diff --git a/SqlDBM/src/Tables/CRM.CampaignMember.sql b/SqlDBM/src/Tables/CRM.CampaignMember.sql new file mode 100644 index 0000000..0407c12 --- /dev/null +++ b/SqlDBM/src/Tables/CRM.CampaignMember.sql @@ -0,0 +1,16 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.CampaignMember +CREATE TABLE CRM.CampaignMember +( +MemberId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each campaign member, serving as the primary key.'), +CampaignId string OPTIONS(description = 'References the campaign associated with the member.'), +LeadId string OPTIONS(description = 'References the lead associated with the campaign member.'), +Status string(20) OPTIONS(description = 'Tracks the members status within the campaign (e.g., Responded, Sent).'), +CreatedDate date OPTIONS(description = 'The date when the campaign member record was created.'), + CONSTRAINT CampaignId FOREIGN KEY (CampaignId) REFERENCES CRM.Campaign (CampaignId) NOT ENFORCED, + CONSTRAINT LeadId FOREIGN KEY (LeadId) REFERENCES CRM.Lead (LeadId) NOT ENFORCED +) +OPTIONS(description = 'Tracks the participation and engagement of leads or contacts in marketing campaigns.', +friendly_name = 'CampaignMember'); diff --git a/SqlDBM/src/Tables/CRM.Contact.sql b/SqlDBM/src/Tables/CRM.Contact.sql new file mode 100644 index 0000000..55c8bbf --- /dev/null +++ b/SqlDBM/src/Tables/CRM.Contact.sql @@ -0,0 +1,19 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.Contact +CREATE TABLE CRM.Contact +( +ContactId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each contact, serving as the primary key.'), +FirstName string(40) OPTIONS(description = 'The first name of the contact.'), +LastName string(80) NOT NULL OPTIONS(description = 'The last name of the contact, which is required for proper identification.'), +AccountId string REFERENCES CRM.Account(AccountId) NOT ENFORCED OPTIONS(description = 'References the account associated with this contact.'), +Email string(80) OPTIONS(description = 'The email address of the contact, used for communication.'), +Phone string(40) OPTIONS(description = 'The primary phone number for the contact.'), +MobilePhone string(40) OPTIONS(description = 'The mobile phone number of the contact.'), +MailingCity string(40) OPTIONS(description = 'The city in the contact?s mailing address.'), +MailingCountry string(40) OPTIONS(description = 'The country in the contact?s mailing address.'), +CreatedDate date OPTIONS(description = 'The date when the contact record was created.') +) +OPTIONS(description = 'Represents individuals associated with accounts, tracking their details and enabling personalized interactions.', +friendly_name = 'Contact'); diff --git a/SqlDBM/src/Tables/CRM.Contract.sql b/SqlDBM/src/Tables/CRM.Contract.sql new file mode 100644 index 0000000..7388d59 --- /dev/null +++ b/SqlDBM/src/Tables/CRM.Contract.sql @@ -0,0 +1,15 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.Contract +CREATE TABLE CRM.Contract +( +ContractId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each contract, serving as the primary key.'), +AccountId string REFERENCES CRM.Account(AccountId) NOT ENFORCED OPTIONS(description = 'References the account associated with this contract.'), +StartDate date OPTIONS(description = 'Specifies the start date of the contract.'), +EndDate date OPTIONS(description = 'Specifies the end date or expiration of the contract.'), +Status string(20) OPTIONS(description = 'Tracks the current status of the contract (e.g., Active, Expired).'), +CreatedDate date OPTIONS(description = 'The date when the contract record was created in the CRM.') +) +OPTIONS(description = 'Manages customer agreements, tracking contract duration, status, and associated accounts.', +friendly_name = 'Contract'); diff --git a/SqlDBM/src/Tables/CRM.Event.sql b/SqlDBM/src/Tables/CRM.Event.sql new file mode 100644 index 0000000..a94e771 --- /dev/null +++ b/SqlDBM/src/Tables/CRM.Event.sql @@ -0,0 +1,10 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.Event +CREATE TABLE CRM.Event +( +EventId string NOT NULL OPTIONS(description = 'Unique identifier for each event, serving as the primary key.'), +Subject string(255) +) +OPTIONS(friendly_name = 'Event'); diff --git a/SqlDBM/src/Tables/CRM.Lead.sql b/SqlDBM/src/Tables/CRM.Lead.sql new file mode 100644 index 0000000..468c227 --- /dev/null +++ b/SqlDBM/src/Tables/CRM.Lead.sql @@ -0,0 +1,18 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.Lead +CREATE TABLE CRM.Lead +( +LeadId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each lead, serving as the primary key.'), +FirstName string(40) OPTIONS(description = 'The first name of the lead, representing an individual prospect.'), +LastName string(80) NOT NULL OPTIONS(description = 'The last name of the lead, which is required for identifying the prospect.'), +Company string(80) NOT NULL OPTIONS(description = 'The name of the company associated with the lead, particularly relevant for B2B scenarios.'), +Email string(80) OPTIONS(description = 'The email address of the lead for communication purposes.'), +Phone string(40) OPTIONS(description = 'The primary phone number of the lead for contact.'), +Status string(20) OPTIONS(description = 'The current status of the lead (e.g., New, Contacted, Qualified).'), +LeadSource string(40) OPTIONS(description = 'Specifies how the lead was generated (e.g., Website, Referral, Campaign).'), +CreatedDate date OPTIONS(description = 'The date when the lead record was created.') +) +OPTIONS(description = 'Tracks potential customers and their details, enabling the sales team to qualify and convert them into opportunities.', +friendly_name = 'Lead'); diff --git a/SqlDBM/src/Tables/CRM.Opportunity.sql b/SqlDBM/src/Tables/CRM.Opportunity.sql new file mode 100644 index 0000000..5108300 --- /dev/null +++ b/SqlDBM/src/Tables/CRM.Opportunity.sql @@ -0,0 +1,17 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.Opportunity +CREATE TABLE CRM.Opportunity +( +OpportunityId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each opportunity, serving as the primary key.'), +Name string(120) NOT NULL OPTIONS(description = 'The name of the opportunity, such as Q1 Enterprise Sale.'), +AccountId string REFERENCES CRM.Account(AccountId) NOT ENFORCED OPTIONS(description = 'References the account associated with the opportunity, linking the deal to a customer.'), +CloseDate date OPTIONS(description = 'The expected or actual date when the opportunity is closed.'), +Stage string(40) OPTIONS(description = 'Indicates the current stage in the sales pipeline (e.g., Prospecting, Negotiation, Closed Won).'), +Amount numeric(18, 2) OPTIONS(description = 'Specifies the potential revenue value of the opportunity.'), +Probability numeric(5, 2) OPTIONS(description = 'Represents the likelihood of successfully closing the opportunity, expressed as a percentage.'), +CreatedDate date OPTIONS(description = 'The date when the opportunity record was created.') +) +OPTIONS(description = 'Tracks potential revenue-generating deals, providing visibility into the sales pipeline and supporting revenue forecasting.', +friendly_name = 'Opportunity'); diff --git a/SqlDBM/src/Tables/CRM.OpportunityLineItem.sql b/SqlDBM/src/Tables/CRM.OpportunityLineItem.sql new file mode 100644 index 0000000..3b8da3b --- /dev/null +++ b/SqlDBM/src/Tables/CRM.OpportunityLineItem.sql @@ -0,0 +1,17 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.OpportunityLineItem +CREATE TABLE CRM.OpportunityLineItem +( +LineItemId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each line item in an opportunity, serving as the primary key.'), +OpportunityId string OPTIONS(description = 'References the opportunity associated with the line item.'), +ProductId string OPTIONS(description = 'References the product associated with the line item.'), +Quantity numeric(10, 2) OPTIONS(description = 'Specifies the quantity of the product included in the line item.'), +UnitPrice numeric(18, 2) OPTIONS(description = 'Specifies the price per unit of the product.'), +CreatedDate date OPTIONS(description = 'The date when the line item record was created.'), + CONSTRAINT OpportunityId FOREIGN KEY (OpportunityId) REFERENCES CRM.Opportunity (OpportunityId) NOT ENFORCED, + CONSTRAINT ProductId FOREIGN KEY (ProductId) REFERENCES CRM.Product (ProductId) NOT ENFORCED +) +OPTIONS(description = 'Stores product-level details for opportunities, including quantity, pricing, and related products.', +friendly_name = 'OpportunityLineItem'); diff --git a/SqlDBM/src/Tables/CRM.Pricebook.sql b/SqlDBM/src/Tables/CRM.Pricebook.sql new file mode 100644 index 0000000..52209a2 --- /dev/null +++ b/SqlDBM/src/Tables/CRM.Pricebook.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.Pricebook +CREATE TABLE CRM.Pricebook +( +PricebookId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each pricebook, serving as the primary key.'), +Name string(80) NOT NULL OPTIONS(description = 'The name of the pricebook (e.g., Standard Pricebook, Promotional Pricebook).'), +IsActive bool OPTIONS(description = 'Indicates whether the pricebook is active and available for use in CRM processes.'), +CreatedDate date OPTIONS(description = 'The date when the pricebook record was created.') +) +OPTIONS(description = 'Stores pricing catalogs, allowing organizations to maintain different product pricing structures for various customer segments or sales contexts.', +friendly_name = 'Pricebook'); diff --git a/SqlDBM/src/Tables/CRM.PricebookEntry.sql b/SqlDBM/src/Tables/CRM.PricebookEntry.sql new file mode 100644 index 0000000..b5a0308 --- /dev/null +++ b/SqlDBM/src/Tables/CRM.PricebookEntry.sql @@ -0,0 +1,17 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.PricebookEntry +CREATE TABLE CRM.PricebookEntry +( +EntryId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each pricebook entry, serving as the primary key.'), +PricebookId string OPTIONS(description = 'References the pricebook in which this product-price association is defined.'), +ProductId string OPTIONS(description = 'References the product associated with this pricebook entry.'), +UnitPrice numeric(18, 2) OPTIONS(description = 'Specifies the price of one unit of the product in the context of this pricebook.'), +IsActive bool OPTIONS(description = 'Indicates whether the pricebook entry is active and available for use in transactions.'), +CreatedDate date OPTIONS(description = 'The date when the pricebook entry was created in the CRM.'), + CONSTRAINT PricebookId FOREIGN KEY (PricebookId) REFERENCES CRM.Pricebook (PricebookId) NOT ENFORCED, + CONSTRAINT ProductId FOREIGN KEY (ProductId) REFERENCES CRM.Product (ProductId) NOT ENFORCED +) +OPTIONS(description = 'Connects products to specific pricebooks, defining pricing for various sales and marketing contexts.', +friendly_name = 'PricebookEntry'); diff --git a/SqlDBM/src/Tables/CRM.Product.sql b/SqlDBM/src/Tables/CRM.Product.sql new file mode 100644 index 0000000..566f99a --- /dev/null +++ b/SqlDBM/src/Tables/CRM.Product.sql @@ -0,0 +1,15 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.Product +CREATE TABLE CRM.Product +( +ProductId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each product, serving as the primary key.'), +Name string(80) NOT NULL OPTIONS(description = 'The name of the product (e.g., Premium Subscription or Wireless Headphones).'), +ProductCode string(40) OPTIONS(description = 'A unique code used to identify the product in inventory or sales records.'), +Description string OPTIONS(description = 'Optional details about the product, such as features, specifications, or benefits.'), +IsActive bool OPTIONS(description = 'Indicates whether the product is currently available for sales or use in CRM processes.'), +CreatedDate date OPTIONS(description = 'The date when the product record was added to the CRM.') +) +OPTIONS(description = 'Stores information about products or services offered by the organization, forming the foundation for pricing and sales management.', +friendly_name = 'Product'); diff --git a/SqlDBM/src/Tables/CRM.Profile.sql b/SqlDBM/src/Tables/CRM.Profile.sql new file mode 100644 index 0000000..acc50da --- /dev/null +++ b/SqlDBM/src/Tables/CRM.Profile.sql @@ -0,0 +1,12 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.Profile +CREATE TABLE CRM.Profile +( +ProfileId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each profile, used as the primary key.'), +Name string(80) NOT NULL OPTIONS(description = 'The name of the profile (e.g., Administrator, Sales Representative).'), +Description string OPTIONS(description = 'Optional description providing additional details about the profile and its purpose.') +) +OPTIONS(description = 'Manages security and permissions, ensuring users have appropriate access to CRM data and functionalities.', +friendly_name = 'Profile'); diff --git a/SqlDBM/src/Tables/CRM.Quote.sql b/SqlDBM/src/Tables/CRM.Quote.sql new file mode 100644 index 0000000..a3827b1 --- /dev/null +++ b/SqlDBM/src/Tables/CRM.Quote.sql @@ -0,0 +1,14 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.Quote +CREATE TABLE CRM.Quote +( +QuoteId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each quote, serving as the primary key.'), +OpportunityId string REFERENCES CRM.Opportunity(OpportunityId) NOT ENFORCED OPTIONS(description = 'References the opportunity associated with the quote.'), +Status string(20) OPTIONS(description = 'Tracks the current status of the quote (e.g., Draft, Approved, Rejected).'), +TotalPrice numeric(18, 2) OPTIONS(description = 'The total monetary value of the quote.'), +CreatedDate date OPTIONS(description = 'The date when the quote record was created.') +) +OPTIONS(description = 'Manages customer-facing pricing proposals, linking them to specific opportunities.', +friendly_name = 'Quote'); diff --git a/SqlDBM/src/Tables/CRM.Role.sql b/SqlDBM/src/Tables/CRM.Role.sql new file mode 100644 index 0000000..3bdaad0 --- /dev/null +++ b/SqlDBM/src/Tables/CRM.Role.sql @@ -0,0 +1,12 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.Role +CREATE TABLE CRM.Role +( +RoleId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each role, used as the primary key.'), +Name string(80) NOT NULL OPTIONS(description = 'Specifies the name of the role, such as Sales Manager or Support Agent.'), +CreatedDate date OPTIONS(description = 'Records when the role was created in the CRM system.') +) +OPTIONS(description = 'Defines user roles in the CRM system, enabling role-based access control and hierarchical organization.', +friendly_name = 'Role'); diff --git a/SqlDBM/src/Tables/CRM.Task.sql b/SqlDBM/src/Tables/CRM.Task.sql new file mode 100644 index 0000000..50e91f0 --- /dev/null +++ b/SqlDBM/src/Tables/CRM.Task.sql @@ -0,0 +1,10 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.Task +CREATE TABLE CRM.Task +( +TaskId string NOT NULL OPTIONS(description = 'Unique identifier for each task. Used as the primary key.'), +Subject string(255) +) +OPTIONS(friendly_name = 'Task'); diff --git a/SqlDBM/src/Tables/CRM.Territory.sql b/SqlDBM/src/Tables/CRM.Territory.sql new file mode 100644 index 0000000..7a3881a --- /dev/null +++ b/SqlDBM/src/Tables/CRM.Territory.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.Territory +CREATE TABLE CRM.Territory +( +TerritoryId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each territory. Serves as the primary key for territory records.'), +Name string(80) NOT NULL OPTIONS(description = 'The name of the territory (e.g., West Region, Enterprise Accounts). Used to identify and categorize territories.'), +Description string OPTIONS(description = 'Optional text providing additional details or purpose of the territory.'), +CreatedDate date OPTIONS(description = 'The date when the territory record was created in the CRM system.') +) +OPTIONS(description = 'Defines geographical or organizational regions for managing sales or service operations, aiding in resource allocation and performance tracking.', +friendly_name = 'Territory'); diff --git a/SqlDBM/src/Tables/CRM.User.sql b/SqlDBM/src/Tables/CRM.User.sql new file mode 100644 index 0000000..935916b --- /dev/null +++ b/SqlDBM/src/Tables/CRM.User.sql @@ -0,0 +1,15 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** CRM.User +CREATE TABLE CRM.User +( +UserId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each user in the CRM. This ID is used as the primary key for linking user records throughout the system.'), +Username string(80) NOT NULL OPTIONS(description = 'Specifies the unique username for the user, used for login and identification.'), +Email string(80) OPTIONS(description = 'Stores the email address of the user. This is used for system notifications and communication.'), +IsActive bool OPTIONS(description = 'Indicates whether the users account is active. Active users can log in and access the CRM, while inactive users cannot.'), +ProfileId string OPTIONS(description = 'References the Profile table to define permissions and access for this user.'), +CreatedDate date OPTIONS(description = 'The date and time when this user record was created in the system.') +) +OPTIONS(description = 'Contains information about CRM system users, including their login credentials, roles, and activity statuses.', +friendly_name = 'User'); diff --git a/SqlDBM/src/Tables/ERP.BKPF.sql b/SqlDBM/src/Tables/ERP.BKPF.sql new file mode 100644 index 0000000..8c6a62a --- /dev/null +++ b/SqlDBM/src/Tables/ERP.BKPF.sql @@ -0,0 +1,14 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.BKPF +CREATE TABLE ERP.BKPF +( +BELNR string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for the financial document. Assigned automatically by the system within a company code and fiscal year.'), +GJAHR string OPTIONS(description = 'Fiscal year to which the document belongs. Helps in organizing documents chronologically and aids in reporting periods.'), +BUKRS string OPTIONS(description = 'The company code for which the document is created. Identifies the legal entity responsible for the financial transaction.'), +BLART string OPTIONS(description = 'Used to determine the document category, control posting rules, and ensure accurate reporting.'), +BLDAT date OPTIONS(description = 'The date entered by the user as the document?s creation date (e.g., invoice date).') +) +OPTIONS(description = 'Table contains the header information for accounting documents, such as document number, fiscal year, and company code.', +friendly_name = 'Accounting Document Header'); diff --git a/SqlDBM/src/Tables/ERP.BSEG.sql b/SqlDBM/src/Tables/ERP.BSEG.sql new file mode 100644 index 0000000..8ccf6c8 --- /dev/null +++ b/SqlDBM/src/Tables/ERP.BSEG.sql @@ -0,0 +1,15 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.BSEG +CREATE TABLE ERP.BSEG +( +BELNR string NOT NULL OPTIONS(description = 'Unique identifier for the financial document within a company code and fiscal year.'), +GJAHR string NOT NULL OPTIONS(description = 'Indicates the fiscal year in which the document was created.'), +BUZEI string NOT NULL OPTIONS(description = 'Sequential number for each line item in the document.'), +HKONT string OPTIONS(description = 'Specifies the G/L account impacted by the transaction.'), +DMBTR numeric(15, 2) OPTIONS(description = 'The transaction amount converted to the local currency of the company code.'), + PRIMARY KEY (BELNR, GJAHR, BUZEI) NOT ENFORCED +) +OPTIONS(description = 'Table stores line items for accounting documents, capturing details such as general ledger accounts and amounts.', +friendly_name = 'Accounting Document Segment'); diff --git a/SqlDBM/src/Tables/ERP.COEP.sql b/SqlDBM/src/Tables/ERP.COEP.sql new file mode 100644 index 0000000..40e2a4d --- /dev/null +++ b/SqlDBM/src/Tables/ERP.COEP.sql @@ -0,0 +1,15 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.COEP +CREATE TABLE ERP.COEP +( +OBJNR string OPTIONS(description = 'A unique identifier for the controlling object (e.g., cost center, internal order, WBS element).'), +GJAHR string OPTIONS(description = 'Indicates the fiscal year in which the document was created.'), +PAROB string OPTIONS(description = 'Controlling object (e.g., cost center, internal order) linked as the partner in a transaction.'), +BELNR string OPTIONS(description = 'Unique identifier for the CO document. Links line items to the document header in the COBK table.'), +WRTTP string OPTIONS(description = 'Defines the type of value (e.g., actual, planned, commitment).'), +WTG001 numeric(15, 2) OPTIONS(description = 'Total Value in Transaction Currency for Period 1') +) +OPTIONS(description = 'Table stores individual line items for cost accounting documents, linking to the corresponding cost objects (e.g., cost centers, internal orders).', +friendly_name = 'Controlling Document Line Items'); diff --git a/SqlDBM/src/Tables/ERP.CSKS.sql b/SqlDBM/src/Tables/ERP.CSKS.sql new file mode 100644 index 0000000..79fbcfc --- /dev/null +++ b/SqlDBM/src/Tables/ERP.CSKS.sql @@ -0,0 +1,12 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.CSKS +CREATE TABLE ERP.CSKS +( +KOSTL string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for the cost center within the controlling area.'), +BUKRS string OPTIONS(description = 'Represents the company code associated with the cost center. Linked to table T001.'), +KOSAR string OPTIONS(description = 'Categorizes the cost center (e.g., administrative, production). Linked to table TKA05.') +) +OPTIONS(description = 'Table stores master data for cost centers, which are used in cost tracking and controlling.', +friendly_name = 'Cost Center Master Data'); diff --git a/SqlDBM/src/Tables/ERP.EKKO.sql b/SqlDBM/src/Tables/ERP.EKKO.sql new file mode 100644 index 0000000..3a7b28f --- /dev/null +++ b/SqlDBM/src/Tables/ERP.EKKO.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.EKKO +CREATE TABLE ERP.EKKO +( +EBELN string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for the purchasing document.'), +BUKRS string OPTIONS(description = 'Represents the company code associated with the purchasing document.'), +LIFNR string OPTIONS(description = 'Account number of the vendor associated with the purchasing document.'), +ERDAT date OPTIONS(description = 'Date on Which the Record Was Created') +) +OPTIONS(description = 'Table stores the header information for purchase orders, including the vendor, company code, and document creation date.', +friendly_name = 'Purchasing Document Header'); diff --git a/SqlDBM/src/Tables/ERP.EKPO.sql b/SqlDBM/src/Tables/ERP.EKPO.sql new file mode 100644 index 0000000..cfac36b --- /dev/null +++ b/SqlDBM/src/Tables/ERP.EKPO.sql @@ -0,0 +1,14 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.EKPO +CREATE TABLE ERP.EKPO +( +EBELN string NOT NULL OPTIONS(description = 'Unique identifier for the purchasing document; links to the EKKO table.'), +EBELP string NOT NULL OPTIONS(description = 'Sequential number of the item within the purchasing document.'), +MATNR string OPTIONS(description = 'Identifier for the material; links to the MARA table.'), +MENGE numeric(13, 3) OPTIONS(description = 'Quantity Ordered'), + PRIMARY KEY (EBELN, EBELP) NOT ENFORCED +) +OPTIONS(description = 'Stores detailed information for each item within purchasing documents such as purchase orders, contracts, and scheduling agreements.', +friendly_name = 'Purchasing Document Item'); diff --git a/SqlDBM/src/Tables/ERP.GLPCA.sql b/SqlDBM/src/Tables/ERP.GLPCA.sql new file mode 100644 index 0000000..d178bf7 --- /dev/null +++ b/SqlDBM/src/Tables/ERP.GLPCA.sql @@ -0,0 +1,15 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.GLPCA +CREATE TABLE ERP.GLPCA +( +RCLNT string OPTIONS(description = 'Identifies the client for which the data is stored.'), +BELNR string OPTIONS(description = 'The financial accounting document number.'), +GJAHR string OPTIONS(description = 'The fiscal year for the transaction.'), +BUZEI string OPTIONS(description = 'Number of Line Item Within Accounting Document'), +HKONT string OPTIONS(description = 'The general ledger account involved in the transaction.'), +DMBTR numeric(15, 2) OPTIONS(description = 'Amount in Local Currency') +) +OPTIONS(description = 'Stores line item data for profit center postings.', +friendly_name = 'Profit Center Accounting'); diff --git a/SqlDBM/src/Tables/ERP.KNA1.sql b/SqlDBM/src/Tables/ERP.KNA1.sql new file mode 100644 index 0000000..b12cd91 --- /dev/null +++ b/SqlDBM/src/Tables/ERP.KNA1.sql @@ -0,0 +1,16 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.KNA1 +CREATE TABLE ERP.KNA1 +( +KUNNR string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for the customer; primary key of the table.'), +LAND1 string OPTIONS(description = 'Specifies the country of the customer; linked to table T005 for country codes.'), +NAME1 string(50) OPTIONS(description = 'Primary name of the customer.'), +ORT01 string(35) OPTIONS(description = 'City where the customer is located.'), +PSTLZ string OPTIONS(description = 'Postal code for the customers address.'), +REGIO string OPTIONS(description = 'Region or state of the customers location; linked to table T005S for region codes.'), +TELF1 string OPTIONS(description = 'Primary contact telephone number for the customer.') +) +OPTIONS(description = 'Table contains general data for customers, such as address details and contact information.', +friendly_name = 'Customer Master Records'); diff --git a/SqlDBM/src/Tables/ERP.LFA1.sql b/SqlDBM/src/Tables/ERP.LFA1.sql new file mode 100644 index 0000000..dcb849e --- /dev/null +++ b/SqlDBM/src/Tables/ERP.LFA1.sql @@ -0,0 +1,15 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.LFA1 +CREATE TABLE ERP.LFA1 +( +LIFNR string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for the vendor; primary key of the table.'), +NAME1 string(50) OPTIONS(description = 'Primary name of the vendor.'), +LAND1 string OPTIONS(description = 'Specifies the country of the vendor; linked to table T005 for country codes.'), +ORT01 string(35) OPTIONS(description = 'City where the vendor is located.'), +PSTLZ string OPTIONS(description = 'Postal code for the vendors address.'), +TELF1 string OPTIONS(description = 'Primary contact telephone number for the vendor.') +) +OPTIONS(description = 'Table stores general information about vendors (suppliers), including their names, addresses, and contact details.', +friendly_name = 'Vendor Master Data'); diff --git a/SqlDBM/src/Tables/ERP.MAKT.sql b/SqlDBM/src/Tables/ERP.MAKT.sql new file mode 100644 index 0000000..0aea4d3 --- /dev/null +++ b/SqlDBM/src/Tables/ERP.MAKT.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.MAKT +CREATE TABLE ERP.MAKT +( +MATNR string NOT NULL OPTIONS(description = 'Unique identifier for the material; links to the MARA table for general material data.'), +SPRAS string NOT NULL OPTIONS(description = 'Specifies the language of the material description; linked to table T002 for language codes.'), +MAKTX string(40) OPTIONS(description = 'Provides the materials short description in the specified language.'), + PRIMARY KEY (MATNR, SPRAS) NOT ENFORCED +) +OPTIONS(description = 'Table stores material descriptions in various languages.', +friendly_name = 'Material Descriptions'); diff --git a/SqlDBM/src/Tables/ERP.MARA.sql b/SqlDBM/src/Tables/ERP.MARA.sql new file mode 100644 index 0000000..9ba621c --- /dev/null +++ b/SqlDBM/src/Tables/ERP.MARA.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.MARA +CREATE TABLE ERP.MARA +( +MATNR string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Serves as a central repository for material master records, encompassing essential information applicable across various organizational levels.'), +MTART string OPTIONS(description = 'Classification of the material (e.g., raw material, finished product); linked to table T134.'), +MATKL string OPTIONS(description = 'Grouping of materials with similar attributes; linked to table T023.'), +MEINS string OPTIONS(description = 'Unit of Measure') +) +OPTIONS(description = 'Table stores general data about materials, such as material types, material groups, and units of measure. It is part of the Material Management (MM) module.', +friendly_name = 'MARA'); diff --git a/SqlDBM/src/Tables/ERP.MARC.sql b/SqlDBM/src/Tables/ERP.MARC.sql new file mode 100644 index 0000000..1444280 --- /dev/null +++ b/SqlDBM/src/Tables/ERP.MARC.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.MARC +CREATE TABLE ERP.MARC +( +MATNR string NOT NULL OPTIONS(description = 'Unique identifier for the material; links to the MARA table for general material data.'), +WERKS string NOT NULL OPTIONS(description = 'Code representing the plant where the material is managed; links to the T001W table.'), +DISMM string OPTIONS(description = 'Defines the MRP procedure for the material; links to the T438A table.'), + PRIMARY KEY (MATNR, WERKS) NOT ENFORCED +) +OPTIONS(description = 'Table stores material-specific data for each plant, such as plant-specific settings for inventory management, procurement, and MRP.', +friendly_name = 'Material Plant Data'); diff --git a/SqlDBM/src/Tables/ERP.PA0001.sql b/SqlDBM/src/Tables/ERP.PA0001.sql new file mode 100644 index 0000000..579a98c --- /dev/null +++ b/SqlDBM/src/Tables/ERP.PA0001.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.PA0001 +CREATE TABLE ERP.PA0001 +( +PERNR string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each employee. Serves as the primary key for HR master data records.'), +WERKS string OPTIONS(description = 'Specifies the personnel area where the employee works.'), +BUKRS string OPTIONS(description = 'Represents the company code to which the employee is assigned.'), +ABKRS string OPTIONS(description = 'Identifies the payroll area to which the employee belongs.') +) +OPTIONS(description = 'Table contains HR master data, specifically related to employee organizational assignments (e.g., company code, personnel area).', +friendly_name = 'HR Master Data'); diff --git a/SqlDBM/src/Tables/ERP.T001.sql b/SqlDBM/src/Tables/ERP.T001.sql new file mode 100644 index 0000000..ce38805 --- /dev/null +++ b/SqlDBM/src/Tables/ERP.T001.sql @@ -0,0 +1,11 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.T001 +CREATE TABLE ERP.T001 +( +BUKRS string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Company code associated with the valuation area.'), +BUTXT string(30) OPTIONS(description = 'Stores company code data') +) +OPTIONS(description = 'Table stores information about company codes in SAP, which represent separate legal entities within the system. Company codes are the highest organizational unit in Financial Accounting (FI).', +friendly_name = 'T001'); diff --git a/SqlDBM/src/Tables/ERP.T001K.sql b/SqlDBM/src/Tables/ERP.T001K.sql new file mode 100644 index 0000000..c19756d --- /dev/null +++ b/SqlDBM/src/Tables/ERP.T001K.sql @@ -0,0 +1,12 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.T001K +CREATE TABLE ERP.T001K +( +BUKRS string NOT NULL OPTIONS(description = 'Company Code'), +BWKEY string NOT NULL OPTIONS(description = 'Controlling Area'), + PRIMARY KEY (BUKRS, BWKEY) NOT ENFORCED +) +OPTIONS(description = 'Table is used to assign company codes to controlling areas. A controlling area is an organizational unit in SAP used for managing costs and internal accounting.', +friendly_name = 'Controlling Area Assignment'); diff --git a/SqlDBM/src/Tables/ERP.T001W.sql b/SqlDBM/src/Tables/ERP.T001W.sql new file mode 100644 index 0000000..4b3b617 --- /dev/null +++ b/SqlDBM/src/Tables/ERP.T001W.sql @@ -0,0 +1,12 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.T001W +CREATE TABLE ERP.T001W +( +WERKS string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Plant Code'), +NAME1 string(40) OPTIONS(description = 'Plant Name'), +BUKRS string OPTIONS(description = 'Company Code') +) +OPTIONS(description = 'Table contains plant-related information within a company code. A plant is a location where materials are produced or goods are stored.', +friendly_name = 'Plant Data'); diff --git a/SqlDBM/src/Tables/ERP.VBAK.sql b/SqlDBM/src/Tables/ERP.VBAK.sql new file mode 100644 index 0000000..33e3f70 --- /dev/null +++ b/SqlDBM/src/Tables/ERP.VBAK.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.VBAK +CREATE TABLE ERP.VBAK +( +VBELN string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Sales Document Number'), +VKORG string OPTIONS(description = 'Sales Organization'), +KUNNR string OPTIONS(description = 'Customer Number'), +ERDAT date OPTIONS(description = 'Document Creation Date') +) +OPTIONS(description = 'Table stores the header data for sales orders, including the sales organization, customer, and document creation date.', +friendly_name = 'Sales Document Header'); diff --git a/SqlDBM/src/Tables/ERP.VBAP.sql b/SqlDBM/src/Tables/ERP.VBAP.sql new file mode 100644 index 0000000..4fd2cbd --- /dev/null +++ b/SqlDBM/src/Tables/ERP.VBAP.sql @@ -0,0 +1,14 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.VBAP +CREATE TABLE ERP.VBAP +( +VBELN string NOT NULL OPTIONS(description = 'Sales Document Number'), +POSNR string NOT NULL OPTIONS(description = 'Item Number'), +MATNR string OPTIONS(description = 'Material Number'), +KWMENG numeric(13, 3), + PRIMARY KEY (VBELN, POSNR) NOT ENFORCED +) +OPTIONS(description = 'Table stores item-level data for sales orders, including materials, quantities, and pricing information.', +friendly_name = 'Sales Document Items'); diff --git a/SqlDBM/src/Tables/ERP.VBRK.sql b/SqlDBM/src/Tables/ERP.VBRK.sql new file mode 100644 index 0000000..e2a2273 --- /dev/null +++ b/SqlDBM/src/Tables/ERP.VBRK.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.VBRK +CREATE TABLE ERP.VBRK +( +VBELN string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Billing Document Number'), +FKDAT date OPTIONS(description = 'Billing Date'), +KUNNR string OPTIONS(description = 'Customer Number'), +NETWR numeric(13, 2) OPTIONS(description = 'Net Value of the Billing Document') +) +OPTIONS(description = 'Table stores header information for billing documents, including the customer, billing date, and billing amount.', +friendly_name = 'Billing Document Header'); diff --git a/SqlDBM/src/Tables/ERP.VBRP.sql b/SqlDBM/src/Tables/ERP.VBRP.sql new file mode 100644 index 0000000..2d6eb7a --- /dev/null +++ b/SqlDBM/src/Tables/ERP.VBRP.sql @@ -0,0 +1,14 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** ERP.VBRP +CREATE TABLE ERP.VBRP +( +VBELN string NOT NULL OPTIONS(description = 'Billing Document Number.'), +POSNR string NOT NULL OPTIONS(description = 'Billing Document Item Number.'), +MATNR string OPTIONS(description = 'Material Number.'), +FKIMG numeric(13, 3) OPTIONS(description = 'Billing Quantity.'), + PRIMARY KEY (VBELN, POSNR) NOT ENFORCED +) +OPTIONS(description = 'Table stores item-level details for billing documents in the Sales and Distribution (SD) module of SAP.', +friendly_name = 'Sales Document: Item Data'); diff --git a/SqlDBM/src/Tables/POS.Category.sql b/SqlDBM/src/Tables/POS.Category.sql new file mode 100644 index 0000000..bf68a5b --- /dev/null +++ b/SqlDBM/src/Tables/POS.Category.sql @@ -0,0 +1,10 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.Category +CREATE TABLE POS.Category +( +CategoryId numeric NOT NULL OPTIONS(description = 'A unique identifier for each category.'), +Name string NOT NULL +) +OPTIONS(friendly_name = 'Category'); diff --git a/SqlDBM/src/Tables/POS.Customer.sql b/SqlDBM/src/Tables/POS.Customer.sql new file mode 100644 index 0000000..8e30a64 --- /dev/null +++ b/SqlDBM/src/Tables/POS.Customer.sql @@ -0,0 +1,15 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.Customer +CREATE TABLE POS.Customer +( +CustomerId numeric NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'A unique identifier for each customer.'), +FirstName string OPTIONS(description = 'The first name of the customer'), +LastName string OPTIONS(description = 'The last name of the customer.'), +Email string OPTIONS(description = 'The email address of the customer.'), +Phone string OPTIONS(description = 'The phone number of the customer.'), +CreatedDate date OPTIONS(description = 'The date when the customer record was created.') +) +OPTIONS(description = 'Table stores details about customers who make purchases or reservations.', +friendly_name = 'Customer'); diff --git a/SqlDBM/src/Tables/POS.Discount.sql b/SqlDBM/src/Tables/POS.Discount.sql new file mode 100644 index 0000000..dfec892 --- /dev/null +++ b/SqlDBM/src/Tables/POS.Discount.sql @@ -0,0 +1,11 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.Discount +CREATE TABLE POS.Discount +( +DiscountId numeric NOT NULL OPTIONS(description = 'Unique identifier for each discount.'), +Name string OPTIONS(description = 'The name of the discount.'), +DiscountType string +) +OPTIONS(friendly_name = 'Discount'); diff --git a/SqlDBM/src/Tables/POS.Employee.sql b/SqlDBM/src/Tables/POS.Employee.sql new file mode 100644 index 0000000..1d29e3b --- /dev/null +++ b/SqlDBM/src/Tables/POS.Employee.sql @@ -0,0 +1,12 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.Employee +CREATE TABLE POS.Employee +( +EmployeeId numeric NOT NULL OPTIONS(description = 'A unique identifier for each employee.'), +FirstName string OPTIONS(description = 'The first name of the employee.'), +LastName string OPTIONS(description = 'The last name of the employee.'), +Position string +) +OPTIONS(friendly_name = 'Employee'); diff --git a/SqlDBM/src/Tables/POS.Feedback.sql b/SqlDBM/src/Tables/POS.Feedback.sql new file mode 100644 index 0000000..635c558 --- /dev/null +++ b/SqlDBM/src/Tables/POS.Feedback.sql @@ -0,0 +1,15 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.Feedback +CREATE TABLE POS.Feedback +( +FeedbackId numeric NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'A unique identifier for each feedback entry.'), +CustomerId numeric REFERENCES POS.Customer(CustomerId) NOT ENFORCED OPTIONS(description = 'The customer who provided the feedback, linked to the Customer table.'), +OrderId numeric OPTIONS(description = 'The order that the feedback relates to, linked to the Order table.'), +Rating numeric OPTIONS(description = 'A numeric rating provided by the customer.'), +Comments string OPTIONS(description = 'The feedback comments from the customer.'), +SubmittedDate date OPTIONS(description = 'The date when the feedback was submitted.') +) +OPTIONS(description = 'Table stores customer feedback related to orders.', +friendly_name = 'Feedback'); diff --git a/SqlDBM/src/Tables/POS.Inventory.sql b/SqlDBM/src/Tables/POS.Inventory.sql new file mode 100644 index 0000000..9a7a25e --- /dev/null +++ b/SqlDBM/src/Tables/POS.Inventory.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.Inventory +CREATE TABLE POS.Inventory +( +InventoryId numeric NOT NULL OPTIONS(description = 'A unique identifier for each inventory record.'), +LocationId numeric OPTIONS(description = 'The location of the inventory, linked to the Location table.'), +ProductName string OPTIONS(description = 'The name of the product.'), +QuantityOnHand numeric OPTIONS(description = 'The number of items available in stock.'), +Unit string +) +OPTIONS(friendly_name = 'Inventory'); diff --git a/SqlDBM/src/Tables/POS.Location.sql b/SqlDBM/src/Tables/POS.Location.sql new file mode 100644 index 0000000..0e13699 --- /dev/null +++ b/SqlDBM/src/Tables/POS.Location.sql @@ -0,0 +1,16 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.Location +CREATE TABLE POS.Location +( +LocationId numeric NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'A unique identifier for each location.'), +Name string NOT NULL OPTIONS(description = 'The name of the location.'), +Address string OPTIONS(description = 'The address of the location.'), +City string OPTIONS(description = 'The city where the location is based.'), +State string OPTIONS(description = 'The state of the location.'), +PostalCode string OPTIONS(description = 'The postal code of the location.'), +Phone string OPTIONS(description = 'The phone number of the location') +) +OPTIONS(description = 'Table stores information about different business locations, such as restaurants, retail stores, or branches of a business.', +friendly_name = 'Location'); diff --git a/SqlDBM/src/Tables/POS.Menu.sql b/SqlDBM/src/Tables/POS.Menu.sql new file mode 100644 index 0000000..9b5031b --- /dev/null +++ b/SqlDBM/src/Tables/POS.Menu.sql @@ -0,0 +1,11 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.Menu +CREATE TABLE POS.Menu +( +MenuId numeric NOT NULL OPTIONS(description = 'A unique identifier for each menu.'), +LocationId numeric OPTIONS(description = 'The location that the menu is associated with, linked to the Location table.'), +Name string NOT NULL +) +OPTIONS(friendly_name = 'Menu'); diff --git a/SqlDBM/src/Tables/POS.MenuItem.sql b/SqlDBM/src/Tables/POS.MenuItem.sql new file mode 100644 index 0000000..73ac773 --- /dev/null +++ b/SqlDBM/src/Tables/POS.MenuItem.sql @@ -0,0 +1,16 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.MenuItem +CREATE TABLE POS.MenuItem +( +MenuItemId numeric NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'A unique identifier for each menu item.'), +MenuId numeric OPTIONS(description = 'The menu that the item belongs to, linked to the Menu table.'), +Name string NOT NULL OPTIONS(description = 'The name of the menu item.'), +Description string OPTIONS(description = 'A description of the menu item.'), +Price numeric(10, 2) NOT NULL OPTIONS(description = 'The price of the menu item.'), +IsAvailable string OPTIONS(description = 'A flag indicating if the item is currently available (Y or N).'), +CreatedDate date OPTIONS(description = 'The date when the menu item was added.') +) +OPTIONS(description = 'Table stores individual items available in a menu.', +friendly_name = 'MenuItem'); diff --git a/SqlDBM/src/Tables/POS.MenuItemCategory.sql b/SqlDBM/src/Tables/POS.MenuItemCategory.sql new file mode 100644 index 0000000..6af3f97 --- /dev/null +++ b/SqlDBM/src/Tables/POS.MenuItemCategory.sql @@ -0,0 +1,12 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.MenuItemCategory +CREATE TABLE POS.MenuItemCategory +( +MenuItemId numeric NOT NULL REFERENCES POS.MenuItem(MenuItemId) NOT ENFORCED OPTIONS(description = 'The ID of the menu item, linked to the MenuItem table.'), +CategoryId numeric NOT NULL OPTIONS(description = 'The ID of the category to which the menu item belongs, linked to the Category table.'), + PRIMARY KEY (MenuItemId, CategoryId) NOT ENFORCED +) +OPTIONS(description = 'Table associates menu items with categories.', +friendly_name = 'MenuItemCategory'); diff --git a/SqlDBM/src/Tables/POS.Order.sql b/SqlDBM/src/Tables/POS.Order.sql new file mode 100644 index 0000000..f87098f --- /dev/null +++ b/SqlDBM/src/Tables/POS.Order.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.Order +CREATE TABLE POS.Order +( +OrderId numeric NOT NULL OPTIONS(description = 'A unique identifier for each order.'), +LocationId numeric OPTIONS(description = 'The location where the order was placed, linked to the Location table.'), +OrderDate date OPTIONS(description = 'The date when the order was placed.'), +TotalAmount numeric(15, 2) OPTIONS(description = 'The total value of the order.'), +Status string +) +OPTIONS(friendly_name = 'Order'); diff --git a/SqlDBM/src/Tables/POS.OrderDiscount.sql b/SqlDBM/src/Tables/POS.OrderDiscount.sql new file mode 100644 index 0000000..98a4f31 --- /dev/null +++ b/SqlDBM/src/Tables/POS.OrderDiscount.sql @@ -0,0 +1,12 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.OrderDiscount +CREATE TABLE POS.OrderDiscount +( +OrderDiscountId numeric NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'A unique identifier for the order discount.'), +OrderId numeric OPTIONS(description = 'The order to which the discount is applied, linked to the Order table.'), +DiscountId numeric OPTIONS(description = 'The discount applied to the order, linked to the Discount table') +) +OPTIONS(description = 'Table stores discounts applied to individual orders.', +friendly_name = 'OrderDiscount'); diff --git a/SqlDBM/src/Tables/POS.OrderItem.sql b/SqlDBM/src/Tables/POS.OrderItem.sql new file mode 100644 index 0000000..a7ed6a1 --- /dev/null +++ b/SqlDBM/src/Tables/POS.OrderItem.sql @@ -0,0 +1,14 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.OrderItem +CREATE TABLE POS.OrderItem +( +OrderItemId numeric NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'A unique identifier for each order item'), +OrderId numeric OPTIONS(description = 'The order to which the item belongs, linked to the Order table.'), +MenuItemId numeric REFERENCES POS.MenuItem(MenuItemId) NOT ENFORCED OPTIONS(description = 'The menu item ordered, linked to the MenuItem table.'), +Quantity numeric NOT NULL OPTIONS(description = 'The quantity of the menu item ordered.'), +UnitPrice numeric(10, 2) NOT NULL OPTIONS(description = 'The price per unit of the menu item.') +) +OPTIONS(description = 'Table stores the details of individual items within an order.', +friendly_name = 'OrderItem'); diff --git a/SqlDBM/src/Tables/POS.Payment.sql b/SqlDBM/src/Tables/POS.Payment.sql new file mode 100644 index 0000000..1389391 --- /dev/null +++ b/SqlDBM/src/Tables/POS.Payment.sql @@ -0,0 +1,11 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.Payment +CREATE TABLE POS.Payment +( +PaymentId numeric NOT NULL OPTIONS(description = 'A unique identifier for each payment.'), +OrderId numeric OPTIONS(description = 'The order for which the payment was made, linked to the Order table.'), +PaymentType string +) +OPTIONS(friendly_name = 'Payment'); diff --git a/SqlDBM/src/Tables/POS.PurchaseOrder.sql b/SqlDBM/src/Tables/POS.PurchaseOrder.sql new file mode 100644 index 0000000..0a6ab93 --- /dev/null +++ b/SqlDBM/src/Tables/POS.PurchaseOrder.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.PurchaseOrder +CREATE TABLE POS.PurchaseOrder +( +PurchaseOrderId numeric NOT NULL OPTIONS(description = 'A unique identifier for each purchase order.'), +SupplierId numeric OPTIONS(description = 'The supplier from whom the order was made, linked to the Supplier table.'), +OrderDate date OPTIONS(description = 'The date when the purchase order was created.'), +TotalAmount numeric(15, 2) OPTIONS(description = 'The total value of the purchase order.'), +Status string +) +OPTIONS(friendly_name = 'PurchaseOrder'); diff --git a/SqlDBM/src/Tables/POS.PurchaseOrderItem.sql b/SqlDBM/src/Tables/POS.PurchaseOrderItem.sql new file mode 100644 index 0000000..3790887 --- /dev/null +++ b/SqlDBM/src/Tables/POS.PurchaseOrderItem.sql @@ -0,0 +1,14 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.PurchaseOrderItem +CREATE TABLE POS.PurchaseOrderItem +( +PurchaseOrderItemId numeric NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'A unique identifier for each purchase order item.'), +PurchaseOrderId numeric OPTIONS(description = 'The purchase order to which the item belongs, linked to the PurchaseOrder table.'), +ProductName string OPTIONS(description = 'The name of the product purchased.'), +Quantity numeric OPTIONS(description = 'The quantity of the product ordered.'), +UnitPrice numeric(10, 2) OPTIONS(description = 'The price per unit of the product.') +) +OPTIONS(description = 'Table stores individual items included in a purchase order.', +friendly_name = 'PurchaseOrderItem'); diff --git a/SqlDBM/src/Tables/POS.Reservation.sql b/SqlDBM/src/Tables/POS.Reservation.sql new file mode 100644 index 0000000..318a19d --- /dev/null +++ b/SqlDBM/src/Tables/POS.Reservation.sql @@ -0,0 +1,14 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.Reservation +CREATE TABLE POS.Reservation +( +ReservationId numeric NOT NULL OPTIONS(description = 'A unique identifier for each reservation.'), +CustomerId numeric OPTIONS(description = 'The customer who made the reservation, linked to the Customer table.'), +LocationId numeric OPTIONS(description = 'The location where the reservation was made, linked to the Location table.'), +ReservationDate date OPTIONS(description = 'The date and time of the reservation.'), +NumberOfGuests numeric OPTIONS(description = 'The number of guests for the reservation.'), +Status string +) +OPTIONS(friendly_name = 'Reservation'); diff --git a/SqlDBM/src/Tables/POS.Shift.sql b/SqlDBM/src/Tables/POS.Shift.sql new file mode 100644 index 0000000..4ae07b9 --- /dev/null +++ b/SqlDBM/src/Tables/POS.Shift.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.Shift +CREATE TABLE POS.Shift +( +ShiftId numeric NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'A unique identifier for each shift record.'), +EmployeeId numeric OPTIONS(description = 'The employee working the shift, linked to the Employee table.'), +StartDate date OPTIONS(description = 'The starting time of the shift.'), +EndDate date OPTIONS(description = 'The ending time of the shift.') +) +OPTIONS(description = 'Table stores employee work shift details.', +friendly_name = 'Shift'); diff --git a/SqlDBM/src/Tables/POS.Supplier.sql b/SqlDBM/src/Tables/POS.Supplier.sql new file mode 100644 index 0000000..56ed42e --- /dev/null +++ b/SqlDBM/src/Tables/POS.Supplier.sql @@ -0,0 +1,14 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** POS.Supplier +CREATE TABLE POS.Supplier +( +SupplierId numeric NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'A unique identifier for each supplier'), +Name string OPTIONS(description = 'The name of the supplier.'), +ContactName string OPTIONS(description = 'The name of the suppliers primary contact.'), +Phone string OPTIONS(description = 'The phone number of the supplier.'), +Address string OPTIONS(description = 'The physical address of the supplier.') +) +OPTIONS(description = 'Table stores information about suppliers who provide products or services to the business. Each supplier is uniquely identified by the SupplierId.', +friendly_name = 'Supplier'); diff --git a/SqlDBM/src/Tables/SC.BillOfMaterials.sql b/SqlDBM/src/Tables/SC.BillOfMaterials.sql new file mode 100644 index 0000000..d8a42aa --- /dev/null +++ b/SqlDBM/src/Tables/SC.BillOfMaterials.sql @@ -0,0 +1,15 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.BillOfMaterials +CREATE TABLE SC.BillOfMaterials +( +BomId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each Bill of Materials (BOM).'), +MaterialId string OPTIONS(description = 'References the finished product associated with the BOM.'), +ComponentMaterialId string OPTIONS(description = 'References the material used as a component in the BOM.'), +Quantity numeric(15, 3) OPTIONS(description = 'The quantity of the component material required for the finished product.'), + CONSTRAINT MaterialId FOREIGN KEY (MaterialId) REFERENCES SC.Material (MaterialId) NOT ENFORCED, + CONSTRAINT ComponentMaterialId FOREIGN KEY (ComponentMaterialId) REFERENCES SC.Material (MaterialId) NOT ENFORCED +) +OPTIONS(description = 'Tracks relationships between finished products and their component materials, including quantities.', +friendly_name = 'BillOfMaterials'); diff --git a/SqlDBM/src/Tables/SC.Customer.sql b/SqlDBM/src/Tables/SC.Customer.sql new file mode 100644 index 0000000..a26c86c --- /dev/null +++ b/SqlDBM/src/Tables/SC.Customer.sql @@ -0,0 +1,14 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.Customer +CREATE TABLE SC.Customer +( +CustomerId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each customer.'), +CustomerName string(100) OPTIONS(description = 'The name of the customer organization or individual.'), +Country string OPTIONS(description = 'The country code where the customer is located.'), +ContactName string(100) OPTIONS(description = 'The primary contact person for the customer.'), +Phone string OPTIONS(description = 'The contact phone number for the customer.') +) +OPTIONS(description = 'Stores information about customers who place orders in the supply chain.', +friendly_name = 'Customer'); diff --git a/SqlDBM/src/Tables/SC.Delivery.sql b/SqlDBM/src/Tables/SC.Delivery.sql new file mode 100644 index 0000000..07788a4 --- /dev/null +++ b/SqlDBM/src/Tables/SC.Delivery.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.Delivery +CREATE TABLE SC.Delivery +( +DeliveryId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each delivery record.'), +SalesOrderId string REFERENCES SC.SalesOrder(SalesOrderId) NOT ENFORCED OPTIONS(description = 'References the sales order associated with the delivery.'), +DeliveryDate date OPTIONS(description = 'The date when the delivery occurred or is scheduled.'), +Status string(20) OPTIONS(description = 'The current status of the delivery (e.g., In Transit, Delivered).') +) +OPTIONS(description = 'Tracks deliveries associated with sales orders, including status and dates.', +friendly_name = 'Delivery'); diff --git a/SqlDBM/src/Tables/SC.DemandForecast.sql b/SqlDBM/src/Tables/SC.DemandForecast.sql new file mode 100644 index 0000000..15a717b --- /dev/null +++ b/SqlDBM/src/Tables/SC.DemandForecast.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.DemandForecast +CREATE TABLE SC.DemandForecast +( +ForecastId numeric NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each demand forecast record.'), +MaterialId string REFERENCES SC.Material(MaterialId) NOT ENFORCED OPTIONS(description = 'References the material for which demand is forecasted.'), +ForecastDate date OPTIONS(description = 'The date for which demand is forecasted.'), +ForecastedQuantity numeric(15, 3) OPTIONS(description = 'The predicted quantity of the material needed on the forecast date.') +) +OPTIONS(description = 'Tracks forecasted material quantities based on historical data and trends.', +friendly_name = 'DemandForecast'); diff --git a/SqlDBM/src/Tables/SC.DemandPlanning.sql b/SqlDBM/src/Tables/SC.DemandPlanning.sql new file mode 100644 index 0000000..99daf7b --- /dev/null +++ b/SqlDBM/src/Tables/SC.DemandPlanning.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.DemandPlanning +CREATE TABLE SC.DemandPlanning +( +PlanningId numeric NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each demand planning record.'), +MaterialId string REFERENCES SC.Material(MaterialId) NOT ENFORCED OPTIONS(description = 'References the material for which demand is planned.'), +PlanningDate date OPTIONS(description = 'The date associated with the demand planning.'), +PlannedQuantity numeric(15, 3) OPTIONS(description = 'The planned quantity of the material for the specified date.') +) +OPTIONS(description = 'Tracks planned material quantities for future production or sales.', +friendly_name = 'DemandPlanning'); diff --git a/SqlDBM/src/Tables/SC.Inventory.sql b/SqlDBM/src/Tables/SC.Inventory.sql new file mode 100644 index 0000000..3d3f416 --- /dev/null +++ b/SqlDBM/src/Tables/SC.Inventory.sql @@ -0,0 +1,12 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.Inventory +CREATE TABLE SC.Inventory +( +InventoryId numeric NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each inventory record.'), +QuantityOnHand numeric(15, 3) OPTIONS(description = 'The quantity of the material currently available at the plant.'), +LastUpdatedDate date OPTIONS(description = 'The last date when the inventory record was updated.') +) +OPTIONS(description = 'Tracks the quantity of materials available at specific plants.', +friendly_name = 'Inventory'); diff --git a/SqlDBM/src/Tables/SC.Material.sql b/SqlDBM/src/Tables/SC.Material.sql new file mode 100644 index 0000000..de0fca1 --- /dev/null +++ b/SqlDBM/src/Tables/SC.Material.sql @@ -0,0 +1,15 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.Material +CREATE TABLE SC.Material +( +MaterialId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each material or product.'), +MaterialName string(100) NOT NULL OPTIONS(description = 'The name or description of the material.'), +MaterialType string OPTIONS(description = 'The type or category of the material (e.g., raw material, finished good).'), +MaterialGroup string OPTIONS(description = 'The group or classification for the material.'), +BaseUnit string OPTIONS(description = 'The base unit of measure for the material (e.g., KG, PCS).'), +CreatedDate date OPTIONS(description = 'The date when the material record was created.') +) +OPTIONS(description = 'Stores master data for materials and products in the supply chain.', +friendly_name = 'Material'); diff --git a/SqlDBM/src/Tables/SC.Plant.sql b/SqlDBM/src/Tables/SC.Plant.sql new file mode 100644 index 0000000..18578da --- /dev/null +++ b/SqlDBM/src/Tables/SC.Plant.sql @@ -0,0 +1,14 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.Plant +CREATE TABLE SC.Plant +( +PlantId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each manufacturing or production plant.'), +PlantName string(80) OPTIONS(description = 'The name of the plant.'), +Location string(100) OPTIONS(description = 'The physical location of the plant.'), +Region string OPTIONS(description = 'The region code where the plant operates.'), +CreatedDate date OPTIONS(description = 'The date when the plant record was created.') +) +OPTIONS(description = 'Represents manufacturing or production facilities within the supply chain.', +friendly_name = 'Plant'); diff --git a/SqlDBM/src/Tables/SC.ProductionOrder.sql b/SqlDBM/src/Tables/SC.ProductionOrder.sql new file mode 100644 index 0000000..77d52cf --- /dev/null +++ b/SqlDBM/src/Tables/SC.ProductionOrder.sql @@ -0,0 +1,18 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.ProductionOrder +CREATE TABLE SC.ProductionOrder +( +ProductionOrderId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each production order.'), +MaterialId string OPTIONS(description = 'References the material being produced.'), +PlantId string OPTIONS(description = 'References the plant where production is taking place.'), +Quantity numeric(15, 3) OPTIONS(description = 'The quantity of the material to be produced.'), +StartDate date OPTIONS(description = 'The start date for the production order.'), +EndDate date OPTIONS(description = 'The end date or completion date of the production order.'), +Status string(20) OPTIONS(description = 'The current status of the production order (e.g., In Progress, Completed).'), + CONSTRAINT MaterialId FOREIGN KEY (MaterialId) REFERENCES SC.Material (MaterialId) NOT ENFORCED, + CONSTRAINT PlantId FOREIGN KEY (PlantId) REFERENCES SC.Plant (PlantId) NOT ENFORCED +) +OPTIONS(description = 'Tracks orders for producing materials, linking them to plants and materials.', +friendly_name = 'ProductionOrder'); diff --git a/SqlDBM/src/Tables/SC.PurchaseOrder.sql b/SqlDBM/src/Tables/SC.PurchaseOrder.sql new file mode 100644 index 0000000..135564b --- /dev/null +++ b/SqlDBM/src/Tables/SC.PurchaseOrder.sql @@ -0,0 +1,14 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.PurchaseOrder +CREATE TABLE SC.PurchaseOrder +( +PurchaseOrderId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each purchase order.'), +SupplierId string REFERENCES SC.Supplier(SupplierId) NOT ENFORCED OPTIONS(description = 'References the supplier from whom the order was placed.'), +OrderDate date OPTIONS(description = 'The date when the purchase order was created.'), +Status string(20) OPTIONS(description = 'The current status of the purchase order (e.g., Pending, Received).'), +TotalAmount numeric(15, 2) OPTIONS(description = 'The total monetary value of the purchase order.') +) +OPTIONS(description = 'Stores purchase orders placed with suppliers, including order status and total value.', +friendly_name = 'PurchaseOrder'); diff --git a/SqlDBM/src/Tables/SC.PurchaseOrderItem.sql b/SqlDBM/src/Tables/SC.PurchaseOrderItem.sql new file mode 100644 index 0000000..6e94012 --- /dev/null +++ b/SqlDBM/src/Tables/SC.PurchaseOrderItem.sql @@ -0,0 +1,16 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.PurchaseOrderItem +CREATE TABLE SC.PurchaseOrderItem +( +PurchaseOrderItemId numeric NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each purchase order item.'), +PurchaseOrderId string OPTIONS(description = 'References the purchase order to which this item belongs.'), +MaterialId string OPTIONS(description = 'References the material being purchased in this item.'), +Quantity numeric(15, 3) OPTIONS(description = 'The quantity of the material ordered.'), +UnitPrice numeric(15, 2) OPTIONS(description = 'The price per unit of the material.'), + CONSTRAINT MaterialId FOREIGN KEY (MaterialId) REFERENCES SC.Material (MaterialId) NOT ENFORCED, + CONSTRAINT PurchaseOrderId FOREIGN KEY (PurchaseOrderId) REFERENCES SC.PurchaseOrder (PurchaseOrderId) NOT ENFORCED +) +OPTIONS(description = 'Tracks individual items within purchase orders, including materials, quantities, and pricing.', +friendly_name = 'PurchaseOrderItem'); diff --git a/SqlDBM/src/Tables/SC.QualityCheck.sql b/SqlDBM/src/Tables/SC.QualityCheck.sql new file mode 100644 index 0000000..843a3df --- /dev/null +++ b/SqlDBM/src/Tables/SC.QualityCheck.sql @@ -0,0 +1,14 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.QualityCheck +CREATE TABLE SC.QualityCheck +( +QualityCheckId numeric NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each quality check.'), +ProductionOrderId string REFERENCES SC.ProductionOrder(ProductionOrderId) NOT ENFORCED OPTIONS(description = 'References the production order associated with the quality check.'), +CheckDate date OPTIONS(description = 'The date when the quality check was performed.'), +Result string(20) OPTIONS(description = 'The result of the quality check (e.g., Passed, Failed).'), +Notes string(255) OPTIONS(description = 'Additional notes or observations from the quality check.') +) +OPTIONS(description = 'Tracks quality checks for production orders, ensuring compliance with quality standards.', +friendly_name = 'QualityCheck'); diff --git a/SqlDBM/src/Tables/SC.Returns.sql b/SqlDBM/src/Tables/SC.Returns.sql new file mode 100644 index 0000000..423f1b5 --- /dev/null +++ b/SqlDBM/src/Tables/SC.Returns.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.Returns +CREATE TABLE SC.Returns +( +ReturnId string NOT NULL OPTIONS(description = 'Unique identifier for each return record.'), +SalesOrderId string OPTIONS(description = 'References the sales order associated with the return.'), +ReturnDate date OPTIONS(description = 'The date when the return was initiated.'), +Status string(20) OPTIONS(description = 'The current status of the return (e.g., Pending, Completed).'), +Reason string(255) +) +OPTIONS(friendly_name = 'Returns'); diff --git a/SqlDBM/src/Tables/SC.SalesOrder.sql b/SqlDBM/src/Tables/SC.SalesOrder.sql new file mode 100644 index 0000000..c1bf94a --- /dev/null +++ b/SqlDBM/src/Tables/SC.SalesOrder.sql @@ -0,0 +1,13 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.SalesOrder +CREATE TABLE SC.SalesOrder +( +SalesOrderId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each sales order.'), +OrderDate date OPTIONS(description = 'The date when the order was placed.'), +Status string(20) OPTIONS(description = 'The current status of the sales order (e.g., Pending, Shipped).'), +TotalAmount numeric(15, 2) OPTIONS(description = 'The total monetary value of the order.') +) +OPTIONS(description = 'Stores customer orders, including details about order status and value.', +friendly_name = 'SalesOrder'); diff --git a/SqlDBM/src/Tables/SC.SalesOrderItem.sql b/SqlDBM/src/Tables/SC.SalesOrderItem.sql new file mode 100644 index 0000000..3442971 --- /dev/null +++ b/SqlDBM/src/Tables/SC.SalesOrderItem.sql @@ -0,0 +1,16 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.SalesOrderItem +CREATE TABLE SC.SalesOrderItem +( +SalesOrderItemId numeric NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each sales order item.'), +SalesOrderId string OPTIONS(description = 'References the sales order to which this item belongs.'), +MaterialId string OPTIONS(description = 'References the material being sold in this item.'), +Quantity numeric(15, 3) OPTIONS(description = 'The quantity of the material ordered.'), +UnitPrice numeric(15, 2) OPTIONS(description = 'The price per unit of the material.'), + CONSTRAINT MaterialId FOREIGN KEY (MaterialId) REFERENCES SC.Material (MaterialId) NOT ENFORCED, + CONSTRAINT SalesOrderId FOREIGN KEY (SalesOrderId) REFERENCES SC.SalesOrder (SalesOrderId) NOT ENFORCED +) +OPTIONS(description = 'Tracks individual items within sales orders, including materials, quantities, and pricing.', +friendly_name = 'SalesOrderItem'); diff --git a/SqlDBM/src/Tables/SC.Supplier.sql b/SqlDBM/src/Tables/SC.Supplier.sql new file mode 100644 index 0000000..44a6f10 --- /dev/null +++ b/SqlDBM/src/Tables/SC.Supplier.sql @@ -0,0 +1,15 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.Supplier +CREATE TABLE SC.Supplier +( +SupplierId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each supplier.'), +SupplierName string(100) OPTIONS(description = 'The name of the supplier organization.'), +ContactName string(100) OPTIONS(description = 'The name of the primary contact person for the supplier.'), +Phone string OPTIONS(description = 'The contact phone number for the supplier.'), +Country string OPTIONS(description = 'The country code where the supplier is based.'), +CreatedDate date OPTIONS(description = 'The date when the supplier record was created.') +) +OPTIONS(description = 'Contains information about suppliers who provide materials or goods.', +friendly_name = 'Supplier'); diff --git a/SqlDBM/src/Tables/SC.Transportation.sql b/SqlDBM/src/Tables/SC.Transportation.sql new file mode 100644 index 0000000..30647d6 --- /dev/null +++ b/SqlDBM/src/Tables/SC.Transportation.sql @@ -0,0 +1,15 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.Transportation +CREATE TABLE SC.Transportation +( +TransportationId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each transportation record.'), +DeliveryId string REFERENCES SC.Delivery(DeliveryId) NOT ENFORCED OPTIONS(description = 'References the delivery associated with the transportation.'), +TransportDate date OPTIONS(description = 'The date when the transportation occurred.'), +Carrier string(100) OPTIONS(description = 'The name of the carrier or logistics provider handling the transportation.'), +TrackingNumber string(50) OPTIONS(description = 'The tracking number for the shipment.'), +Status string(20) OPTIONS(description = 'The current status of the transportation (e.g., In Transit, Delivered).') +) +OPTIONS(description = 'Tracks transportation details for deliveries, including carriers, tracking numbers, and status.', +friendly_name = 'Transportation'); diff --git a/SqlDBM/src/Tables/SC.Warehouse.sql b/SqlDBM/src/Tables/SC.Warehouse.sql new file mode 100644 index 0000000..6fb2879 --- /dev/null +++ b/SqlDBM/src/Tables/SC.Warehouse.sql @@ -0,0 +1,14 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.Warehouse +CREATE TABLE SC.Warehouse +( +WarehouseId string NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each warehouse.'), +WarehouseName string(100) OPTIONS(description = 'The name of the warehouse.'), +Location string(100) OPTIONS(description = 'The physical location of the warehouse.'), +Capacity numeric(15, 2) OPTIONS(description = 'The maximum storage capacity of the warehouse, typically measured in units.'), +CreatedDate date OPTIONS(description = 'The date when the warehouse record was created.') +) +OPTIONS(description = 'Stores details about warehouses used for storing inventory.', +friendly_name = 'Warehouse'); diff --git a/SqlDBM/src/Tables/SC.WarehouseInventory.sql b/SqlDBM/src/Tables/SC.WarehouseInventory.sql new file mode 100644 index 0000000..0fe7b65 --- /dev/null +++ b/SqlDBM/src/Tables/SC.WarehouseInventory.sql @@ -0,0 +1,16 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** SC.WarehouseInventory +CREATE TABLE SC.WarehouseInventory +( +WarehouseInventoryId numeric NOT NULL PRIMARY KEY NOT ENFORCED OPTIONS(description = 'Unique identifier for each warehouse inventory record.'), +WarehouseId string OPTIONS(description = 'References the warehouse storing the material.'), +MaterialId string OPTIONS(description = 'References the material stored in the warehouse.'), +QuantityOnHand numeric(15, 3) OPTIONS(description = 'The quantity of the material currently available in the warehouse.'), +LastUpdatedDate date OPTIONS(description = 'The last date when the inventory record was updated.'), + CONSTRAINT MaterialId FOREIGN KEY (MaterialId) REFERENCES SC.Material (MaterialId) NOT ENFORCED, + CONSTRAINT WarehouseId FOREIGN KEY (WarehouseId) REFERENCES SC.Warehouse (WarehouseId) NOT ENFORCED +) +OPTIONS(description = 'Tracks material quantities stored in warehouses.', +friendly_name = 'WarehouseInventory'); diff --git a/SqlDBM/src/Tables/table_77.sql b/SqlDBM/src/Tables/table_77.sql new file mode 100644 index 0000000..f1d7616 --- /dev/null +++ b/SqlDBM/src/Tables/table_77.sql @@ -0,0 +1,8 @@ +-- ************************** SqlDBM: BigQuery ************************** +-- ****** Generated by SqlDBM: BQ Demo by eric.ruiz+yew@sqldbm.com ****** + +-- ************************************** table_77 +CREATE TABLE table_77 +( +) +OPTIONS(friendly_name = 'table_77');