Showing posts with label developing. Show all posts
Showing posts with label developing. Show all posts

Sunday, March 25, 2012

Data security/filtering on field values

My team is developing a new software system that is replacing several
existing applications. The applications being replaced focus on billing and
customer relationship management.
Our company is an international corporation that serves a large number of
customers (hundreds of thousands) spread throughout the US and Canada. For
administrative and accounting reasons, we have divided the customers into
groups based on geographic region (Eastern, Central, and Western US, Canada)
.
Customers are also grouped within their Region into Service Areas.
Our new system requires that authorization be performed based on both the
roles of the user (basic RBAC) and on the set of data that the user is
authorized to view and manipulate.
For example, a customer service rep for the West region of the country
should only be able to see and work with customers that are located in the
West region – to this user, the rest of our customers are irrelevant. The
system should behave as though the only customers that exist are those
located in the region with which they work.
In addition, we need to set up non-geographic data filters, such as the
customer classification (similar to SIC code) and value fields such as
Salesperson.
The filtering of data must allow for both unions (“Or”) and intersection
s
(“And”) between different security settings; for instance, we must be ab
le to
support the following overlapping sets of data filters:
1) All customers in the “East” region and all customers with the
classification “Hospital”
2) All “East Hospital” customers (but no Hospitals outside of the East
region or East customers that are not Hospitals)
3) All customers in either the “East” or “West” regions, regardless
of
classification
We also need to support the concept of “Data Restrictions”, where the
default access to customers with a specific attribute is False unless a gran
t
is assigned.
We need a solution, whether it is a proven architectural approach or a
third-party technology, which will allow us to apply the defined data filter
s
at the lowest level of our application as possible with as little performanc
e
impact as possible. We would prefer to implement something in the database,
but if necessary we could implement it in the data access layer of our
software.
The solution should allow flexible definition of ‘securable attributes’
of a
customer, so that if an additional attributes are defined in the future we
don’t need to modify the database structure or recompile any code.
Questions:
1) Is there a standard or best-practice architectural approach to applying
the sort of security/filtering described above?
2) Are there any third-party tools or technologies that we could purchase
that would provide some or all of this functionality?
3) What sorts of approaches have been used before to address this type of
security requirement?
Thanks in advance,
GuyAs I flew above your text, that thing came in mind for me:
http://vyaskn.tripod.com/ row_level...as
es.htm
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Guy" <Guy@.discussions.microsoft.com> schrieb im Newsbeitrag
news:B4BD9CCC-1B6C-4B49-BEFA-49551E7F6167@.microsoft.com...
> My team is developing a new software system that is replacing several
> existing applications. The applications being replaced focus on billing
> and
> customer relationship management.
> Our company is an international corporation that serves a large number of
> customers (hundreds of thousands) spread throughout the US and Canada.
> For
> administrative and accounting reasons, we have divided the customers into
> groups based on geographic region (Eastern, Central, and Western US,
> Canada).
> Customers are also grouped within their Region into Service Areas.
> Our new system requires that authorization be performed based on both the
> roles of the user (basic RBAC) and on the set of data that the user is
> authorized to view and manipulate.
> For example, a customer service rep for the West region of the country
> should only be able to see and work with customers that are located in the
> West region - to this user, the rest of our customers are irrelevant. The
> system should behave as though the only customers that exist are those
> located in the region with which they work.
> In addition, we need to set up non-geographic data filters, such as the
> customer classification (similar to SIC code) and value fields such as
> Salesperson.
> The filtering of data must allow for both unions ("Or") and intersections
> ("And") between different security settings; for instance, we must be able
> to
> support the following overlapping sets of data filters:
> 1) All customers in the "East" region and all customers with the
> classification "Hospital"
> 2) All "East Hospital" customers (but no Hospitals outside of the East
> region or East customers that are not Hospitals)
> 3) All customers in either the "East" or "West" regions, regardless of
> classification
> We also need to support the concept of "Data Restrictions", where the
> default access to customers with a specific attribute is False unless a
> grant
> is assigned.
> We need a solution, whether it is a proven architectural approach or a
> third-party technology, which will allow us to apply the defined data
> filters
> at the lowest level of our application as possible with as little
> performance
> impact as possible. We would prefer to implement something in the
> database,
> but if necessary we could implement it in the data access layer of our
> software.
> The solution should allow flexible definition of 'securable attributes' of
> a
> customer, so that if an additional attributes are defined in the future we
> don't need to modify the database structure or recompile any code.
> Questions:
> 1) Is there a standard or best-practice architectural approach to applying
> the sort of security/filtering described above?
> 2) Are there any third-party tools or technologies that we could purchase
> that would provide some or all of this functionality?
> 3) What sorts of approaches have been used before to address this type of
> security requirement?
> Thanks in advance,
> Guysql

