Showing posts with label system. Show all posts
Showing posts with label system. Show all posts

Monday, March 26, 2012

Is this possible? please help (MS access query of sql database)

I work for an organisation that uses a bespoke document imaging system, the
database of which is an MS sql server.
We have MS Access and already use it for some querying of the database.
The database comprises a large number of distinct cases, which are
differentiated by case reference numbers, in one field (table?) of the
database. Each of these cases may have many documents associated with it,
denoted by the reference number, and these documents may be "new", "pending"
or "complete" shown in another data field.
We need to know how many cases have work outstanding on them.
Our problem is that our bespoke software will only count the number of
documents of each status, and not the cases.

Is it possible to design an MS Access query which will count the number of
different reference numbers which have any "new" documents associated, but
wont count each case more than once?

I am reasonably computer-savvy, I just don't know Access or SQL..
If I know it is possible, I don't mind putting in the effort to find out
how. I just don't want to waste time barking up the wrong tree ;-)

Of course any advice about how this would be achieved, such as pointers to
the right parts of the MS Access helpfiles, or to relevant websites would be
greatly appreciated. Some quick code would be even better...
Also, if there is any 3rd-party software which could easily do this, I need
help discovering it...I have looked long and hard, but don't know enough
about what I am looking for.
Yours in hope..
--
anthonyberet
Please reply in the groups, as my Usenet email address is not working at the
moment.anthonyberet wrote:
> I work for an organisation that uses a bespoke document imaging
> system, the database of which is an MS sql server.
> We have MS Access and already use it for some querying of the
> database.
> The database comprises a large number of distinct cases, which are
> differentiated by case reference numbers, in one field (table?) of the
> database. Each of these cases may have many documents associated with
> it, denoted by the reference number, and these documents may be
> "new", "pending" or "complete" shown in another data field.
> We need to know how many cases have work outstanding on them.
> Our problem is that our bespoke software will only count the number of
> documents of each status, and not the cases.
> Is it possible to design an MS Access query which will count the
> number of different reference numbers which have any "new" documents
> associated, but wont count each case more than once?
> I am reasonably computer-savvy, I just don't know Access or SQL..
> If I know it is possible, I don't mind putting in the effort to find
> out how. I just don't want to waste time barking up the wrong tree ;-)
> Of course any advice about how this would be achieved, such as
> pointers to the right parts of the MS Access helpfiles, or to
> relevant websites would be greatly appreciated. Some quick code would
> be even better...
> Also, if there is any 3rd-party software which could easily do this,
> I need help discovering it...I have looked long and hard, but don't
> know enough about what I am looking for.
> Yours in hope..

You'd probably be better off in an MS Access group - try
microsoft.public.access|||Gordon Burgess-Parker wrote:
> anthonyberet wrote:
>> I work for an organisation that uses a bespoke document imaging
>> system, the database of which is an MS sql server.
>> We have MS Access and already use it for some querying of the
>> database.
>> The database comprises a large number of distinct cases, which are
>> differentiated by case reference numbers, in one field (table?) of
>> the database. Each of these cases may have many documents associated
>> with it, denoted by the reference number, and these documents may be
>> "new", "pending" or "complete" shown in another data field.
>> We need to know how many cases have work outstanding on them.
>> Our problem is that our bespoke software will only count the number
>> of documents of each status, and not the cases.
>>
>> Is it possible to design an MS Access query which will count the
>> number of different reference numbers which have any "new" documents
>> associated, but wont count each case more than once?
>>
>> I am reasonably computer-savvy, I just don't know Access or SQL..
>> If I know it is possible, I don't mind putting in the effort to find
>> out how. I just don't want to waste time barking up the wrong tree
>> ;-)
>>
>> Of course any advice about how this would be achieved, such as
>> pointers to the right parts of the MS Access helpfiles, or to
>> relevant websites would be greatly appreciated. Some quick code would
>> be even better...
>> Also, if there is any 3rd-party software which could easily do this,
>> I need help discovering it...I have looked long and hard, but don't
>> know enough about what I am looking for.
>> Yours in hope..
> You'd probably be better off in an MS Access group - try
> microsoft.public.access

And I didn't see ALL those crossposts.... doh!|||On Sat, 18 Oct 2003 01:03:05 +0100, "anthonyberet"
<witfb001@.sneakemail.com> wrote:

