473,804 Members | 3,312 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data model for a web messaging application.

I need to develop an internal messaging sub-system that is similar to
a web mail application but without SMTP support (e.g message routes
are confined to the webapp domain). The requirements are rather
simple: Each user (e.g mailbox) can view incoming messages and his
outgoing messages. Message quota is defined as the sum of all incoming
and outgoing messages per user
and tracked in the users' row (Users table – log_TotalMessag es). The
quota is enforced by the business logic layer and not by the DB.

I am considering the following data model for the storage component,
and would appreciate community feedback:
Table layout for incoming and outgoing messages
*************** *************** *************** ***

CREATE TABLE [dbo].[Messages] (
[MessageID] [int] IDENTITY (1, 1) NOT NULL , // The messageID
[RecipientID] [int] NOT NULL , // The userid ('Users'
Table)
[SenderID] [int] NOT NULL , // The userid ('Users'
Table)
[GroupID] [uniqueidentifie r] NULL , // Only assigned if the
user "replyed" to an incoming message

[SubmitDate] [smalldatetime] NOT NULL , // the date of the
message

[DeleteBySender] [bit] NOT NULL , // Since I want to maintain only
one copy of each message I mark a message "to be deleted" and delete
only if both are true.

[DeleteByRecipie nt] [bit] NOT NULL ,

[SeenByRecipient] [bit] NOT NULL , // Used to "highlight" unread
messages

[Subject] [tinyint] NOT NULL , // Subject is derived from a fixed
list

[MessageText] [varchar] (2000) COLLATE SQL_Latin1_Gene ral_CP1_CI_AS
NOT NULL
) ON [PRIMARY]
CREATE INDEX [Messages_Recipi entID_IDX] ON
[dbo].[Messages]([RecipientID]) ON [PRIMARY]
CREATE INDEX [Messages_Sender ID_IDX] ON [dbo].[Messages]([SenderID])
ON [PRIMARY]


/* Send Message */
CREATE PROCEDURE SendMessage (

@IN_RecipientID int,
@IN_SenderID int,
@IN_GroupID uniqueidentifie r,
@IN_Subject tinyint,
@IN_MessageText varchar(2000),
@OUT_ERRCODE tinyint OUTPUT
)

AS
BEGIN TRANSACTION SendMessageTran s

INSERT INTO Messages

(RecipientID,
SenderID,
GroupID,
SubmitDate,
Subject,
MessageText)

VALUES (@IN_RecipientI D,
@IN_SenderID,
@IN_GroupID,
GETDate(),
@IN_Subject,
@IN_MessageText )
UPDATE Users

SET log_NumberOfNew Messages = log_NumberOfNew Messages + 1
WHERE usr_AccountNo = @IN_RecipientID

UPDATE Users

SET log_TotalMessag es = log_TotalMessag es + 1
WHERE usr_AccountNo = @IN_SenderID

SAVE TRANSACTION SendMessageTran s

SET @OUT_ERRCODE = @@error

IF (@@error <> 0)

BEGIN
ROLLBACK TRANSACTION SendMessageTran s
END

ELSE

BEGIN
COMMIT TRANSACTION SendMessageTran s
END


/* ReadMessage */

CREATE PROCEDURE ReadMessage (

@IN_MessageID int,
@IN_RecipientID int,

@OUT_ERRCODE tinyint OUTPUT
)

AS

BEGIN TRANSACTION ReadMessageTran s

SELECT MessageText FROM Messages WHERE MessageID = @IN_MessageID

UPDATE Messages SET SeenByRecipient = 1 WHERE MessageID =
@IN_MessageID

UPDATE Users SET log_NumberOfNew Messages =
log_NumberOfNew Messages - 1 WHERE usr_AccountNo = @IN_RecipientID

SAVE TRANSACTION ReadMessageTran s

SET @OUT_ERRCODE = @@error

IF (@@error <> 0)
BEGIN
ROLLBACK TRANSACTION ReadMessageTran s
END

