-------------------------------------------------------------------------------------------------
--
-- Application Description Language framework
--
-- Database for application version
-- Generated for MS-SQL 2000+ using adl2mssql.xslt
--
-- Code generator (c) 2007 Cygnet Solutions Ltd
--
-------------------------------------------------------------------------------------------------
use ;
-------------------------------------------------------------------------------------------------
-- authentication roles
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-- primary tables, views and permissions
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-- link tables
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-- primary referential integrity constraints
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-- end of file
-------------------------------------------------------------------------------------------------
execute sp_addrole @rolename = ''
GO
ALTER TABLE ""
ADD FOREIGN KEY ( "")
REFERENCES "" ON DELETE
GO
CASCADE
CASCADE
CASCADE
NO ACTION
-------------------------------------------------------------------------------------------------
-- primary table
-------------------------------------------------------------------------------------------------
CREATE TABLE ""
(
,
)
GO
---- permissions ------------------------------------------------------------------------------
,
PRIMARY KEY( "
", )
""."" + ' ' +
GRANT SELECT ON "" TO
GRANT INSERT ON "" TO
GRANT SELECT, INSERT ON "" TO
GRANT SELECT, INSERT, UPDATE ON "" TO
GRANT SELECT, INSERT, UPDATE, DELETE ON "" TO
REVOKE ALL ON "" FROM
GO
true
true
false
true
false
-- Problems with responsibility for generating link tables:
-- @entity =
-- $nearside =
-- $farside =
-- farlink =
-- comparison = ''
-- my responsibility =
-------------------------------------------------------------------------------------------------
-- link table joining with
-------------------------------------------------------------------------------------------------
CREATE TABLE ""
(
""
NOT NULL,
""
NOT NULL
)
GO
---- permissions ------------------------------------------------------------------------------
GRANT SELECT,INSERT,UPDATE,DELETE ON TO
GRANT SELECT,INSERT,UPDATE,DELETE ON TO
GRANT SELECT,INSERT,UPDATE,DELETE ON TO
GRANT SELECT,INSERT,UPDATE,DELETE ON TO
REVOKE ALL ON FROM
REVOKE ALL ON FROM
GRANT SELECT ON TO
GO
---- referential integrity --------------------------------------------------------------------
-- Suppressing generation of , as it is not my responsibility
-- Suppressing output of property ,
-- as it is the 'one' end of a one-to-many relationship
IDENTITY( 1, 1)
"" NOT NULL DEFAULT
''
"" DEFAULT NOT NULL
ADL: WARNING: entity '' has a compound primary key;
adl2mssql is not yet clever enough to generate appropriate code
ADL: ERROR: property '' refers to
entity '', but this entity has no key.
ADL: ERROR: property '' refers to
entity '', but no such entity exists.
DATETIME
DATETIME
VARCHAR( )
TEXT
BIT
TIMESTAMP
INT
DOUBLE PRECISION
DECIMAL
[sql:unknown? []]
0
-1
1