• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on System Requirement Specification

 
Walter Tang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone

For the non-networking mode, is there any relation between the local database and the remote database? in another words, when user interacts with local database, should the remote database be updated as well?

Thank you very much for your help
 
Anton Golovin
Ranch Hand
Posts: 527
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Walter Tang:
Hello everyone

For the non-networking mode, is there any relation between the local database and the remote database? in another words, when user interacts with local database, should the remote database be updated as well?

Thank you very much for your help


IMHO, the only use case where a local database is to be used is when the program is installed on the machine from which the server runs in the company. The local and remote database should be one and the same.
 
Walter Tang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Anton Golovin:
The local and remote database should be one and the same.


I didnt get it. So, you mean, whenever the CSR changes the record in local database, the remote database should keep track of that? which means, in the local mode, we have to use network classes to connect to remote database? But that seems not allowed in the specification. Thank you for your reply.
 
Michal Charemza
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I understand for my assignment, B&S, the local database and remote database are entirly separate. Your program merely chooses where to get the database from, either locally, or through the network. There should never be any need to do both. To answer your inition questions:

For the non-networking mode, is there any relation between the local database and the remote database?


No.. in fact as you say this may be against the rules of the spec.

when user interacts with local database, should the remote database be updated as well?


No... I think that Anton meant by

The local and remote database should be one and the same.


is that on the "local" mode of the program will only usually be run on the computer that usually runs in "server" mode, thus using the same database.


Michal.
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Walter,
For the non-networking mode, is there any relation between the local database and the remote database?

Yes. The only relation is the magic cookie value. When a user choose a file, you have to make sure that it is a valid db file. You do that by reading the magic cookie value, and then compare it with the one on the server-the one given to you by sun. Some people store a hard copy of this magic cookie value, and hence they don't need to read it from the original database. Others read the magic cookie value and then store in a property file. You must do the comparasion; how you do it is up to you.

when user interacts with local database, should the remote database be updated as well?

No. Local and remote datbase files are seperate entities.
 
Walter Tang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Hanna Habashy:
Walter,

No. Local and remote datbase files are seperate entities.


Thank you very much, Hanna. Finally I solve the last question in my requirement analysis phase....phew...
 
Walter Tang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Michal Charemza:
As far as I understand for my assignment, B&S, the local database and remote database are entirly separate. Your program merely chooses where to get the database from, either locally, or through the network. There should never be any need to do both. To answer your inition questions:



is that on the "local" mode of the program will only usually be run on the computer that usually runs in "server" mode, thus using the same database.


Michal.


Yeah....that makes sense. Thank you, Michal
 
Walter Tang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Hanna Habashy:
Walter,

No. Local and remote datbase files are seperate entities.


Hi Hanna, I just have one more question on the magic value. Can I assume that all the database files have the same magic value. So even the assessor has different database file, I should be able to check if that is correct one by looking at its magic value. In my databaes file the value is 0013.(four bytes) Do you have the same value? Thank you ver much......
[ August 27, 2004: Message edited by: Walter Tang ]
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Walter,
Hi Hanna, I just have one more question on the magic value. Can I assume that all the database files have the same magic value. So even the assessor has different database file, I should be able to check if that is correct one by looking at its magic value. In my databaes file the value is 0013.(four bytes) Do you have the same value? Thank you ver much......

You cannot assume that all db files has the same mgic cookie value. The purpose of the magic cookie value is to ensure you that the db file adhers to the given schema specifications. For example, if one try to open a .doc file, he should get an error, because the magic cookie value is not there.
Every time a user attempts to open a local file, it must be checked to see if it is a valid db file by comparing its magic cookie value to the one the server operates on. I believe the tester will attempts that, otherwise the magic cookie value will be useless.
My magic cookie value was different than 0013. I think every version of the specification has differnt value.
 
Walter Tang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Hanna Habashy:
Walter,

You cannot assume that all db files has the same mgic cookie value. The purpose of the magic cookie value is to ensure you that the db file adhers to the given schema specifications. For example, if one try to open a .doc file, he should get an error, because the magic cookie value is not there.
Every time a user attempts to open a local file, it must be checked to see if it is a valid db file by comparing its magic cookie value to the one the server operates on. I believe the tester will attempts that, otherwise the magic cookie value will be useless.
My magic cookie value was different than 0013. I think every version of the specification has differnt value.


Thank you for your help........in my case, I only need to check if the magic cookie value is 0013. Otherwise, I throw an exception. RIght? I am still alittle bit confusion. Do I only need to check if the four bytes exist at beginning of the file or I should check if the magic value is exactly 0013
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Walter,
My specification says "4 byte numeric, magic cookie value. Identifies this as a data file" So, I read it as an interger. It was something like 513.
What did you mean by 0013.the leading zeros should not be there if you read as int. however, you should go back to your specification document.
 
Walter Tang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Hanna Habashy:
Walter,
My specification says "4 byte numeric, magic cookie value. Identifies this as a data file" So, I read it as an interger. It was something like 513.
What did you mean by 0013.the leading zeros should not be there if you read as int. however, you should go back to your specification document.


Thanks for your suggestion. Actually I read a byte at once and cast it to int. So that is 0013....I am not quit sure about that....I will be worry on this detail at implmentation phase,which is next two days.
 
Walter Tang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Hanna Habashy:
Walter,
My specification says "4 byte numeric, magic cookie value. Identifies this as a data file" So, I read it as an interger. It was something like 513.
What did you mean by 0013.the leading zeros should not be there if you read as int. however, you should go back to your specification document.


Now, I am pretty sure that is 0013
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Walter,

As Hanna said earlier:

Originally posted by Hanna Habashy:
You cannot assume that all db files has the same mgic cookie value.[...]

I think every version of the specification has differnt value.[/QB]


I can confirm that. Different SCJD database files may have different internal structures - even to the point where one URLyBird database file may have a different internal structure than another URLyBird database file. So there are many different cookie values being used by the different candidates at the moment.

Since you have confirmed that your cookie is 0013, that is the only value you should ever accept.

Regards, Andrew
 
Walter Tang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Andrew Monkhouse:
Hi Walter,

As Hanna said earlier:



I can confirm that. Different SCJD database files may have different internal structures - even to the point where one URLyBird database file may have a different internal structure than another URLyBird database file. So there are many different cookie values being used by the different candidates at the moment.

Since you have confirmed that your cookie is 0013, that is the only value you should ever accept.

Regards, Andrew

Hi Andrew,
Thank you. I am just thinking if the assessor who mark my assignemnt will use different database file with different cookie. Now I confirmed that it is not the case. Any thanks very much......Enjoy your stay in China
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic