FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
SqlDatabaseVectorSearch/Scripts.sql at master · marcominerva/SqlDatabaseVectorSearch · GitHub
marcominerva
/
SqlDatabaseVectorSearch
Public
Notifications
You must be signed in to change notification settings
Fork
37
Star
143
Code
Issues
1
Pull requests
0
Discussions
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
SqlDatabaseVectorSearch
/
Scripts.sql
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (29 loc) · 983 Bytes
Breadcrumbs
SqlDatabaseVectorSearch
/
Scripts.sql
Copy path
File metadata and controls
33 lines (29 loc) · 983 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
CREATE
TABLE
[dbo].[Documents](
[Id] [uniqueidentifier]
NOT
NULL
,
[Name] [nvarchar](
255
)
NOT
NULL
,
[CreationDate] [datetimeoffset](
7
)
NOT
NULL
,
CONSTRAINT
[PK_Documents]
PRIMARY
KEY
CLUSTERED
(
[Id]
ASC
))
GO
CREATE
TABLE
[dbo].[DocumentChunks](
[Id] [uniqueidentifier]
NOT
NULL
,
[DocumentId] [uniqueidentifier]
NOT
NULL
,
[Index] [int]
NOT
NULL
,
[Content] [nvarchar](
max
)
NOT
NULL
,
--
Set the size of the vector to the same size of the your embedding model.
[Embedding] [vector](
1536
)
NOT
NULL
,
CONSTRAINT
[PK_DocumentChunks]
PRIMARY
KEY
CLUSTERED
(
[Id]
ASC
))
GO
ALTER
TABLE
[dbo].[DocumentChunks]
WITH
CHECK
ADD
CONSTRAINT
[FK_DocumentChunks_Documents]
FOREIGN KEY
([DocumentId])
REFERENCES
[dbo].[Documents] ([Id])
ON DELETE CASCADE
GO
ALTER
TABLE
[dbo].[Documents]
ADD
CONSTRAINT
[DF_Documents_Id]
DEFAULT
(
newsequentialid
()) FOR [Id]
GO
ALTER
TABLE
[dbo].[DocumentChunks]
ADD
CONSTRAINT
[DF_DocumentChunks_Id]
DEFAULT
(
newsequentialid
()) FOR [Id]
GO
Back
|
FazBrowse Home
|
New Git URL