>I work for an organisation that uses a bespoke document imaging system, the
>database of which is an MS sql server.
>We have MS Access and already use it for some querying of the database.
>The database comprises a large number of distinct cases, which are
>differentiated by case reference numbers, in one field (table?) of the
>database. Each of these cases may have many documents associated with it,
>denoted by the reference number, and these documents may be "new", "pending"
>or "complete" shown in another data field.
>We need to know how many cases have work outstanding on them.
>Our problem is that our bespoke software will only count the number of
>documents of each status, and not the cases.
>Is it possible to design an MS Access query which will count the number of
>different reference numbers which have any "new" documents associated, but
>wont count each case more than once?
>I am reasonably computer-savvy, I just don't know Access or SQL..
>If I know it is possible, I don't mind putting in the effort to find out
>how. I just don't want to waste time barking up the wrong tree ;-)
>Of course any advice about how this would be achieved, such as pointers to
>the right parts of the MS Access helpfiles, or to relevant websites would be
>greatly appreciated. Some quick code would be even better...
>Also, if there is any 3rd-party software which could easily do this, I need
>help discovering it...I have looked long and hard, but don't know enough
>about what I am looking for.
>Yours in hope..

this is very difficult without any idea of the tables involved, but
lets try;

Table: Cases
(caseNumber integer) *PK

Table: Documents
(docNumber integer,
caseNumber integer, *FK
status varchar(20))

SELECT COUNT(1) FROM Cases
WHERE caseNumber IN
(SELECT caseNumber
FROM Documents WHERE status='New')

Of course if your tables don't look like this then you need another
approach...|||Lyndon Hills wrote:
> On Sat, 18 Oct 2003 01:03:05 +0100, "anthonyberet"
> <witfb001@.sneakemail.com> wrote:
>> I work for an organisation that uses a bespoke document imaging
>> system, the database of which is an MS sql server.
>> We have MS Access and already use it for some querying of the
>> database. The database comprises a large number of distinct cases,
>> which are differentiated by case reference numbers, in one field
>> (table?) of the database. Each of these cases may have many
>> documents associated with it, denoted by the reference number, and
>> these documents may be "new", "pending" or "complete" shown in
>> another data field. We need to know how many cases have work
>> outstanding on them. Our problem is that our bespoke software will
>> only count the number of documents of each status, and not the cases.
>>
>> Is it possible to design an MS Access query which will count the
>> number of different reference numbers which have any "new" documents
>> associated, but wont count each case more than once?
>>
>> I am reasonably computer-savvy, I just don't know Access or SQL..
>> If I know it is possible, I don't mind putting in the effort to find
>> out how. I just don't want to waste time barking up the wrong tree
>> ;-)
>>
>> Of course any advice about how this would be achieved, such as
>> pointers to the right parts of the MS Access helpfiles, or to
>> relevant websites would be greatly appreciated. Some quick code
>> would be even better... Also, if there is any 3rd-party software
>> which could easily do this, I need help discovering it...I have
>> looked long and hard, but don't know enough about what I am looking
>> for. Yours in hope..
> this is very difficult without any idea of the tables involved, but
> lets try;
> Table: Cases
> (caseNumber integer) *PK
> Table: Documents
> (docNumber integer,
> caseNumber integer, *FK
> status varchar(20))
> SELECT COUNT(1) FROM Cases
> WHERE caseNumber IN
> (SELECT caseNumber
> FROM Documents WHERE status='New')
> Of course if your tables don't look like this then you need another
> approach...

I think only 2 tables are relevant in the first instance - "reference" and
"status".
Can you rcommend a site where I can read about the functions of the
intructions you have posted?
In particular, the "SELECT COUNT(1) FROM Cases" bit looks very powerful.
However, is this SQL or is it bespoke code used by MS Access?
Thank you for your help.
--
Put "usenet" in the subject-line if you want to mail me, otherwise it will
bounce.
Do you use filesharing networks? If so, please visit my online poll:
http://vote.sparklit.com/web_poll.spark/780772
anthonyberet|||On Mon, 20 Oct 2003 23:33:41 +0100, "anthonyberet"
<witfb001@.sneakemail.com> wrote:

<snip>
>> SELECT COUNT(1) FROM Cases
>> WHERE caseNumber IN
>> (SELECT caseNumber
>> FROM Documents WHERE status='New')
>>
>I think only 2 tables are relevant in the first instance - "reference" and
>"status".
>Can you rcommend a site where I can read about the functions of the
>intructions you have posted?
>In particular, the "SELECT COUNT(1) FROM Cases" bit looks very powerful.
>However, is this SQL or is it bespoke code used by MS Access?
>Thank you for your help.

I would google for sql tutorials. www.sqlcourse.com looks basic. Also
there should be some of this at least in the access help files. I
guess you do need to know what your looking for though. Above, all the
words in capitals are sql keywords, and they should be in the help
files. The IN is a subselect which could be replaced with EXISTS and a
slightly different syntax.