ELSE

BEGIN
COMMIT TRANSACTION ReadMessageTran s
END

/* Delete Message */

CREATE PROCEDURE DeleteMessage (

@IN_MessageID int,
@IN_DeleteIncom ingMessage bit,
@IN_DeleteOutgo ingMessage bit,

@OUT_ERRCODE tinyint OUTPUT
)

AS
BEGIN TRANSACTION DeleteMessageTr ans

DECLARE @Recipient int
DECLARE @Sender int

SET @Recipient = (SELECT RecipientID FROM Messages WHERE MessageID =
@IN_MessageID)
SET @Sender = (SELECT SenderID FROM Messages WHERE MessageID =
@IN_MessageID)
IF (@IN_DeleteInco mingMessage = 1)

BEGIN

IF((SELECT DeleteBySender FROM Messages WHERE MessageID =
@IN_MessageID) = 1)

BEGIN
DELETE FROM Messages WHERE MessageID = @IN_MessageID
UPDATE Users SET log_TotalMessag es = log_TotalMessag es - 1
WHERE usr_AccountNo = @Recipient
END

ELSE

BEGIN

UPDATE Messages SET DeleteByRecipie nt = 1 WHERE MessageID =
@IN_MessageID
UPDATE Users SET log_TotalMessag es = log_TotalMessag es - 1
WHERE usr_AccountNo = @Recipient
END
END
IF (@IN_DeleteOutg oingMessage = 1)

BEGIN

IF((SELECT DeleteByRecipie nt FROM Messages WHERE MessageID =
@IN_MessageID) = 1)

BEGIN
DELETE FROM Messages WHERE MessageID = @IN_MessageID
UPDATE Users SET log_TotalMessag es = log_TotalMessag es - 1
WHERE usr_AccountNo = @Sender
END

ELSE

BEGIN
UPDATE Messages SET DeleteBySender = 1 WHERE MessageID =
@IN_MessageID
UPDATE Users SET log_TotalMessag es = log_TotalMessag es - 1
WHERE usr_AccountNo = @Sender
END
END
SAVE TRANSACTION DeleteMessageTr ans

SET @OUT_ERRCODE = @@error
IF (@@error <> 0)
BEGIN
ROLLBACK TRANSACTION DeleteMessageTr ans
END
ELSE
BEGIN
COMMIT TRANSACTION DeleteMessageTr ans
END

/* ListIncomingMes sages */
CREATE PROCEDURE ListIncomingMes sages (

@IN_RecipientID int

)

AS

SELECT SenderID, MessageID, SubmitDate FROM Messages WHERE RecipientID
= @IN_RecipientID AND DeleteByRecipie nt = 0 ORDER BY SubmitDate DESC

/* ListOutgoingMes sages */
CREATE PROCEDURE ListOutgoingMes sages (

@IN_SenderID int

)

AS

SELECT RecipientID, MessageID, SubmitDate FROM Messages WHERE SenderID
= @IN_SenderID AND DeleteBySender = 0 ORDER BY SubmitDate DESC
Thanks in advance!

-Itai
Jul 20 '05 #1
4 1638
Itai,shalom
What is a primary key of the table? So what are you actually asking?
Are you concerned about a perfomance of the stored procedures? Do they give
you a wrong output?


"Itai" <it*********@ya hoo.com> wrote in message
news:42******** *************** ***@posting.goo gle.com...
I need to develop an internal messaging sub-system that is similar to
a web mail application but without SMTP support (e.g message routes
are confined to the webapp domain). The requirements are rather
simple: Each user (e.g mailbox) can view incoming messages and his
outgoing messages. Message quota is defined as the sum of all incoming
and outgoing messages per user
and tracked in the users' row (Users table - log_TotalMessag es). The
quota is enforced by the business logic layer and not by the DB.

I am considering the following data model for the storage component,
and would appreciate community feedback:
Table layout for incoming and outgoing messages
*************** *************** *************** ***

CREATE TABLE [dbo].[Messages] (
[MessageID] [int] IDENTITY (1, 1) NOT NULL , // The messageID
[RecipientID] [int] NOT NULL , // The userid ('Users'
Table)
[SenderID] [int] NOT NULL , // The userid ('Users'
Table)
[GroupID] [uniqueidentifie r] NULL , // Only assigned if the
user "replyed" to an incoming message

[SubmitDate] [smalldatetime] NOT NULL , // the date of the
message

[DeleteBySender] [bit] NOT NULL , // Since I want to maintain only
one copy of each message I mark a message "to be deleted" and delete
only if both are true.

[DeleteByRecipie nt] [bit] NOT NULL ,

[SeenByRecipient] [bit] NOT NULL , // Used to "highlight" unread
messages

[Subject] [tinyint] NOT NULL , // Subject is derived from a fixed
list

[MessageText] [varchar] (2000) COLLATE SQL_Latin1_Gene ral_CP1_CI_AS
NOT NULL
) ON [PRIMARY]
CREATE INDEX [Messages_Recipi entID_IDX] ON
[dbo].[Messages]([RecipientID]) ON [PRIMARY]
CREATE INDEX [Messages_Sender ID_IDX] ON [dbo].[Messages]([SenderID])
ON [PRIMARY]


/* Send Message */
CREATE PROCEDURE SendMessage (

@IN_RecipientID int,
@IN_SenderID int,
@IN_GroupID uniqueidentifie r,
@IN_Subject tinyint,
@IN_MessageText varchar(2000),
@OUT_ERRCODE tinyint OUTPUT
)

AS
BEGIN TRANSACTION SendMessageTran s

INSERT INTO Messages

(RecipientID,
SenderID,
GroupID,
SubmitDate,
Subject,
MessageText)

VALUES (@IN_RecipientI D,
@IN_SenderID,
@IN_GroupID,
GETDate(),
@IN_Subject,
@IN_MessageText )
UPDATE Users

SET log_NumberOfNew Messages = log_NumberOfNew Messages + 1
WHERE usr_AccountNo = @IN_RecipientID

UPDATE Users

SET log_TotalMessag es = log_TotalMessag es + 1
WHERE usr_AccountNo = @IN_SenderID

SAVE TRANSACTION SendMessageTran s

SET @OUT_ERRCODE = @@error

IF (@@error <> 0)

BEGIN
ROLLBACK TRANSACTION SendMessageTran s
END

ELSE

BEGIN
COMMIT TRANSACTION SendMessageTran s
END


/* ReadMessage */

CREATE PROCEDURE ReadMessage (

@IN_MessageID int,
@IN_RecipientID int,

@OUT_ERRCODE tinyint OUTPUT
)

AS

BEGIN TRANSACTION ReadMessageTran s

SELECT MessageText FROM Messages WHERE MessageID = @IN_MessageID

UPDATE Messages SET SeenByRecipient = 1 WHERE MessageID =
@IN_MessageID

UPDATE Users SET log_NumberOfNew Messages =
log_NumberOfNew Messages - 1 WHERE usr_AccountNo = @IN_RecipientID

SAVE TRANSACTION ReadMessageTran s

SET @OUT_ERRCODE = @@error

IF (@@error <> 0)
BEGIN
ROLLBACK TRANSACTION ReadMessageTran s
END

ELSE

BEGIN
COMMIT TRANSACTION ReadMessageTran s
END

/* Delete Message */

CREATE PROCEDURE DeleteMessage (

@IN_MessageID int,
@IN_DeleteIncom ingMessage bit,
@IN_DeleteOutgo ingMessage bit,

@OUT_ERRCODE tinyint OUTPUT
)

AS
BEGIN TRANSACTION DeleteMessageTr ans

DECLARE @Recipient int
DECLARE @Sender int

SET @Recipient = (SELECT RecipientID FROM Messages WHERE MessageID =
@IN_MessageID)
SET @Sender = (SELECT SenderID FROM Messages WHERE MessageID =
@IN_MessageID)
IF (@IN_DeleteInco mingMessage = 1)

