openldap/servers/slapd/back-sql/rdbms_depend/mssql/testdb_create.sql
Dmitry Kovalev e90ef57645 changes for 2.0-beta
including:
- fixes according to new API changes
- closing db connection in connection_destroy callback, not unbind
- support of new schema code, samples changed accordingly
- support for multiple objectclasses (to distinguish from unique objectclass-to-tables mapping)
- auto 'ref' attribute support
- samples now include illustrations of using these 2 features to make named referrals as described in ldapext-namedref draft

more to come:
- documentation update
- different improvements to be more close to native directory (after beta?)
2000-06-29 21:14:43 +00:00

73 lines
1.0 KiB
Transact-SQL

CREATE TABLE authors_docs (
pers_id int NOT NULL ,
doc_id int NOT NULL
)
GO
CREATE TABLE documents (
id int IDENTITY (1, 1) NOT NULL ,
abstract varchar (255) NULL ,
title varchar (255) NULL ,
body binary (255) NULL
)
GO
CREATE TABLE institutes (
id int IDENTITY (1, 1) NOT NULL ,
name varchar (255) NOT NULL
)
GO
CREATE TABLE persons (
id int IDENTITY (1, 1) NOT NULL ,
name varchar (255) NULL
)
GO
CREATE TABLE phones (
id int IDENTITY (1, 1) NOT NULL ,
phone varchar (255) NOT NULL ,
pers_id int NOT NULL
)
GO
ALTER TABLE authors_docs WITH NOCHECK ADD
CONSTRAINT PK_authors_docs PRIMARY KEY
(
pers_id,
doc_id
)
GO
ALTER TABLE documents WITH NOCHECK ADD
CONSTRAINT PK_documents PRIMARY KEY
(
id
)
GO
ALTER TABLE institutes WITH NOCHECK ADD
CONSTRAINT PK_institutes PRIMARY KEY
(
id
)
GO
ALTER TABLE persons WITH NOCHECK ADD
CONSTRAINT PK_persons PRIMARY KEY
(
id
)
GO
ALTER TABLE phones WITH NOCHECK ADD
CONSTRAINT PK_phones PRIMARY KEY
(
id
)
GO