SELECT COUNT() FROM, just counts the number of rows that meet the
conditions. It just returns one number, not the actual rows of data.
There are similar options like MAX, MIN AVERAGE which apply to number
columns. A quick word of warning if you plan to use them, be careful
of the case where the number column is null. Average in particular may
give wrong results.

SQL has relatively few keywords, although each of the big
manufacturers have added their own.sql

Friday, March 23, 2012

Is This Feasable?

I am looking to design a system that will allow users to define their own
"objects". One of the methods I considered was to allow them to generate
tables representing these objects, and allow them to add and remove columns
from these tables as necessary.
These tables could potentially range from 3-50 columns and 1-10,000,000 rows
and there could be tens of thousands of new tables generated by users.
Is this feasable? What sort of hardware would be required to cope with such
a system (assuming thousands of simultaneous users)?Hi
Based on what you described, you are starting to talk enterprise class
hardware here.
8-16 way Intel Itanium2 Servers.
64GB+ RAM
Large SAN like EMC behind it.
And of course, clustered for high availability since it seems to be mission
critical.
Unisys, Fujitsu, IBM and HP. Hope you have a big budget.
Short of knowing more about the application, it usage patters, transudations
per minute, not much more can be said.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Mika" <mika@.hotmail.com> wrote in message
news:eOoKFHMoFHA.4012@.TK2MSFTNGP09.phx.gbl...
>I am looking to design a system that will allow users to define their own
>"objects". One of the methods I considered was to allow them to generate
>tables representing these objects, and allow them to add and remove columns
>from these tables as necessary.
> These tables could potentially range from 3-50 columns and 1-10,000,000
> rows and there could be tens of thousands of new tables generated by
> users.
> Is this feasable? What sort of hardware would be required to cope with
> such a system (assuming thousands of simultaneous users)?
>|||Allowing thousands of users to generate their own tables doesn't sound like
a way to build a scalable database capable of handling tens of millions of
rows of data. Not unless all your users are experienced database designers.
David Portas
SQL Server MVP
--|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:_M-dnZ2dnZ00zAH8nZ2dnUuoYt-dnZ2dRVn-z52dnZ0@.giganews.com...
> Allowing thousands of users to generate their own tables doesn't sound
> like a way to build a scalable database capable of handling tens of
> millions of rows of data. Not unless all your users are experienced
> database designers.
Obviously the creation of the tables and columns will be tightly controlled
by the application.
What alternative technique would you suggest which would allow them to
simulate the creation of user-defined tables/objects?|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:uAVS7TMoFHA.3544@.TK2MSFTNGP15.phx.gbl...
> Hi
> Based on what you described, you are starting to talk enterprise class
> hardware here.
> 8-16 way Intel Itanium2 Servers.
> 64GB+ RAM
> Large SAN like EMC behind it.
> And of course, clustered for high availability since it seems to be
> mission critical.
> Unisys, Fujitsu, IBM and HP. Hope you have a big budget.
> Short of knowing more about the application, it usage patters,
> transudations per minute, not much more can be said.
Hmmm thanks. Gives me an idea of what may be involved.|||Tables are not objects. The question you should be asking is how will you
represent RELATIONALLY the DATA that your users want to store. That has
nothing to do with the application creating its own tables for users. Since
you haven't told us anything about your data I can't answer your question.
David Portas
SQL Server MVP
--|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:sd6dnWPLCqA3pGLfRVn-qA@.giganews.com...
> Tables are not objects. The question you should be asking is how will you
> represent RELATIONALLY the DATA that your users want to store. That has
> nothing to do with the application creating its own tables for users.
> Since you haven't told us anything about your data I can't answer your
> question.
I realise tables aren't objects but I was considering using tables to
simulate objects.|||>> Is this feasable? <<
Where did you get the idea that a random user can design a schema on
the fly? Are you such a bad programmer that this is true'
No. The name of this design flaw is EAV and there are los of postings
about why it is a stupid, dangerous idea. It comes up over and over
again with newbies -- like Martingales in gambling.|||Conceptually a table might be regarded as representing a set of facts about
a particular class of objects but that analogy is a weak one because there
may not be a one-to-one correspondence between what users perceive as
"objects" and their efficient and logical representation as tables in an
RDBMS.
What I infer from your previous posts it that you don't know at design time
what data the users will wish to store. In most enterprise environments that
wouldn't generally be an acceptable starting point for a project. The first
step would be to research users' needs and identify a set of requirements
up-front. Without doing that it may be difficult to make a business case for
any kind of solution. Also, most enterprises entrust their data to database
professionals precisely because there is value in conforming information to
a standard data model. If users in an enterprise build their own models on
the fly then much of the data's value is lost.
Another possibility is that you are talking about providing some kind of
database hosting service to consumers, perhaps over the internet. In that
case I suggest that SQL Server may not even be the right tool for the job -
since it isn't obvious what kind of benefit you could expect to gain from
storing an unknown set of data relationally. Also, be aware that Microsoft
has a separate licensing model for Application Service Providers. I've no
idea if that will apply to you - I'm just guessing.
David Portas
SQL Server MVP
--|||>> Obviously the creation of the tables and columns will be tightly controll
ed by the application. <<
LOL! Anyone who can get to a tool like QA can destroy everything.
Over time you will have a lot of applications, and changes to existing
applications. Since each module and each tool does not have to have
the same integirty rules, they will drift. Since each of the users
will have a different data model, how would you write integrity
constraints anyway? Johnny has a rule that (age > 18) and Sally has
the rule that (age >= 18) and they are in the same Monster database.