Tuesday, March 20, 2012

Data regions are not allowed inside a table detail ..

Developing using Visual Studio .Net (2003).
I have a simple table on my report showing data from a dataset. Works
fine. Displays a bunch of records.
One of the values from my dataset is a percentage value (integer from 0
to 100). I'm attempting to illustrate this using a chart. So I'm
attempting to put a chart in the table detail row. It doesn't like me
doing this, though. I get a build error:
"The chart 'chartx' is contained inside a table detail row. Data
regions are not allowed inside a table detail...".
Is there a way to do what I'm attempting with Visual Studio .Net (i.e.
SQL Server 2000 Reporting Services)? I know it can be done with Visual
Studio 2005, as that just makes you define a group expression when
attempting to "use a data region in a list".
Any help/info would be great.
Thanks.Have you tried putting it inside a matrix?
I tried putting a chart inside a table detail row, but vs didn't let me
do it "Cannot place a chart at this location in a table"
However, putting it inside a matrix works just fine.
eamon wrote:
> Developing using Visual Studio .Net (2003).
> I have a simple table on my report showing data from a dataset. Works
> fine. Displays a bunch of records.
> One of the values from my dataset is a percentage value (integer from 0
> to 100). I'm attempting to illustrate this using a chart. So I'm
> attempting to put a chart in the table detail row. It doesn't like me
> doing this, though. I get a build error:
> "The chart 'chartx' is contained inside a table detail row. Data
> regions are not allowed inside a table detail...".
> Is there a way to do what I'm attempting with Visual Studio .Net (i.e.
> SQL Server 2000 Reporting Services)? I know it can be done with Visual
> Studio 2005, as that just makes you define a group expression when
> attempting to "use a data region in a list".
> Any help/info would be great.
> Thanks.sql

Thursday, March 8, 2012

Data mining licensing requirements

I am developing a data mining solution for a client using SQL 2005.

Do they have to purchase a separate license for a replicated environment? Like a hot site....

Thanks, ]

BI Joe

Data Mining is part of SQL Server and has the same licensing requirements. E.g. if it's on the web, than you need the per processor license, etc.

I'm not an expert on all of the licensing issues, but, in short, there's no difference between using the relational engine, reporting services, analysis services, etc - the licensing requirements are the same.

Friday, February 17, 2012

Data handling capabilities of SQL Server 2000 Enterprise Edition

