473,322 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Implementing DataBase concepts using C

I've been assigned a task to carry out the following exercise using C
code:

Functional Dependencies & Normalization:
a. Specifying & testing Functional Dependencies on a relation
b. Normalization based on Functional Dependencies
c. Testing for lossless decomposition
d. Testing for dependency preservation

For this I've taken a books database that consists of the following
attributes:
ISBN,Title,Author,Published year,Publisher,Price,Genre,Pages,country.

the functional dependencies present in this relation are:
ISBN -Title,Author,Published
year,Publisher,Price,Genre,Pages,country.
Title -ISBN,Author,Published
year,Publisher,Price,Genre,Pages,country.
Author -Country
Author -publisher

could anyone please tell me how to proceed with it in the first step?
i've no clue about how to implement database concepts using C
language.How do i specify the dependencies?how do i test them using C?
etc etc.

could anyone please help me out with the code?

Jun 27 '08 #1
4 4335
On Apr 21, 11:33*am, Shravani <gpap...@gmail.comwrote:
I've been assigned a task to carry out the following exercise using C
code:

Functional Dependencies & Normalization:
a. * * *Specifying & testing Functional Dependencies on a relation
b. * * *Normalization based on Functional Dependencies
c. * * *Testing for lossless decomposition
d. * * *Testing for dependency preservation

For this I've taken a books database that consists of the following
attributes:
ISBN,Title,Author,Published year,Publisher,Price,Genre,Pages,country.

the functional dependencies present in this relation are:
ISBN -Title,Author,Published
year,Publisher,Price,Genre,Pages,country.
Title -ISBN,Author,Published
year,Publisher,Price,Genre,Pages,country.
Author -Country
Author -publisher

could anyone please tell me how to proceed with it in the first step?
i've no clue about how to implement database concepts using C
language.How do i specify the dependencies?how do i test them using C?
etc etc.

could anyone please help me out with the code?
You probably want news:comp.programming instead of news:comp.lang.c
If you get some C questions during your quest, you might ask them
here.
Perhaps one or more of these links might prove helpful:
http://pages.cs.wisc.edu/~dbbook/ope...joenormal.html
http://portal.acm.org/citation.cfm?i...=portal&dl=ACM
http://www.cs.umbc.edu/461/current/burt/lectures/lec14/
http://www.cs.umd.edu/class/spring20...NotesFeb20.ppt
http://www.businessanalysisbooks.com/1423900839.html
http://www.cs.sfu.ca/CC/354/zaiane/m...r6/node11.html
Jun 27 '08 #2
Shravani wrote:

could anyone please tell me how to proceed with it in the first step?
i've no clue about how to implement database concepts using C
language.How do i specify the dependencies?how do i test them using C?
etc etc.
Is your assignment to implement a relational database from first
principles? Or is it to use an existing database product with a C API?
The first is non-trivial. If that's it, then as Dann said you should
start with comp.programming to develop the data structures and
algorithms as a higher level. Then when you implement them in C, we can
help.


Brian
Jun 27 '08 #3
On Apr 21, 1:21*pm, "Default User" <defaultuse...@yahoo.comwrote:
Shravani wrote:
could anyone please tell me how to proceed with it in the first step?
i've no clue about how to implement database concepts using C
language.How do i specify the dependencies?how do i test them using C?
etc etc.

Is your assignment to implement a relational database from first
principles?
To create all of the database concepts listed, a disk based hash table
should be sufficient.

All primary key and foreign key constraints can be formulated using
exact matches (and range searches are not correct for this purpose so
having a B-tree would be nice but is not a requirement to complete the
assignment).
Or is it to use an existing database product with a C API?
The first is non-trivial. If that's it, then as Dann said you should
start with comp.programming to develop the data structures and
algorithms as a higher level. Then when you implement them in C, we can
help.
Something like this would probably be a big help:
http://www.koders.com/info.aspx?c=Pr...KW4SXQQRKL85TB
Jun 27 '08 #4
On Apr 21, 4:50*pm, user923005 <dcor...@connx.comwrote:
On Apr 21, 1:21*pm, "Default User" <defaultuse...@yahoo.comwrote:
Shravani wrote:
could anyone please tell me how to proceed with it in the first step?
i've no clue about how to implement database concepts using C
language.How do i specify the dependencies?how do i test them using C?
etc etc.
Is your assignment to implement a relational database from first
principles?

To create all of the database concepts listed, a disk based hash table
should be sufficient.

All primary key and foreign key constraints can be formulated using
exact matches (and range searches are not correct for this purpose so
having a B-tree would be nice but is not a requirement to complete the
assignment).
Or is it to use an existing database product with a C API?
The first is non-trivial. If that's it, then as Dann said you should
start with comp.programming to develop the data structures and
algorithms as a higher level. Then when you implement them in C, we can
help.

Something like this would probably be a big help:http://www.koders.com/info.aspx?c=Pr...XPMKEWFKW4SXQQ...
The listed source does not have updates or deletes programmed.

On the other hand, this thing is almost a database:
http://www.garret.ru/~knizhnik/post/readme.htm

It even has transactions implemented.
Jun 27 '08 #5

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

Similar topics

15
by: Agoston Bejo | last post by:
Hi, I'm having trouble with implementing some constraints on the database level. An example: --Table A(AID, BID ref. B.BID, ATXT) --Table B(BID, CID ref. C.CID) --Table C(CID) upon insertion...
70
by: Rajan | last post by:
Hi, I am trying to simulate a memcpy like this void* mem_cpy(void* dest, void* src, int bytes) { dest = malloc(bytes); } Now if I want to copy the bytes from src to dest, how do I copy these...
1
by: Learner | last post by:
Hi there, I have designed a three tier arichitecture(presentation, business and datalayer). I have used Shared keyword in all my DL methods inorder to make them available in my BL. I have...
27
by: Pete | last post by:
I'm doing exercise 8-2 from "Accelerated C++" where we're supposed to implement library algorithms, trying to minimize the number of iterator operations. I have two questions so far. First,...
20
by: W Karas | last post by:
Would the fear factor for concepts be slightly reduced if, instead of: concept C<typename T> { typename T::S; int T::mem(); int nonmem(); };
1
by: psbasha | last post by:
Hi , Whether Python supports all the OOPs concepts as other languages do (C++ and JAVA) a) Polymorphism : - Function overloading and Operator overloading - Function overridding
0
by: takveen | last post by:
The Topics Covered In This Book Are: Understanding the Oracle Environment; Understanding the Oracle Instance; Understanding the working of Oracle Instance; Understanding the Oracle Database; Oracle...
1
by: takveen | last post by:
The Topics Covered In This Book Are: Understanding the Oracle Environment; Understanding the Oracle Instance; Understanding the working of Oracle Instance; Understanding the Oracle Database; Oracle...
5
by: Gav | last post by:
I'm writing a windows application (using C# VS 2005 Pro) to access a MS SQL database and although it is working fine (up to now) I'm not sure I'm going about it in the best way. Can anybody point...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.