Is This Feasable?

I am looking to design a system that will allow users to define their own
"objects". One of the methods I considered was to allow them to generate
tables representing these objects, and allow them to add and remove columns
from these tables as necessary.
These tables could potentially range from 3-50 columns and 1-10,000,000 rows
and there could be tens of thousands of new tables generated by users.
Is this feasable? What sort of hardware would be required to cope with such
a system (assuming thousands of simultaneous users)?Hi
Based on what you described, you are starting to talk enterprise class
hardware here.
8-16 way Intel Itanium2 Servers.
64GB+ RAM
Large SAN like EMC behind it.
And of course, clustered for high availability since it seems to be mission
critical.
Unisys, Fujitsu, IBM and HP. Hope you have a big budget.
Short of knowing more about the application, it usage patters, transudations
per minute, not much more can be said.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Mika" <mika@.hotmail.com> wrote in message
news:eOoKFHMoFHA.4012@.TK2MSFTNGP09.phx.gbl...
>I am looking to design a system that will allow users to define their own
>"objects". One of the methods I considered was to allow them to generate
>tables representing these objects, and allow them to add and remove columns
>from these tables as necessary.
> These tables could potentially range from 3-50 columns and 1-10,000,000
> rows and there could be tens of thousands of new tables generated by
> users.
> Is this feasable? What sort of hardware would be required to cope with
> such a system (assuming thousands of simultaneous users)?
>|||Allowing thousands of users to generate their own tables doesn't sound like
a way to build a scalable database capable of handling tens of millions of
rows of data. Not unless all your users are experienced database designers.
David Portas
SQL Server MVP
--|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:_M-dnZ2dnZ00zAH8nZ2dnUuoYt-dnZ2dRVn-z52dnZ0@.giganews.com...
> Allowing thousands of users to generate their own tables doesn't sound
> like a way to build a scalable database capable of handling tens of
> millions of rows of data. Not unless all your users are experienced
> database designers.
Obviously the creation of the tables and columns will be tightly controlled
by the application.
What alternative technique would you suggest which would allow them to
simulate the creation of user-defined tables/objects?|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:uAVS7TMoFHA.3544@.TK2MSFTNGP15.phx.gbl...
> Hi
> Based on what you described, you are starting to talk enterprise class
> hardware here.
> 8-16 way Intel Itanium2 Servers.
> 64GB+ RAM
> Large SAN like EMC behind it.
> And of course, clustered for high availability since it seems to be
> mission critical.
> Unisys, Fujitsu, IBM and HP. Hope you have a big budget.
> Short of knowing more about the application, it usage patters,
> transudations per minute, not much more can be said.
Hmmm thanks. Gives me an idea of what may be involved.|||Tables are not objects. The question you should be asking is how will you
represent RELATIONALLY the DATA that your users want to store. That has
nothing to do with the application creating its own tables for users. Since
you haven't told us anything about your data I can't answer your question.
David Portas
SQL Server MVP
--|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:sd6dnWPLCqA3pGLfRVn-qA@.giganews.com...
> Tables are not objects. The question you should be asking is how will you
> represent RELATIONALLY the DATA that your users want to store. That has
> nothing to do with the application creating its own tables for users.
> Since you haven't told us anything about your data I can't answer your
> question.
I realise tables aren't objects but I was considering using tables to
simulate objects.|||>> Is this feasable? <<
Where did you get the idea that a random user can design a schema on
the fly? Are you such a bad programmer that this is true'
No. The name of this design flaw is EAV and there are los of postings
about why it is a stupid, dangerous idea. It comes up over and over
again with newbies -- like Martingales in gambling.|||Conceptually a table might be regarded as representing a set of facts about
a particular class of objects but that analogy is a weak one because there
may not be a one-to-one correspondence between what users perceive as
"objects" and their efficient and logical representation as tables in an
RDBMS.
What I infer from your previous posts it that you don't know at design time
what data the users will wish to store. In most enterprise environments that
wouldn't generally be an acceptable starting point for a project. The first
step would be to research users' needs and identify a set of requirements
up-front. Without doing that it may be difficult to make a business case for
any kind of solution. Also, most enterprises entrust their data to database
professionals precisely because there is value in conforming information to
a standard data model. If users in an enterprise build their own models on
the fly then much of the data's value is lost.
Another possibility is that you are talking about providing some kind of
database hosting service to consumers, perhaps over the internet. In that
case I suggest that SQL Server may not even be the right tool for the job -
since it isn't obvious what kind of benefit you could expect to gain from
storing an unknown set of data relationally. Also, be aware that Microsoft
has a separate licensing model for Application Service Providers. I've no
idea if that will apply to you - I'm just guessing.
David Portas
SQL Server MVP
--|||>> Obviously the creation of the tables and columns will be tightly controll
ed by the application. <<
LOL! Anyone who can get to a tool like QA can destroy everything.
Over time you will have a lot of applications, and changes to existing
applications. Since each module and each tool does not have to have
the same integirty rules, they will drift. Since each of the users
will have a different data model, how would you write integrity
constraints anyway? Johnny has a rule that (age > 18) and Sally has
the rule that (age >= 18) and they are in the same Monster database.