I am developing an intranet portal on Microsoft .NET platform and using
SQL Server 2000 Enterprise Edition as the database.
I would like to know the maximum size to which the database can grow to
in SQL Server as many tables in the database will have over 1 million
records with each row having images, documents stored in it.
The server housing SQL Server is Dell PowerEdge 2950 with single CPU
dual Core Xeon 4MB Cache 3.0Ghz, 2GB memory, 73GB disk space and RAID 5.In reality the size of the database is limited by your disk space.
According to BOL the database size can be up to 1,048,516 TB (depending
on the edition that you have). If you meant to ask at what size the
database's performance will not be good, then that depends on the
database's structure, the quality of the code that works with the
database, the number of concurrent users and other factors much more
then it depends on the database's size.
Adi
ram2811 wrote:
> I am developing an intranet portal on Microsoft .NET platform and using
> SQL Server 2000 Enterprise Edition as the database.
> I would like to know the maximum size to which the database can grow to
> in SQL Server as many tables in the database will have over 1 million
> records with each row having images, documents stored in it.
> The server housing SQL Server is Dell PowerEdge 2950 with single CPU
> dual Core Xeon 4MB Cache 3.0Ghz, 2GB memory, 73GB disk space and RAID 5.|||"ram2811" <ram2811@.gmail.com> wrote in message
news:1163533063.339418.203140@.i42g2000cwa.googlegroups.com...
>I am developing an intranet portal on Microsoft .NET platform and using
> SQL Server 2000 Enterprise Edition as the database.
> I would like to know the maximum size to which the database can grow to
> in SQL Server as many tables in the database will have over 1 million
> records with each row having images, documents stored in it.
> The server housing SQL Server is Dell PowerEdge 2950 with single CPU
> dual Core Xeon 4MB Cache 3.0Ghz, 2GB memory, 73GB disk space and RAID 5.
In this case it sounds like the max size will be 73 GB.
I'd suggest NOT storing images in the database, but that's a different
debate.
btw, 1 million records is generally considered, "small" these days.
>|||thanks for the reply
Adi wrote:
> In reality the size of the database is limited by your disk space.
> According to BOL the database size can be up to 1,048,516 TB (depending
> on the edition that you have). If you meant to ask at what size the
> database's performance will not be good, then that depends on the
> database's structure, the quality of the code that works with the
> database, the number of concurrent users and other factors much more
> then it depends on the database's size.
> Adi
> ram2811 wrote:
> > I am developing an intranet portal on Microsoft .NET platform and using
> > SQL Server 2000 Enterprise Edition as the database.
> > I would like to know the maximum size to which the database can grow to
> > in SQL Server as many tables in the database will have over 1 million
> > records with each row having images, documents stored in it.
> > The server housing SQL Server is Dell PowerEdge 2950 with single CPU
> > dual Core Xeon 4MB Cache 3.0Ghz, 2GB memory, 73GB disk space and RAID 5.

Data handling capabilities of SQL Server 2000 Enterprise Edition

I am developing an intranet portal on Microsoft .NET platform and using
SQL Server 2000 Enterprise Edition as the database.
I would like to know the maximum size to which the database can grow to
in SQL Server as many tables in the database will have over 1 million
records with each row having images, documents stored in it.
The server housing SQL Server is Dell PowerEdge 2950 with single CPU
dual Core Xeon 4MB Cache 3.0Ghz, 2GB memory, 73GB disk space and RAID 5.
In reality the size of the database is limited by your disk space.
According to BOL the database size can be up to 1,048,516 TB (depending
on the edition that you have). If you meant to ask at what size the
database's performance will not be good, then that depends on the
database's structure, the quality of the code that works with the
database, the number of concurrent users and other factors much more
then it depends on the database's size.
Adi
ram2811 wrote:
> I am developing an intranet portal on Microsoft .NET platform and using
> SQL Server 2000 Enterprise Edition as the database.
> I would like to know the maximum size to which the database can grow to
> in SQL Server as many tables in the database will have over 1 million
> records with each row having images, documents stored in it.
> The server housing SQL Server is Dell PowerEdge 2950 with single CPU
> dual Core Xeon 4MB Cache 3.0Ghz, 2GB memory, 73GB disk space and RAID 5.
|||"ram2811" <ram2811@.gmail.com> wrote in message
news:1163533063.339418.203140@.i42g2000cwa.googlegr oups.com...
>I am developing an intranet portal on Microsoft .NET platform and using
> SQL Server 2000 Enterprise Edition as the database.
> I would like to know the maximum size to which the database can grow to
> in SQL Server as many tables in the database will have over 1 million
> records with each row having images, documents stored in it.
> The server housing SQL Server is Dell PowerEdge 2950 with single CPU
> dual Core Xeon 4MB Cache 3.0Ghz, 2GB memory, 73GB disk space and RAID 5.
In this case it sounds like the max size will be 73 GB.
I'd suggest NOT storing images in the database, but that's a different
debate.
btw, 1 million records is generally considered, "small" these days.