BEGIN

IF((SELECT DeleteBySender FROM Messages WHERE MessageID =
@IN_MessageID) = 1)

BEGIN
DELETE FROM Messages WHERE MessageID = @IN_MessageID
UPDATE Users SET log_TotalMessag es = log_TotalMessag es - 1
WHERE usr_AccountNo = @Recipient
END

ELSE

BEGIN

UPDATE Messages SET DeleteByRecipie nt = 1 WHERE MessageID =
@IN_MessageID
UPDATE Users SET log_TotalMessag es = log_TotalMessag es - 1
WHERE usr_AccountNo = @Recipient
END
END
IF (@IN_DeleteOutg oingMessage = 1)

BEGIN

IF((SELECT DeleteByRecipie nt FROM Messages WHERE MessageID =
@IN_MessageID) = 1)

BEGIN
DELETE FROM Messages WHERE MessageID = @IN_MessageID
UPDATE Users SET log_TotalMessag es = log_TotalMessag es - 1
WHERE usr_AccountNo = @Sender
END

ELSE

BEGIN
UPDATE Messages SET DeleteBySender = 1 WHERE MessageID =
@IN_MessageID
UPDATE Users SET log_TotalMessag es = log_TotalMessag es - 1
WHERE usr_AccountNo = @Sender
END
END
SAVE TRANSACTION DeleteMessageTr ans

SET @OUT_ERRCODE = @@error
IF (@@error <> 0)
BEGIN
ROLLBACK TRANSACTION DeleteMessageTr ans
END
ELSE
BEGIN
COMMIT TRANSACTION DeleteMessageTr ans
END

/* ListIncomingMes sages */
CREATE PROCEDURE ListIncomingMes sages (

@IN_RecipientID int

)

AS

SELECT SenderID, MessageID, SubmitDate FROM Messages WHERE RecipientID
= @IN_RecipientID AND DeleteByRecipie nt = 0 ORDER BY SubmitDate DESC

/* ListOutgoingMes sages */
CREATE PROCEDURE ListOutgoingMes sages (

@IN_SenderID int

)

AS

SELECT RecipientID, MessageID, SubmitDate FROM Messages WHERE SenderID
= @IN_SenderID AND DeleteBySender = 0 ORDER BY SubmitDate DESC
Thanks in advance!

-Itai

Jul 20 '05 #2
Hi

I am not sure what you are requiring people to do regarding your post, you
are the only person that can do the analysis of what is required, if you
have captured them correctly then you will know what to store in the
database. That said, there does not seem to be any referential integrity
built into the DDL, FKs and PKs should be defined. There is probably a
natural key of RecipientID, SenderID, and SubmitDate so a covering unique
index may be useful, and a INT may not be sufficient for you messageid.
Whether just storing bits to indicated the actions or whether a date would
be better would depend on whatever auditing requirements you require.

In your stored procedures you should implement better error handling, any
statement may fail and you are only checking the result from a few. From
Books online "Because @@ERROR is cleared and reset on each statement
executed, check it immediately following the statement validated, or save it
to a local variable that can be checked later." you may not even be checking
what you think!.

John

"Itai" <it*********@ya hoo.com> wrote in message
news:42******** *************** ***@posting.goo gle.com...
I need to develop an internal messaging sub-system that is similar to
a web mail application but without SMTP support (e.g message routes
are confined to the webapp domain). The requirements are rather
simple: Each user (e.g mailbox) can view incoming messages and his
outgoing messages. Message quota is defined as the sum of all incoming
and outgoing messages per user
and tracked in the users' row (Users table - log_TotalMessag es). The
quota is enforced by the business logic layer and not by the DB.

I am considering the following data model for the storage component,
and would appreciate community feedback:
Table layout for incoming and outgoing messages
*************** *************** *************** ***