Is This Feasable?

I am looking to design a system that will allow users to define their own
"objects". One of the methods I considered was to allow them to generate
tables representing these objects, and allow them to add and remove columns
from these tables as necessary.
These tables could potentially range from 3-50 columns and 1-10,000,000 rows
and there could be tens of thousands of new tables generated by users.
Is this feasable? What sort of hardware would be required to cope with such
a system (assuming thousands of simultaneous users)?
Hi
Based on what you described, you are starting to talk enterprise class
hardware here.
8-16 way Intel Itanium2 Servers.
64GB+ RAM
Large SAN like EMC behind it.
And of course, clustered for high availability since it seems to be mission
critical.
Unisys, Fujitsu, IBM and HP. Hope you have a big budget.
Short of knowing more about the application, it usage patters, transudations
per minute, not much more can be said.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Mika" <mika@.hotmail.com> wrote in message
news:eOoKFHMoFHA.4012@.TK2MSFTNGP09.phx.gbl...
>I am looking to design a system that will allow users to define their own
>"objects". One of the methods I considered was to allow them to generate
>tables representing these objects, and allow them to add and remove columns
>from these tables as necessary.
> These tables could potentially range from 3-50 columns and 1-10,000,000
> rows and there could be tens of thousands of new tables generated by
> users.
> Is this feasable? What sort of hardware would be required to cope with
> such a system (assuming thousands of simultaneous users)?
>
|||Allowing thousands of users to generate their own tables doesn't sound like
a way to build a scalable database capable of handling tens of millions of
rows of data. Not unless all your users are experienced database designers.
David Portas
SQL Server MVP
|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:_M-dnZ2dnZ00zAH8nZ2dnUuoYt-dnZ2dRVn-z52dnZ0@.giganews.com...
> Allowing thousands of users to generate their own tables doesn't sound
> like a way to build a scalable database capable of handling tens of
> millions of rows of data. Not unless all your users are experienced
> database designers.
Obviously the creation of the tables and columns will be tightly controlled
by the application.
What alternative technique would you suggest which would allow them to
simulate the creation of user-defined tables/objects?
|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:uAVS7TMoFHA.3544@.TK2MSFTNGP15.phx.gbl...
> Hi
> Based on what you described, you are starting to talk enterprise class
> hardware here.
> 8-16 way Intel Itanium2 Servers.
> 64GB+ RAM
> Large SAN like EMC behind it.
> And of course, clustered for high availability since it seems to be
> mission critical.
> Unisys, Fujitsu, IBM and HP. Hope you have a big budget.
> Short of knowing more about the application, it usage patters,
> transudations per minute, not much more can be said.
Hmmm thanks. Gives me an idea of what may be involved.
|||Tables are not objects. The question you should be asking is how will you
represent RELATIONALLY the DATA that your users want to store. That has
nothing to do with the application creating its own tables for users. Since
you haven't told us anything about your data I can't answer your question.
David Portas
SQL Server MVP
|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:sd6dnWPLCqA3pGLfRVn-qA@.giganews.com...
> Tables are not objects. The question you should be asking is how will you
> represent RELATIONALLY the DATA that your users want to store. That has
> nothing to do with the application creating its own tables for users.
> Since you haven't told us anything about your data I can't answer your
> question.
I realise tables aren't objects but I was considering using tables to
simulate objects.
|||>> Is this feasable? <<
Where did you get the idea that a random user can design a schema on
the fly? Are you such a bad programmer that this is true?
No. The name of this design flaw is EAV and there are los of postings
about why it is a stupid, dangerous idea. It comes up over and over
again with newbies -- like Martingales in gambling.
|||Conceptually a table might be regarded as representing a set of facts about
a particular class of objects but that analogy is a weak one because there
may not be a one-to-one correspondence between what users perceive as
"objects" and their efficient and logical representation as tables in an
RDBMS.
What I infer from your previous posts it that you don't know at design time
what data the users will wish to store. In most enterprise environments that
wouldn't generally be an acceptable starting point for a project. The first
step would be to research users' needs and identify a set of requirements
up-front. Without doing that it may be difficult to make a business case for
any kind of solution. Also, most enterprises entrust their data to database
professionals precisely because there is value in conforming information to
a standard data model. If users in an enterprise build their own models on
the fly then much of the data's value is lost.
Another possibility is that you are talking about providing some kind of
database hosting service to consumers, perhaps over the internet. In that
case I suggest that SQL Server may not even be the right tool for the job -
since it isn't obvious what kind of benefit you could expect to gain from
storing an unknown set of data relationally. Also, be aware that Microsoft
has a separate licensing model for Application Service Providers. I've no
idea if that will apply to you - I'm just guessing.
David Portas
SQL Server MVP
|||>> Obviously the creation of the tables and columns will be tightly controlled by the application. <<
LOL! Anyone who can get to a tool like QA can destroy everything.
Over time you will have a lot of applications, and changes to existing
applications. Since each module and each tool does not have to have
the same integirty rules, they will drift. Since each of the users
will have a different data model, how would you write integrity
constraints anyway? Johnny has a rule that (age > 18) and Sally has
the rule that (age >= 18) and they are in the same Monster database.

