The Conceptual Banking Model
|
Logical Banking Model
|
Extract SQL Script for SQL Server
/* ---------------------------------------------------------------------- */
/* Target DBMS : MS SQL Server 2008 */
/* Author : Barry Williams */
/* Created on: 2016-11-15 14:36 */
/* ---------------------------------------------------------------------- */
/* Tables */
/* ---------------------------------------------------------------------- */
/* Add table "Customers" */
/* ---------------------------------------------------------------------- */
CREATE TABLE [Customers] (
[Customer_ID] UNIQUEIDENTIFIER NOT NULL,
[Personal_Name] VARCHAR(255),
[Middle_Name] VARCHAR(255),
[Family_Name] VARCHAR(255),
[Organisation] VARCHAR(255),
[Date_of_Birth] DATETIME,
[Gender_MFU] CHAR(1),
[Other_Details] VARCHAR(255),
CONSTRAINT [PK_Customers] PRIMARY KEY ([Customer_ID])
)
GO
/* ---------------------------------------------------------------------- */
/* Add table "Accounts" */
/* ---------------------------------------------------------------------- */
CREATE TABLE [Accounts] (
[Activity_ID] VARCHAR(50) NOT NULL,
[Customer_ID] INTEGER NOT NULL,
[Activity_Name] VARCHAR(255) NOT NULL,
[Activity_Description] VARCHAR(255) NOT NULL,
CONSTRAINT [PK_Accounts] PRIMARY KEY ([Activity_ID])
)
GO
|