Showing posts with label requirement. Show all posts
Showing posts with label requirement. Show all posts

Thursday, March 8, 2012

Database Diagram Migration

Hi,

I got information how to make work of Database diagrams in SQL Server2005, But i have a requirement that the DB diagram which i was using in Sql2000 can be transferred to SQL2005. Is it possible?

is there any link showing the details of this issue in BOL?

Mat

Hi Mat,

This is the pointer to the topic that describes how to update your database diagrams - http://msdn2.microsoft.com/en-us/library/ms171975(VS.80).aspx.

Cheers,
Bill Ramos [MSFT]

Database Diagram Migration

Hi,

I got information how to make work of Database diagrams in SQL Server2005, But i have a requirement that the DB diagram which i was using in Sql2000 can be transferred to SQL2005. Is it possible?

is there any link showing the details of this issue in BOL?

Mat

Hi Mat,

This is the pointer to the topic that describes how to update your database diagrams - http://msdn2.microsoft.com/en-us/library/ms171975(VS.80).aspx.

Cheers,
Bill Ramos [MSFT]

Saturday, February 25, 2012

Database design question

I working on a project that will let users essentially create design and requirement documents online and keep the information stored in a database.
I was thinking that the model would be similar to that of a book online.
I was thinking the basic schema would be something like
Table - Project
Table - Author.
Table - Topic
Table - Sub Topic
A project can have many topics, A project can have many authors etc.
A topic can have many sub topics etc.
So I was wondering if anyone knew of some sample schemas that may support that functionality.

Try this link and download the PPT slide to get started. You may not need four tables because it is files and association. Hope this helps.
http://wings.buffalo.edu/mgmt/courses/mgtsand/data.html

|||Thanks. I was actually looking for a sample schema to see what other tables etc were included as opposed to design concepts.
The examples in the link you provided are good but I was looking for something more specific. Such as if I was going to build an online
store, I would want to see a sample database from another online store to see how/what data is stored.
Thanks,
|||

SQL Server 2000 beginner's Guide by Dusan Petkovic has a project database and it is one of the better SQL Server books for Developers. But I would look at Pubs database to get started it is only nine tables so it will be easy to modify the create table statement. Hope this helps.

database design question

Hi. I have a new OLTP database requirement, and was wondering what columns
do some of you use in your db design for primary keys, since identity
columns can't really be used for this? I was thinking of using the select
convert(int, convert(varbinary, newid())) to insert. Any drawbacks to this?
Other suggestions would be appreciated. Thanks.
Alex IvascuWhy are you saying that identity cannot be used for primary keys? I would estimate that perhaps 95%
of the SQL Server population who uses surrogate keys uses identity. And indeed, identity will find
its way into the next ANSI standard.
Having said that, you might want to read Joe Celko's posts regarding identity, even though many
points are inaccurate. So, if you do that, you should also read a good response to that (one from
Tony Rogerson, for instance). You can search the archives using the link at the bottom of my URL.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"alex ivascu" <alexdivascu@.sbcglobalNO.SPAMnet> wrote in message
news:IH0lb.2145$e56.174@.newssvr25.news.prodigy.com...
> Hi. I have a new OLTP database requirement, and was wondering what columns
> do some of you use in your db design for primary keys, since identity
> columns can't really be used for this? I was thinking of using the select
> convert(int, convert(varbinary, newid())) to insert. Any drawbacks to this?
> Other suggestions would be appreciated. Thanks.
> Alex Ivascu
>
>|||Hi, Tibor
Look, I am not lawyer of Celko and I agree with you that some his posts are
inaccurate.
Just yesterday I faced the problem where I was need to update the column
that is PK with Identity property.
At beginining our business logic did not allow to do such things but as you
know, came a new requirement of production in our company.
I think we falled in these 5 % that you estimated that should be used
identity property for promary key .
"Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
wrote in message news:u$ADar5lDHA.2528@.TK2MSFTNGP12.phx.gbl...
> Why are you saying that identity cannot be used for primary keys? I would
estimate that perhaps 95%
> of the SQL Server population who uses surrogate keys uses identity. And
indeed, identity will find
> its way into the next ANSI standard.
> Having said that, you might want to read Joe Celko's posts regarding
identity, even though many
> points are inaccurate. So, if you do that, you should also read a good
response to that (one from
> Tony Rogerson, for instance). You can search the archives using the link
at the bottom of my URL.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at: http://groups.google.com/groups?oi=djq&as
ugroup=microsoft.public.sqlserver
>
> "alex ivascu" <alexdivascu@.sbcglobalNO.SPAMnet> wrote in message
> news:IH0lb.2145$e56.174@.newssvr25.news.prodigy.com...
> > Hi. I have a new OLTP database requirement, and was wondering what
columns
> > do some of you use in your db design for primary keys, since identity
> > columns can't really be used for this? I was thinking of using the
select
> > convert(int, convert(varbinary, newid())) to insert. Any drawbacks to
this?
> > Other suggestions would be appreciated. Thanks.
> >
> > Alex Ivascu
> >
> >
> >
>|||>> was wondering what columns do some of you use in your db design for
primary keys, <<
There is no "magic, one-size-fits-all, universal" answer. Designing a
database is hard work! So, for each and every individual table:
1) Is there an ISO standard?
2) Is there a national standard?
3) Is there an industry standard?
Examples: GTIN for retail, VIN for vehicles, ISBN for books and
publications.
Other questions to ask, if you have to invent a code:
1) Will a human being input it? So, does it need an easy syntax
(airport codes)? Does it need a check digit(ISBN)? What kind of check
digit algorithm?
2) How do I verifiy it in the reality represented in my data model?
Internally or with a trusted external source?
External: government tax numbers. Internal: ISO tire sizes (155R15 =155 cm width, Radial construction, 15 inch diameter; verify with a ruler
and your eyes).
I have four chapers on designing codes in DATA & DATABASES which you
might want to read.
--CELKO--
=========================== Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