Is This Feasable?

I am looking to design a system that will allow users to define their own
"objects". One of the methods I considered was to allow them to generate
tables representing these objects, and allow them to add and remove columns
from these tables as necessary.
These tables could potentially range from 3-50 columns and 1-10,000,000 rows
and there could be tens of thousands of new tables generated by users.
Is this feasable? What sort of hardware would be required to cope with such
a system (assuming thousands of simultaneous users)?Hi
Based on what you described, you are starting to talk enterprise class
hardware here.
8-16 way Intel Itanium2 Servers.
64GB+ RAM
Large SAN like EMC behind it.
And of course, clustered for high availability since it seems to be mission
critical.
Unisys, Fujitsu, IBM and HP. Hope you have a big budget.
Short of knowing more about the application, it usage patters, transudations
per minute, not much more can be said.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Mika" <mika@.hotmail.com> wrote in message
news:eOoKFHMoFHA.4012@.TK2MSFTNGP09.phx.gbl...
>I am looking to design a system that will allow users to define their own
>"objects". One of the methods I considered was to allow them to generate
>tables representing these objects, and allow them to add and remove columns
>from these tables as necessary.
> These tables could potentially range from 3-50 columns and 1-10,000,000
> rows and there could be tens of thousands of new tables generated by
> users.
> Is this feasable? What sort of hardware would be required to cope with
> such a system (assuming thousands of simultaneous users)?
>|||Allowing thousands of users to generate their own tables doesn't sound like
a way to build a scalable database capable of handling tens of millions of
rows of data. Not unless all your users are experienced database designers.
--
David Portas
SQL Server MVP
--|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:_M-dnZ2dnZ00zAH8nZ2dnUuoYt-dnZ2dRVn-z52dnZ0@.giganews.com...
> Allowing thousands of users to generate their own tables doesn't sound
> like a way to build a scalable database capable of handling tens of
> millions of rows of data. Not unless all your users are experienced
> database designers.
Obviously the creation of the tables and columns will be tightly controlled
by the application.
What alternative technique would you suggest which would allow them to
simulate the creation of user-defined tables/objects?|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:uAVS7TMoFHA.3544@.TK2MSFTNGP15.phx.gbl...
> Hi
> Based on what you described, you are starting to talk enterprise class
> hardware here.
> 8-16 way Intel Itanium2 Servers.
> 64GB+ RAM
> Large SAN like EMC behind it.
> And of course, clustered for high availability since it seems to be
> mission critical.
> Unisys, Fujitsu, IBM and HP. Hope you have a big budget.
> Short of knowing more about the application, it usage patters,
> transudations per minute, not much more can be said.
Hmmm thanks. Gives me an idea of what may be involved.|||Tables are not objects. The question you should be asking is how will you
represent RELATIONALLY the DATA that your users want to store. That has
nothing to do with the application creating its own tables for users. Since
you haven't told us anything about your data I can't answer your question.
--
David Portas
SQL Server MVP
--|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:sd6dnWPLCqA3pGLfRVn-qA@.giganews.com...
> Tables are not objects. The question you should be asking is how will you
> represent RELATIONALLY the DATA that your users want to store. That has
> nothing to do with the application creating its own tables for users.
> Since you haven't told us anything about your data I can't answer your
> question.
I realise tables aren't objects but I was considering using tables to
simulate objects.|||>> Is this feasable? <<
Where did you get the idea that a random user can design a schema on
the fly? Are you such a bad programmer that this is true'
No. The name of this design flaw is EAV and there are los of postings
about why it is a stupid, dangerous idea. It comes up over and over
again with newbies -- like Martingales in gambling.|||Conceptually a table might be regarded as representing a set of facts about
a particular class of objects but that analogy is a weak one because there
may not be a one-to-one correspondence between what users perceive as
"objects" and their efficient and logical representation as tables in an
RDBMS.
What I infer from your previous posts it that you don't know at design time
what data the users will wish to store. In most enterprise environments that
wouldn't generally be an acceptable starting point for a project. The first
step would be to research users' needs and identify a set of requirements
up-front. Without doing that it may be difficult to make a business case for
any kind of solution. Also, most enterprises entrust their data to database
professionals precisely because there is value in conforming information to
a standard data model. If users in an enterprise build their own models on
the fly then much of the data's value is lost.
Another possibility is that you are talking about providing some kind of
database hosting service to consumers, perhaps over the internet. In that
case I suggest that SQL Server may not even be the right tool for the job -
since it isn't obvious what kind of benefit you could expect to gain from
storing an unknown set of data relationally. Also, be aware that Microsoft
has a separate licensing model for Application Service Providers. I've no
idea if that will apply to you - I'm just guessing.
--
David Portas
SQL Server MVP
--|||>> Obviously the creation of the tables and columns will be tightly controlled by the application. <<
LOL! Anyone who can get to a tool like QA can destroy everything.
Over time you will have a lot of applications, and changes to existing
applications. Since each module and each tool does not have to have
the same integirty rules, they will drift. Since each of the users
will have a different data model, how would you write integrity
constraints anyway? Johnny has a rule that (age > 18) and Sally has
the rule that (age >= 18) and they are in the same Monster database.sql