CREATE TABLE [dbo].[Messages] (
[MessageID] [int] IDENTITY (1, 1) NOT NULL , // The messageID
[RecipientID] [int] NOT NULL , // The userid ('Users'
Table)
[SenderID] [int] NOT NULL , // The userid ('Users'
Table)
[GroupID] [uniqueidentifie r] NULL , // Only assigned if the
user "replyed" to an incoming message

[SubmitDate] [smalldatetime] NOT NULL , // the date of the
message

[DeleteBySender] [bit] NOT NULL , // Since I want to maintain only
one copy of each message I mark a message "to be deleted" and delete
only if both are true.

[DeleteByRecipie nt] [bit] NOT NULL ,

[SeenByRecipient] [bit] NOT NULL , // Used to "highlight" unread
messages

[Subject] [tinyint] NOT NULL , // Subject is derived from a fixed
list

[MessageText] [varchar] (2000) COLLATE SQL_Latin1_Gene ral_CP1_CI_AS
NOT NULL
) ON [PRIMARY]
CREATE INDEX [Messages_Recipi entID_IDX] ON
[dbo].[Messages]([RecipientID]) ON [PRIMARY]
CREATE INDEX [Messages_Sender ID_IDX] ON [dbo].[Messages]([SenderID])
ON [PRIMARY]


/* Send Message */
CREATE PROCEDURE SendMessage (

@IN_RecipientID int,
@IN_SenderID int,
@IN_GroupID uniqueidentifie r,
@IN_Subject tinyint,
@IN_MessageText varchar(2000),
@OUT_ERRCODE tinyint OUTPUT
)

AS
BEGIN TRANSACTION SendMessageTran s

INSERT INTO Messages

(RecipientID,
SenderID,
GroupID,
SubmitDate,
Subject,
MessageText)

VALUES (@IN_RecipientI D,
@IN_SenderID,
@IN_GroupID,
GETDate(),
@IN_Subject,
@IN_MessageText )
UPDATE Users

SET log_NumberOfNew Messages = log_NumberOfNew Messages + 1
WHERE usr_AccountNo = @IN_RecipientID

UPDATE Users

SET log_TotalMessag es = log_TotalMessag es + 1
WHERE usr_AccountNo = @IN_SenderID

SAVE TRANSACTION SendMessageTran s

SET @OUT_ERRCODE = @@error

IF (@@error <> 0)

BEGIN
ROLLBACK TRANSACTION SendMessageTran s
END

ELSE

BEGIN
COMMIT TRANSACTION SendMessageTran s
END


/* ReadMessage */

CREATE PROCEDURE ReadMessage (

@IN_MessageID int,
@IN_RecipientID int,

@OUT_ERRCODE tinyint OUTPUT
)

AS

BEGIN TRANSACTION ReadMessageTran s

SELECT MessageText FROM Messages WHERE MessageID = @IN_MessageID

UPDATE Messages SET SeenByRecipient = 1 WHERE MessageID =
@IN_MessageID

UPDATE Users SET log_NumberOfNew Messages =
log_NumberOfNew Messages - 1 WHERE usr_AccountNo = @IN_RecipientID

SAVE TRANSACTION ReadMessageTran s

SET @OUT_ERRCODE = @@error

IF (@@error <> 0)
BEGIN
ROLLBACK TRANSACTION ReadMessageTran s
END

ELSE

BEGIN
COMMIT TRANSACTION ReadMessageTran s
END

/* Delete Message */

CREATE PROCEDURE DeleteMessage (

@IN_MessageID int,
@IN_DeleteIncom ingMessage bit,
@IN_DeleteOutgo ingMessage bit,

@OUT_ERRCODE tinyint OUTPUT
)

AS
BEGIN TRANSACTION DeleteMessageTr ans

DECLARE @Recipient int
DECLARE @Sender int

SET @Recipient = (SELECT RecipientID FROM Messages WHERE MessageID =
@IN_MessageID)
SET @Sender = (SELECT SenderID FROM Messages WHERE MessageID =
@IN_MessageID)
IF (@IN_DeleteInco mingMessage = 1)

BEGIN

IF((SELECT DeleteBySender FROM Messages WHERE MessageID =
@IN_MessageID) = 1)

BEGIN
DELETE FROM Messages WHERE MessageID = @IN_MessageID
UPDATE Users SET log_TotalMessag es = log_TotalMessag es - 1
WHERE usr_AccountNo = @Recipient
END

ELSE

BEGIN

UPDATE Messages SET DeleteByRecipie nt = 1 WHERE MessageID =
@IN_MessageID
UPDATE Users SET log_TotalMessag es = log_TotalMessag es - 1
WHERE usr_AccountNo = @Recipient
END
END
IF (@IN_DeleteOutg oingMessage = 1)

BEGIN

IF((SELECT DeleteByRecipie nt FROM Messages WHERE MessageID =
@IN_MessageID) = 1)

BEGIN
DELETE FROM Messages WHERE MessageID = @IN_MessageID
UPDATE Users SET log_TotalMessag es = log_TotalMessag es - 1
WHERE usr_AccountNo = @Sender
END

ELSE

BEGIN
UPDATE Messages SET DeleteBySender = 1 WHERE MessageID =
@IN_MessageID
UPDATE Users SET log_TotalMessag es = log_TotalMessag es - 1
WHERE usr_AccountNo = @Sender
END
END
SAVE TRANSACTION DeleteMessageTr ans

SET @OUT_ERRCODE = @@error
IF (@@error <> 0)
BEGIN
ROLLBACK TRANSACTION DeleteMessageTr ans
END
ELSE
BEGIN
COMMIT TRANSACTION DeleteMessageTr ans
END

/* ListIncomingMes sages */
CREATE PROCEDURE ListIncomingMes sages (

@IN_RecipientID int

)

AS

SELECT SenderID, MessageID, SubmitDate FROM Messages WHERE RecipientID
= @IN_RecipientID AND DeleteByRecipie nt = 0 ORDER BY SubmitDate DESC

/* ListOutgoingMes sages */
CREATE PROCEDURE ListOutgoingMes sages (

@IN_SenderID int

)

AS

SELECT RecipientID, MessageID, SubmitDate FROM Messages WHERE SenderID
= @IN_SenderID AND DeleteBySender = 0 ORDER BY SubmitDate DESC
Thanks in advance!

-Itai



Jul 20 '05 #3
Uri, John and especially David! Thanks for the code review; I am now
one step further :)

"John Bell" <jb************ @hotmail.com> wrote in message news:<41******* *************** *@news.easynet. co.uk>...
There is probably a
natural key of RecipientID, SenderID, and SubmitDate so a covering unique
index may be useful, and a INT may not be sufficient for you messageid.


"Covering index" is something I lack to understand ... How is it
stored in a
b-tree structure, does the whole string composed of the diffrent
columns get saved as one key in each node? How does SQL server
(depending on the query's' where clause of course) 'extracts' the
right column and scan for its appropriate value within the index? What
are the questions to ask when considering a covering index as a design
requirement.

Regarding the INT data type for messageID, what would you suggest?
Messages will often be deleted but the counter value will always
progress...

I thought about using a uid, but they are not suitable for a Clustered
Index since they are not guaranteed to be chosen in incremental
order...

Thanks again

-Itai
BTW does anyone know how to dump a table to a text file using command
line with arguments?
Jul 20 '05 #4
Hi

I have not seen Davids reply!!
it*********@yah oo.com (Itai) wrote in message news:<42******* *************** ****@posting.go ogle.com>...
Uri, John and especially David! Thanks for the code review; I am now
one step further :)

"John Bell" <jb************ @hotmail.com> wrote in message news:<41******* *************** *@news.easynet. co.uk>...
There is probably a
natural key of RecipientID, SenderID, and SubmitDate so a covering unique
index may be useful, and a INT may not be sufficient for you messageid.
"Covering index" is something I lack to understand ... How is it
stored in a
b-tree structure, does the whole string composed of the diffrent
columns get saved as one key in each node? How does SQL server
(depending on the query's' where clause of course) 'extracts' the
right column and scan for its appropriate value within the index? What
are the questions to ask when considering a covering index as a design
requirement.

