Skip to content

Database Design

Oloff Biermann edited this page Dec 17, 2019 · 15 revisions

Entity design

DiScribeDB_EERD.pdf

image

 

Stored procedures

  • dbo.stpCreateUser(@FirstName, @LastName, @Email, @ProfileGUID, @AudioSample, @TimeStamp, @Password, out @RowID) Creates the user record with the user's audio sample and outputs record PK.
    • @FirstName: nvarchar(50)- The user's first name
    • @LastName: nvarchar(50)- The user's last name
    • @Email: nvarchar(254)- The user's email address
    • @ProfileGUID: nvarchar(128)- GUID of the associated Azure Speaker Recognition profile created with API endpoint
    • @AudioSample: varbinary(max)- Audio data of any format, depending on client requirements
    • @TimeStamp: datetime- (optional) Time and date at which this record was created
    • @Password: nvarchar(100)- (optional) Password for this user
    • @RowID: INT- The PK of the record that was created.

 

  • dbo.stpDeleteUser(@email, out @result) Deletes the associated record for this email address and outputs BIT 1 (equivalent to true) if the record exists, else returns 0 (equivalent to false).
    • @email : nvarchar(254)- The user's email address
    • @result: BIT- Result of the delete operation

 

  • dbo.stpLoadUser(@email) Loads the user record with the associated email, if such a record exists, else outputs an empty result
    • @email: nvarchar(254)- The user's email address

 

  • dbo.stpUpdateUserByEmail(@LookupEmail, @FirstName, @LastName, @Email, @ProfileGUID, @AudioSample, @TimeStamp, @Password, out @RowID) Updates the user record associated with the lookupEmail in @LookupEmail and outputs the PK, else outputs -1
    • @LookupEmail: nvarchar(254)- The user's email
    • @FirstName: nvarchar(50)- The user's first name
    • @LastName: nvarchar(50)- The user's last name
    • @Email: nvarchar(254)- The user's email address
    • @ProfileGUID: nvarchar(128)- GUID of the associated Azure Speaker Recognition profile created with API endpoint
    • @AudioSample: varbinary(max)- Audio data of any format, depending on client requirements
    • @TimeStamp: datetime- (optional) Time and date at which this record was updated
    • @Password: nvarchar(100)- (optional) Password for this user
    • @RowID: INT- The PK of the record that was updated.

 

  • dbo.stpCreateMeeting(@AttendeesStr, @MeetingStartDateTime, @MeetingEndDateTime, @WebExID, @MeetingSubject, @MeetingMinutes, @MeetingFileLocation, @RowID out) Creates a record for a Webex meeting. Outputs the generated row PKid. Associates the generated record with all User records for users that attend this meeting.
    • @AttendeesStr:nvarchar(MAX) - Comma delimited string of user IDs for users involved in this meeting
    • @MeetingStart:DateTime = null - The and and time which meeting starts
    • @MeetingEndDateTime:datetime = null - The date and time meeting ends
    • @WebExID:nvarchar(100) = null - The webex ID (access code) for this meeting
    • @MeetingSubject:nvarchar(500) = null - Subject of this meeting
    • @MeetingMinutes:nvarchar(MAX) = null - Meeting minutes text output
    • @MeetingFileLocation:nvarchar(500) = null - File location of meeting minutes output
    • @RowID:int out - The generated row ID

 

  • dbo.stpUpdateMeeting(@LookupID, @MeetingStartDateTime, @MeetingEndDateTime, @WebExID, @MeetingSubject, @MeetingMinutes, @MeetingFileLocation, @Outcome out) Updates an existing Meeting with the specified lookup PK and sets fields to the specified values
    • @LookupID:bigint - Lookup key for the record to update
    • @MeetingStart:DateTime = null - The and and time which meeting starts
    • @MeetingEndDateTime:datetime = null - The date and time meeting ends
    • @WebExID:nvarchar(100) = null - The webex ID (access code) for this meeting
    • @MeetingSubject:nvarchar(500) = null - Subject of this meeting
    • @MeetingMinutes:nvarchar(MAX) = null - Meeting minutes text output
    • @MeetingFileLocation:nvarchar(500) = null - File location of meeting minutes output
    • @Outcome:int out - The result of this operation (> 0 if success, < 0 if fail)

Clone this wiki locally