>
|||thanks for the reply
Adi wrote:[vbcol=seagreen]
> In reality the size of the database is limited by your disk space.
> According to BOL the database size can be up to 1,048,516 TB (depending
> on the edition that you have). If you meant to ask at what size the
> database's performance will not be good, then that depends on the
> database's structure, the quality of the code that works with the
> database, the number of concurrent users and other factors much more
> then it depends on the database's size.
> Adi
> ram2811 wrote:

Data handling capabilities of SQL Server 2000 Enterprise Edition

I am developing an intranet portal on Microsoft .NET platform and using
SQL Server 2000 Enterprise Edition as the database.
I would like to know the maximum size to which the database can grow to
in SQL Server as many tables in the database will have over 1 million
records with each row having images, documents stored in it.
The server housing SQL Server is Dell PowerEdge 2950 with single CPU
dual Core Xeon 4MB Cache 3.0Ghz, 2GB memory, 73GB disk space and RAID 5.In reality the size of the database is limited by your disk space.
According to BOL the database size can be up to 1,048,516 TB (depending
on the edition that you have). If you meant to ask at what size the
database's performance will not be good, then that depends on the
database's structure, the quality of the code that works with the
database, the number of concurrent users and other factors much more
then it depends on the database's size.
Adi
ram2811 wrote:
> I am developing an intranet portal on Microsoft .NET platform and using
> SQL Server 2000 Enterprise Edition as the database.
> I would like to know the maximum size to which the database can grow to
> in SQL Server as many tables in the database will have over 1 million
> records with each row having images, documents stored in it.
> The server housing SQL Server is Dell PowerEdge 2950 with single CPU
> dual Core Xeon 4MB Cache 3.0Ghz, 2GB memory, 73GB disk space and RAID 5.|||"ram2811" <ram2811@.gmail.com> wrote in message
news:1163533063.339418.203140@.i42g2000cwa.googlegroups.com...
>I am developing an intranet portal on Microsoft .NET platform and using
> SQL Server 2000 Enterprise Edition as the database.
> I would like to know the maximum size to which the database can grow to
> in SQL Server as many tables in the database will have over 1 million
> records with each row having images, documents stored in it.
> The server housing SQL Server is Dell PowerEdge 2950 with single CPU
> dual Core Xeon 4MB Cache 3.0Ghz, 2GB memory, 73GB disk space and RAID 5.
In this case it sounds like the max size will be 73 GB.
I'd suggest NOT storing images in the database, but that's a different
debate.
btw, 1 million records is generally considered, "small" these days.

>|||thanks for the reply
Adi wrote:[vbcol=seagreen]
> In reality the size of the database is limited by your disk space.
> According to BOL the database size can be up to 1,048,516 TB (depending
> on the edition that you have). If you meant to ask at what size the
> database's performance will not be good, then that depends on the
> database's structure, the quality of the code that works with the
> database, the number of concurrent users and other factors much more
> then it depends on the database's size.
> Adi
> ram2811 wrote:

Data from two tables

I am developing a system that tracks phonecall usage. I have an sql server db that includes two tables which include (amongst others) the fields below them:

phone_emp_mast (contains user info.)
-------
Account_Code
First_Name
Last_Name
Department

detail (contains info on individual calls)
---
Account_Code
Duration

I want to write a query that returns the account_code, first_name, last_name, no. of calls made, avg. length of call, max. length of call and total minutes of calls for each employee in a given department

I tried the following query:

SELECT d.ACCOUNT_CODE, p.LAST_NAME, p.FIRST_NAME, COUNT(*) AS NoOfCalls, AVG(d.DURATION) AS AverageLength, MAX(d.DURATION) AS MaxCall, SUM(d.DURATION) AS TotalMins

FROM DETAIL d CROSS JOIN
PHONE_EMP_MAST p

WHERE (d.ACCOUNT_CODE = d.ACCOUNT_CODE) AND (p.DEPARTMENT = 'deptname')
GROUP BY d.ACCOUNT_CODE;