The uniqueness of the index would make sure no duplicates values of
the three combined columns are inserted into your database, this may
be important for maintaining integrity. I would expect that when you
are looking for a message you will be mainly searching on a
combination of these three columns. The query processor will decide on
whether an index is useful using various algorithms.


Regarding the INT data type for messageID, what would you suggest?
Messages will often be deleted but the counter value will always
progress... You would have to determine the number of records and what growth you
are expecting, but when you could be mailing a significant number of
recipients then the maximum number offered by an INT datatype will
probably get used up quickly, therefore BIGINT may be better.
I thought about using a uid, but they are not suitable for a Clustered
Index since they are not guaranteed to be chosen in incremental
order...

Thanks again

-Itai
BTW does anyone know how to dump a table to a text file using command
line with arguments?


BCP, DTS or even osql will do this, look at books online for more
information on these.

John
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
11769
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a table in MySQL with the path & filename to the image. I have successfully uploaded and performed an update query on the database, but the problem I have is I cannot retain the primary key field in a variable which is then used in a SQL update...
0
4812
by: Redd | last post by:
The following is a technical report on a data modeling project that was recently assigned to me by my professor. I post it so that anyone else who is studying databases and data modeling can have an example to go by with their study of databases. I was assinged to come up with a data model, but I choose the Autoparts sales and inventory management schema. It you would like the SQL code to generate the schema or if you would like the ERWin...
16
3040
by: D Witherspoon | last post by:
I am developing a Windows Forms application in VB.NET that will use .NET remoting to access the data tier classes. A very simple way I have come up with is by creating typed (.xsd) datasets. For example dsParts.xsd and including that in the data tier. I then will create a class that looks like this Public Class CPart Inherits dsParts
7
3925
by: mittal.pradeep | last post by:
What is the better table design for a data collection application. 1. Vertical model (pk, attributeName, AttributeValue) 2. Custom columns (pk, custom1, custom2, custom3...custom50) Since the data elements collected may change year over year, which model better takes of this column dynamicness
0
1519
by: g18c | last post by:
Hi, i have been looking at SOAP and XML-RPC and it seems ideal for my needs. I am looking at an application with 2 end points, either of which can send and receive data. I know with SOAP (and varients) that requests are issued to a server rather than in a bidirectional manner which i need. this has left me wondering how instant messaging software works (i believe jabber can make RPC calls and uses SOAP)? I dont want to poll the server...
41
4740
by: laimis | last post by:
Hey guys, I just recently got introduced to data mappers (DTO mapper). So now I have a SqlHelper being used by DTOMapper and then business layer is using DTOMapper when it needs to persist object to database or load them back. Everything is working nicely so far. My question is, is it OK practice to use DTOMapper rfom the presentation layer? For instance, if I want to present in HTML format the list of entries in my database, should I...
1
2125
by: John A Grandy | last post by:
in .NET 2.0 where is the type Message located ? in .NET 1.1 it was System.Messaging.Message
10
1490
by: simon.hibbs | last post by:
Lets say that I have an application consisting of 3 files. A main.py file, gui.py and a data.py which handles persistent data storage. Suppose data.py defines a class 'MyDB' which reads in data from a database, and main.py creates an instance of this object. How does code in gui.py access this object? Here's simplified pseudocode: MAIN.PY import gui, data DataObject = data.MyDB(blah)
18
22413
by: robert | last post by:
Is there a ready made function in numpy/scipy to compute the correlation y=mx+o of an X and Y fast: m, m-err, o, o-err, r-coef,r-coef-err ? Or a formula to to compute the 3 error ranges? -robert PS: numpy.corrcoef computes only the bare coeff:
0
9708
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9588
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10589
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7625
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3828
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.