Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query on database design

 
Jiafan Zhou
Ranch Hand
Posts: 193
Fedora Linux Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some questions on high-level database design.
The exam requires me to design both a client-side database and remote-side database which should be transparent to the end-user. Now here's the question in my mind..should these two databases contain the same database file?
And what's the purpose of doing this?
For example, if I changed couple of records in the client-side database, what happened to the remote-side database? Do I have to change the corresponding records in the remote database accordingly, otherwise those two database files will be different ,and vice verse when I change the remote database.

Do these two database files communicate and if so how?
[ November 16, 2005: Message edited by: Jiafan Zhou ]
 
Gary Hellman
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mine is supposed to have: 3 ways of acting...

- user can startup in one of these three ways (when server, there are two users/machines/jvms - one for server, one (or more) for client(s) )

1) client (to a remote database - with no local database)
2) server - with "local database" serving to one or more remote clients (which have no local databases).
and,
3) standalone - local database only

Is yours saying something different that this?

I am working on B&S
 
Jiafan Zhou
Ranch Hand
Posts: 193
Fedora Linux Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Foremost, cheers, Gary. I always heard the term B&S, what does that really stand for? Or a little more brief description about it.

For your implementation on database, the 1.client 2.server seems belonging to a network 3-tier architecture which has a database file run on the server. The figure below shows my idea.

3.standalone, the locol database only will be a non-network architecture which has a database file run on the client. The figure below shows my idea.


Is that what you meant and for my question is I wonder if these two databases should be consistent as one copy or for two copies?

BTW,if in the 3.standalone mode, does the database has to consider the multi-user locking issue?
 
Lara McCarver
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would really help if you could post which exam you are working on.

My impression was that for all exams -- B&S (which I have), Fly by night and the Hotel Reservation exam -- there is only 1 database. When the client does a "book" operation, for example, it is supposed to be communicating with the server and the actually database operations are supposed to occur on the one and only database, which is on the server side.

If you have a requirement for stand-alone mode, things are a little different, but I think most people try to arrange it so that the client is re-using most of the database code that the server uses (e.g. using classes from the server package), while bypassing the code related to RMI.
 
Jiafan Zhou
Ranch Hand
Posts: 193
Fedora Linux Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not fully understanding the B&S(Browser& Server mode, does that mean all my client GUIs have to be built based on a browser using html code? And what's the different between B&S and C&S?
 
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 Jiafan,

In this forum, the three commonly received assignments are often referred to in shorthand:
  • B&S - Bodgitt & Scarper - building contractors assignment
  • URLyBird - (URLyBird) - hotel reservations assignment
  • FBNS - Fly By Night Services - airline seat reservations assignment
  • As with most of the other responders in this topic, I have never seen an assignment with more than one physical database file.

    Does your assignment require you to implement a Data class that will be used to view and modify the database? If so, then you will use that one Data class (and one database file) in both your client-server and in your standalone application.

    Does your assignment instructions contain the sentence "You may assume that at any moment, at most one program is accessing the database file"? If so, then you do not need to worry about having the standalone client notify the client-server of changes to the database: the standalone client will never be running while the client-server version is running.

    Regards, Andrew
     
    Jiafan Zhou
    Ranch Hand
    Posts: 193
    Fedora Linux Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Sorry about my misconception,now it makes the perfect sense to me. I redrew the high-level architecture UML diagram, hope it is right this time. BTW, I am tackling with the URLyBird- hotel reservations assignment.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic