First up, please know that it has been almost a decade since I have been anywhere close to a database, be it at work or outside. Anyway I never did anything substantial there except have a table and read/write data. So go easy on flaming if this turned out to be a n00b question or suchlike.
I have to model/analyze some data for some research and I need your help to see how I can go about that.
First some definitions
1. There is a set called S subscripted with n that I write as Sn where 1 <= n <= 100
2. Every Sn (i.e S for all n) is a subset of a larger set called US
3. None of the Sn is intersecting
4. It should be possible to name every Sn
Now the problem
1. I have An and Bn which have one to one mapping
2. I have Cn that has many to one mapping with Bn (each element of Bn maps to one or more elements of Cn)
3. There are also other sets like Dn, En, Fn etc that have one to one mapping with Bn only and are unrelated to any other set directly
I want to be able to do these
1. Given any element from UA, the relevant An (the set) must be got. If An exists, then the corresponding Bn element must be got
2. Similarly, given any element from UB, the relevant Bn must be got. If Bn exists, either from this step or step (1), all the corresponding Cn must be got along with the corresponding ones from Dn, En, Fn etc (the sets that must be considered will be told )
3. Alternatively, any Sn must be extracted by name and all the relations for all its elements must got (i.e if An then Bn as per (2), if others then Bn only)
[EDIT] Some stats - Each set will have at most 500 elements and the super set will have at most 2000. And the set count may be at most 100*50=5000 in all.
I will be having an app for the front end that will do the creating, editing and querying of the database. I will be using MS Access for the backend as it is kinda “free” and already there. I will refresh on my SQL commands as I know that it will be necessary for interacting programmatically.
So can you guys please help me? I need broad ideas like designing it etc more than the "code" itself. I wouldn’t mind if you suggest any other “free” databases that can make my solution simpler. I suppose using ODBC or DAO (that’s what I last remember) is going to act as a black box and I can use any dbase.
And oh, I don’t know .NET. Will it be a chore then?
Feel free to ask me back anything about my problem that you couldn’t understand.
It sounds like your dataset is not that large, so storing the data in Access sounds fine.
You will be amazed at how easy it is to develop queries in Access to get the results you need, if you find the data to be too large or you need to share this database with others, you may have to upgrade to something more substantial, ie MS-SQL.
Start with Access, it should give you enough to prototype with ... maybe even solve your problem completely.
1. if setting up servers for transactional replication, is it possible for the subscriber server to delay the publisher server?
For example, the publisher server is under heavy load and inserting/deleting a large amount of rows; I realize that the publishing server will be a little slower due to sending these updates to the subscriber server(s), but does the publishing server have to wait or stop processing while the subscribing servers are committing the same transactions?
Or are the sent transactions to the subscriber queued and processed at its own pace - not impacting/stopping the publishing server? I understand that a distributor server cab queue these commands to the subscribers, but does the action of queuing ever pause the production/publisher server in any way?
2. When doing queries on a subscriber database (since it's read only), does the database become unavailable while committing transactions sent from the distributor or publishing server(s)?
Thanks for any help. Just looking to gain some insight on replication.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
1. Technically No. Although if the distributor is in the same server, there'll be the inevitable resource waits. The publisher DB transactions themselves are not delayed per se, but the underlying resource contention can delay the transaction as a whole. Queuing is managed by the distributor. The publisher actually does nothing. The distributor will monitor the DB log of the publisher and replicate those changes to the subscribers. If the distributor is located in a separate physical server, there wouldn't be any waits.
The problem here is the scope in which the sql statement executes. The @temp table variable declared is different from the @temp variable used in the inline query as the scope of both the queries are different. To make the query work we need to run the query in same scope ie declare the table variable using the same SQL satements as one used for the query.