Relational Database

Relational Database

am 16.02.2006 05:51:19 von Shwetabh

Hi,
I have a very simple question.
In what cases are relational databases necessary?
Are they really necessary in cases where only a
single type of query is to be performed based on one unique
field or can we just put all fields together in a single database
and just access them through that unique field?

Re: Relational Database

am 16.02.2006 09:08:40 von Erland Sommarskog

Shwetabh (shwetabhgoel@gmail.com) writes:
> I have a very simple question.
> In what cases are relational databases necessary?
> Are they really necessary in cases where only a
> single type of query is to be performed based on one unique
> field or can we just put all fields together in a single database
> and just access them through that unique field?

There are plenty of alternatievs to relational databases. There are object-
oriented databases, there are probably still some hierarchical databases
around, and there are systems that uses flat files.

But the relational databases dominate the market, probably because they
have proven to be very good at handling large amounts of data.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downlo ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books .mspx

Re: Relational Database

am 16.02.2006 11:35:44 von Shwetabh

Erland Sommarskog wrote:
> Shwetabh (shwetabhgoel@gmail.com) writes:
> > I have a very simple question.
> > In what cases are relational databases necessary?
> > Are they really necessary in cases where only a
> > single type of query is to be performed based on one unique
> > field or can we just put all fields together in a single database
> > and just access them through that unique field?
>
> There are plenty of alternatievs to relational databases. There are object-
> oriented databases, there are probably still some hierarchical databases
> around, and there are systems that uses flat files.
>
> But the relational databases dominate the market, probably because they
> have proven to be very good at handling large amounts of data.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downlo ads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books .mspx

Actually I am not asking about the alternatives. I just want to know
that are
relational databases really necessary for me if I require just a single
record
every time with no changes in structure, i.e I always need a record
based on
a unique value. Do i still need to create relations in the database or
am I better off
butting all fields in a single table and getting data from there.

Re: Relational Database

am 16.02.2006 12:40:05 von mooregr_deleteth1s

"Shwetabh" wrote in message
news:1140086144.048226.309750@g14g2000cwa.googlegroups.com.. .
> Actually I am not asking about the alternatives. I just want to know
> that are
> relational databases really necessary for me if I require just a single
> record
> every time with no changes in structure, i.e I always need a record
> based on
> a unique value. Do i still need to create relations in the database or
> am I better off
> butting all fields in a single table and getting data from there.

More accurately, it sounds like you're asking whether you need to normalize
your database.

In this case probably not and using something like SQL Server may be
overkill. But without knowing more details, I don't think any of us can say
for sure.


>

Re: Relational Database

am 16.02.2006 12:47:52 von David Portas

Shwetabh wrote:
> Actually I am not asking about the alternatives. I just want to know
> that are
> relational databases really necessary for me if I require just a single
> record
> every time with no changes in structure, i.e I always need a record
> based on
> a unique value. Do i still need to create relations in the database or
> am I better off
> butting all fields in a single table and getting data from there.

I don't think you asked the right question. It seems you aren't asking
whether to use relational database systems but whether to normalize
your database or not.

The main motivation to normalize data is to preserve its integrity when
it is updated. A secondary reason is that normalization can help
performance by ensuring you aren't maintaining redundant data. Given
those factors you ought to have a good excuse if you don't normalize.

--
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).as px
--

Re: Relational Database

am 17.02.2006 19:10:10 von Joe Celko

>> if I require just a single record every time with no changes in structure, i.e I always need a record based on a unique value. <<

There is nothing wrong with an indexed file, which is probably
supported by your host language. RDBMS is for large amounts of
inter-related data where integrity and portability are the big issue.

Re: Relational Database

am 19.02.2006 10:14:15 von Tony Rogerson

It depends what you are doing.

If its a single row ever then just store the information in a xml document
on the file system.

If you are storing multiple rows then I'd consider using a database system
because you then dont have to roll your own data access code, having said
that, .NET has a number of facilities to help you there.

Tony.

--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials


"Shwetabh" wrote in message
news:1140086144.048226.309750@g14g2000cwa.googlegroups.com.. .
>
> Erland Sommarskog wrote:
>> Shwetabh (shwetabhgoel@gmail.com) writes:
>> > I have a very simple question.
>> > In what cases are relational databases necessary?
>> > Are they really necessary in cases where only a
>> > single type of query is to be performed based on one unique
>> > field or can we just put all fields together in a single database
>> > and just access them through that unique field?
>>
>> There are plenty of alternatievs to relational databases. There are
>> object-
>> oriented databases, there are probably still some hierarchical databases
>> around, and there are systems that uses flat files.
>>
>> But the relational databases dominate the market, probably because they
>> have proven to be very good at handling large amounts of data.
>>
>> --
>> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>>
>> Books Online for SQL Server 2005 at
>> http://www.microsoft.com/technet/prodtechnol/sql/2005/downlo ads/books.mspx
>> Books Online for SQL Server 2000 at
>> http://www.microsoft.com/sql/prodinfo/previousversions/books .mspx
>
> Actually I am not asking about the alternatives. I just want to know
> that are
> relational databases really necessary for me if I require just a single
> record
> every time with no changes in structure, i.e I always need a record
> based on
> a unique value. Do i still need to create relations in the database or
> am I better off
> butting all fields in a single table and getting data from there.
>