database design question

Hi. I have a new OLTP database requirement, and was wondering what columns
do some of you use in your db design for primary keys, since identity
columns can't really be used for this? I was thinking of using the select
convert(int, convert(varbinary, newid())) to insert. Any drawbacks to this?
Other suggestions would be appreciated. Thanks.
Alex IvascuIn article <8I0lb.2146$f86.1093@.newssvr25.news.prodigy.com>,
alexdivascu@.sbcglobalNO.SPAMnet said...
> Hi. I have a new OLTP database requirement, and was wondering what columns
> do some of you use in your db design for primary keys, since identity
> columns can't really be used for this? I was thinking of using the select
> convert(int, convert(varbinary, newid())) to insert. Any drawbacks to this?
> Other suggestions would be appreciated. Thanks.
Why not just use a GUID?|||I was thinking about storing it as an int... But, I guess a varchar would
do just fine.
"Brad" <me@.privacy.net> wrote in message
news:MPG.19fe630a4934c2ea98b876@.news...
> In article <8I0lb.2146$f86.1093@.newssvr25.news.prodigy.com>,
> alexdivascu@.sbcglobalNO.SPAMnet said...
> > Hi. I have a new OLTP database requirement, and was wondering what
columns
> > do some of you use in your db design for primary keys, since identity
> > columns can't really be used for this? I was thinking of using the
select
> > convert(int, convert(varbinary, newid())) to insert. Any drawbacks to
this?
> > Other suggestions would be appreciated. Thanks.
> Why not just use a GUID?|||In article <G11lb.2155$%a6.1679@.newssvr25.news.prodigy.com>,
alexdivascu@.sbcglobalNO.SPAMnet said...
> "Brad" <me@.privacy.net> wrote in message
> news:MPG.19fe630a4934c2ea98b876@.news...
> > In article <8I0lb.2146$f86.1093@.newssvr25.news.prodigy.com>,
> > alexdivascu@.sbcglobalNO.SPAMnet said...
> > > Hi. I have a new OLTP database requirement, and was wondering what
> columns
> > > do some of you use in your db design for primary keys, since identity
> > > columns can't really be used for this? I was thinking of using the
> select
> > > convert(int, convert(varbinary, newid())) to insert. Any drawbacks to
> this?
> > > Other suggestions would be appreciated. Thanks.
> >
> > Why not just use a GUID?
> I was thinking about storing it as an int... But, I guess a varchar would
> do just fine.
Don't store it as a VarChar, store it as a UniqueIdentifier. It will save
space and index more efficiently.

Friday, February 24, 2012

DataBase Design Problem....

i have requirement in my project that i have a entiity called service that
has some basic attribute that we know for every service is same for eg
(service no,s name,service type ,sla) i have a table for service that includ
e
all the basic attributes , but the problem is every service can have some
advance attributes that are not know at design time for e.g new pc request
service has some advance attributes for this i have created two table one
that created advance attributes of a service ( table has , attribut name ,
data type e.g ) as a columns then second table has values for every advance
attribute uses
service table advance attribute table advance attribut value tab;e
service no att id att id
service name data type service no
service type name value
sno
etc
do v have better solution to this requiremnt
--
Regards
Adeel Alvi
92-300-2584597This is a design that we have also used wherein the main attributes are
placed in a regular table, but the unknown attributes are placed in another
table which has an FK (to the primary table), a AttributeName column, a
DataType column and a Value column. However, one issue you might have is on
the datatypes. You can either have 1 place holder column for each data type
and then place your values accordingly or always use (N)VARCHAR.
Incidentally, we are thinking of moving such a design into XML. Since these
are unknown attributes and can keep changing, we can model this as an XML
document and store it in the database and then use it for processing. If you
are using SQL Server 2005, XML is a native data type and you have XQuery to
use for processing. In SQL Server 2000, you have to get it to the
application tier to do the processing.
This is how we have modelled it, but others in this group might have other
ideas.
--
HTH,
SriSamp
Email: srisamp@.gmail.com
Blog: http://blogs.sqlxml.org/srinivassampath
URL: http://www32.brinkster.com/srisamp
"AdeelAlvi" <alvi_adeel@.hotmail.com> wrote in message
news:11060E87-5878-4AB1-B749-57B4AD7EFD89@.microsoft.com...
>i have requirement in my project that i have a entiity called service that
> has some basic attribute that we know for every service is same for eg
> (service no,s name,service type ,sla) i have a table for service that
> include
> all the basic attributes , but the problem is every service can have some
> advance attributes that are not know at design time for e.g new pc request
> service has some advance attributes for this i have created two table one
> that created advance attributes of a service ( table has , attribut name ,
> data type e.g ) as a columns then second table has values for every
> advance
> attribute uses
> service table advance attribute table advance attribut value tab;e
> service no att id att id
> service name data type service no
> service type name value
> sno
> etc
> do v have better solution to this requiremnt
> --
> Regards
> Adeel Alvi
> 92-300-2584597|||AdeelAlvi wrote:
> i have requirement in my project that i have a entiity called service that
> has some basic attribute that we know for every service is same for eg
> (service no,s name,service type ,sla) i have a table for service that incl
ude
> all the basic attributes , but the problem is every service can have some
> advance attributes that are not know at design time for e.g new pc request
> service has some advance attributes for this i have created two table one
> that created advance attributes of a service ( table has , attribut name ,
> data type e.g ) as a columns then second table has values for every advanc
e
> attribute uses
> service table advance attribute table advance attribut value tab;e
> service no att id att id
> service name data type service no
> service type name value
> sno
> etc
> do v have better solution to this requiremnt
> --
> Regards
> Adeel Alvi
> 92-300-2584597
The best solution is good business analysis during design followed by
good change control when you go live. In a corporate environment end
users are not the best people to decide how to add new attributes.
Users won't think about functional dependencies or validation or
encoding conventions or conformance to internal standards. Those things
are best left to database professionals. If your database development /
administration team takes ownership of change control then you can just
continue to add new columns in future.
If you are a software vendor then the considerations are different.
You'll probably want to add some "loosely-typed" structures such as you
have proposed.
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||dear SriSamp
we are using sql server 2000
if we use xml approach , then what will be the right approach beacuse then
advance attribute to a particular service will be defines one time and then
it will be used for transaction that we normally do in usuall senario first
creating the table then inserting the record in it . one thing to mentioned
is that we design custom forms also on our advance attribute that are used
for service request , for e.g new pc request service will have some advance
attribute like sno model manaufacture vender configuration etc that will be
used in new pc request form .
will you plz tell me the right approach to move ahead
--
Regards
Adeel Alvi
92-300-2584597
"SriSamp" wrote:

> This is a design that we have also used wherein the main attributes are
> placed in a regular table, but the unknown attributes are placed in anothe
r
> table which has an FK (to the primary table), a AttributeName column, a
> DataType column and a Value column. However, one issue you might have is o
n
> the datatypes. You can either have 1 place holder column for each data typ
e
> and then place your values accordingly or always use (N)VARCHAR.
> Incidentally, we are thinking of moving such a design into XML. Since thes
e
> are unknown attributes and can keep changing, we can model this as an XML
> document and store it in the database and then use it for processing. If y
ou
> are using SQL Server 2005, XML is a native data type and you have XQuery t
o
> use for processing. In SQL Server 2000, you have to get it to the
> application tier to do the processing.
> This is how we have modelled it, but others in this group might have other
> ideas.
> --
> HTH,
> SriSamp
> Email: srisamp@.gmail.com
> Blog: http://blogs.sqlxml.org/srinivassampath
> URL: http://www32.brinkster.com/srisamp
> "AdeelAlvi" <alvi_adeel@.hotmail.com> wrote in message
> news:11060E87-5878-4AB1-B749-57B4AD7EFD89@.microsoft.com...
>
>