and it keeps returning the error message:
Column p.last_name is invalid in the select list because it is not contained in either an aggregate function or the group by clause

Can anyone figure out a better way of doing this? please?The GROUP BY clause has to specify every column that was not aggregated in the SELECT clause - irritatingly!

SELECT d.ACCOUNT_CODE, p.LAST_NAME, p.FIRST_NAME, COUNT(*) AS NoOfCalls, AVG(d.DURATION) AS AverageLength, MAX(d.DURATION) AS MaxCall, SUM(d.DURATION) AS TotalMins

FROM DETAIL d CROSS JOIN
PHONE_EMP_MAST p

WHERE (d.ACCOUNT_CODE = d.ACCOUNT_CODE) AND (p.DEPARTMENT = 'deptname')
GROUP BY d.ACCOUNT_CODE, p.LAST_NAME, p.FIRST_NAME;|||Thanks for that, I have used the following select statement and it is working perfectly. However I now have a new problem...

SELECT d.ACCOUNT_CODE, p.LAST_NAME, p.FIRST_NAME, COUNT(*) AS NoOfCalls, AVG(d.DURATION) AS AverageLength, MAX(d.DURATION) AS MaxCall,
SUM(d.DURATION) AS TotalMins
FROM DETAIL d INNER JOIN
PHONE_EMP_MAST p ON d.ACCOUNT_CODE = p.ACCOUNT_CODE
WHERE (p.DEPARTMENT = 'deptname')
GROUP BY d.ACCOUNT_CODE, p.LAST_NAME, p.FIRST_NAME
ORDER BY p.LAST_NAME;

I now need to get a count of the number of fields in the detail table where the duration is less than a minute... can anyone suggest a way of doing this. I tried putting in the bits between the stars

SELECT d.ACCOUNT_CODE, p.LAST_NAME, p.FIRST_NAME, COUNT(*) AS NoOfCalls, AVG(d.DURATION) AS AverageLength, MAX(d.DURATION) AS MaxCall,
SUM(d.DURATION) AS TotalMins,
***(SELECT COUNT(d.DURATION)
WHERE duration < 1) AS NoOfCallsLessThan1***
FROM DETAIL d INNER JOIN
PHONE_EMP_MAST p ON d.ACCOUNT_CODE = p.ACCOUNT_CODE
WHERE (p.DEPARTMENT = 'operations admin')
GROUP BY d.ACCOUNT_CODE, p.LAST_NAME, p.FIRST_NAME, ***d.DURATION, p.ACCOUNT_CODE***
ORDER BY p.LAST_NAME

but when I do this it returns all the calls individually since instead of only returning 1 row for each account code... anyone have any suggestions or is there anything you don't understand about my explanation?

Thanks in advance!|||You need to add a CASE (or DECODE if using Oracle pre-9i) expression in your first query:

SELECT d.ACCOUNT_CODE, p.LAST_NAME, p.FIRST_NAME, COUNT(*) AS NoOfCalls, AVG(d.DURATION) AS AverageLength, MAX(d.DURATION) AS MaxCall,
SUM(d.DURATION) AS TotalMins,
SUM( CASE WHEN d.duration < 1 THEN 1 ELSE 0 END ) shortcalls
FROM DETAIL d INNER JOIN
PHONE_EMP_MAST p ON d.ACCOUNT_CODE = p.ACCOUNT_CODE
WHERE (p.DEPARTMENT = 'deptname')
GROUP BY d.ACCOUNT_CODE, p.LAST_NAME, p.FIRST_NAME
ORDER BY p.LAST_NAME;

The DECODE version would be:

SUM( DECODE( SIGN( d.duration-1), -1, 1, 0 ) ) shortcalls|||I'm actually using SQL server... do you know if SQL server supports this function?|||Originally posted by kieranodwyer
I'm actually using SQL server... do you know if SQL server supports this function?
Not DECODE - that's Oracle's own, but CASE is ANSI standard so I imagine that at least the latest version of SQL Server supports it.|||Thanks alot Tony... Thats working perfectly!