Monday, March 19, 2012

Is there system tray icon of Sql2005

There is a system tray icon in Sql 2000, but I can find wiht Sql2005.
Is there system tray icon of Sql2005?
ad (flying@.wfes.tcc.edu.tw) writes:
> There is a system tray icon in Sql 2000, but I can find wiht Sql2005.
> Is there system tray icon of Sql2005?
Yes, at http://www.sqldbatips.com/showarticle.asp?ID=46. No, it does not
come with SQL 2005.
By the way, SQL 2005 questions are best asked in the SQL 2005 newsgroups.
Access information here: http://go.microsoft.com/fwlink/?linkid=31765.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
|||Note that this does not currently work against the June CTP (well not for me
anyway). There will be an updated version coming out soon (as soon as I find
some time) which will be local server only (since this seems to be the major
use of it - to manage local services) which should make it a good deal
faster also.
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns96CE11BB5B86Yazorman@.127.0.0.1...
> ad (flying@.wfes.tcc.edu.tw) writes:
> Yes, at http://www.sqldbatips.com/showarticle.asp?ID=46. No, it does not
> come with SQL 2005.
> By the way, SQL 2005 questions are best asked in the SQL 2005 newsgroups.
> Access information here: http://go.microsoft.com/fwlink/?linkid=31765.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techinf...2000/books.asp
>

Is there system tray icon of Sql2005

There is a system tray icon in Sql 2000, but I can find wiht Sql2005.
Is there system tray icon of Sql2005?ad (flying@.wfes.tcc.edu.tw) writes:
> There is a system tray icon in Sql 2000, but I can find wiht Sql2005.
> Is there system tray icon of Sql2005?
Yes, at http://www.sqldbatips.com/showarticle.asp?ID=46. No, it does not
come with SQL 2005.
By the way, SQL 2005 questions are best asked in the SQL 2005 newsgroups.
Access information here: http://go.microsoft.com/fwlink/?linkid=31765.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Note that this does not currently work against the June CTP (well not for me
anyway). There will be an updated version coming out soon (as soon as I find
some time) which will be local server only (since this seems to be the major
use of it - to manage local services) which should make it a good deal
faster also.
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns96CE11BB5B86Yazorman@.127.0.0.1...
> ad (flying@.wfes.tcc.edu.tw) writes:
> Yes, at http://www.sqldbatips.com/showarticle.asp?ID=46. No, it does not
> come with SQL 2005.
> By the way, SQL 2005 questions are best asked in the SQL 2005 newsgroups.
> Access information here: http://go.microsoft.com/fwlink/?linkid=31765.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp
>

Is there system tray icon of Sql2005

There is a system tray icon in Sql 2000, but I can find wiht Sql2005.
Is there system tray icon of Sql2005?ad (flying@.wfes.tcc.edu.tw) writes:
> There is a system tray icon in Sql 2000, but I can find wiht Sql2005.
> Is there system tray icon of Sql2005?
Yes, at http://www.sqldbatips.com/showarticle.asp?ID=46. No, it does not
come with SQL 2005.
By the way, SQL 2005 questions are best asked in the SQL 2005 newsgroups.
Access information here: http://go.microsoft.com/fwlink/?linkid=31765.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp|||Note that this does not currently work against the June CTP (well not for me
anyway). There will be an updated version coming out soon (as soon as I find
some time) which will be local server only (since this seems to be the major
use of it - to manage local services) which should make it a good deal
faster also.
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns96CE11BB5B86Yazorman@.127.0.0.1...
> ad (flying@.wfes.tcc.edu.tw) writes:
>> There is a system tray icon in Sql 2000, but I can find wiht Sql2005.
>> Is there system tray icon of Sql2005?
> Yes, at http://www.sqldbatips.com/showarticle.asp?ID=46. No, it does not
> come with SQL 2005.
> By the way, SQL 2005 questions are best asked in the SQL 2005 newsgroups.
> Access information here: http://go.microsoft.com/fwlink/?linkid=31765.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
>

Monday, March 12, 2012

Is there sp_helptext for tables

Hello Everybody, Please help me out:

Is there a system stored procedure for retrieving the sql statement that created a table.

I know i can use sp_helptext for views etc; i want the equivalent for tables.

sp_columns is not adequate either.

please help! thanks in advance;)sp_help will return all the columns of a table.|||sp_help will return all the columns of a table.
Hi Blindman,

I ran exec sp_help tblcustomers and i got:

Name: tblcustomers
Owner: dbo
Type: user table
Created_datetime: 4/18/2007 2:26:12 PM

Am i missing something??

Friday, February 24, 2012

Is there any method to back up the database to place outside of the local server system?

Hi, all experts here,

Thank you very much for your kind attention.

I am wondering if we could back up the databases to any place outside of the local server system? As I found, we can only back up the database to the local server system, so we have needs to share databases on network places. Is there any method to back up the database on network place rather than first of all I have to back up the database on a local server system, then copy it to the network place, that just sounds really inconvenient.

Thanks a lot in advance for your help and I am looking forward to hearing from you shortly.

With best regards,

Yours sincerely,

Yes, you can use script

Code Snippet

BACKUP DATABASE [DB_NAME]
TO DISK = '\\FileServer\Backups\file_name.bak'
WITH INIT -- overwrite anything

GO

I think in SQL2005 SP2, you can specify Network Path for backup as well

Otherwise, try Maintainence Plan/Wizard as well (that's what we use)

SSMS -> Management -> create a plan -> Add "Back Up Database Task", and put the network path manually under "Folder" , under "Create a backup file for every database"

|||You'll need to make sure the service that runs mssql has access to the network drive where you are going to be placing the backup files.|||

Hi, thank you all very much for your very kind advices and help. It's been very helpful.

With best regards,

Yours sincerely,

|||

No problem at all, we are all here to help

don't forget to mark the answer to your question, so the thread is considered "resolved"

Monday, February 20, 2012

Is there an issue running SQL 2000 on a 2003 R2 64 bit operating system?

I am trying to istall SQL 2000 on a new Server. The server is running 2003 R2 Standard x64 addition. When I try this I get an error message that says

file is valid but not for this machine type?

Are these just not compatible?I had SQL 2000 running under Windows 2003 R3 and it was fine. You have to force the setup NOT to check for machine type:

<cd drive/network drive>:\setup.exe /force

Before you install, run setup.exe /? and get the command line options and make sure that FORCE and DO NOT CHECK MACHINE TYPE options are available and used.

Also, check out the following link which gives information on SQL 2000 and the SP level needed to run under x64: http://www.sqlmanager.net/en/news/sql/mssql/683

Mark|||Here is another link from Microsoft concerning x64 support for SQL 2003 in SP4: http://www.microsoft.com/sql/prodinfo/previousversions/sp4.mspx

Mark