@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4



Comments:

<0> Hrrm... if I'm doing a CASE (SELECT TOP 1 foo FROM t) is there a way to capture that foo value on each run of that case?\
<1> Gambit-, how do you see stored procedures in place of the Dov/View levels?
<2> Dov?
<1> sorry, Doc
<2> EyePulp ...
<1> Document/View artichecture
<2> declare @foo type; select @foo = (select top 1 foo from t); select case @foo ...
<2> lol
<1> What I mean is, what level of logic do you place in them.
<2> MeshMan, I missed your original question I think ... don't feel like scrolling up
<1> Me and Gambit- were discussing the levels of tiers that one could use to code business applications.
<1> I decided on 3 projects.
<1> GUIClient, Business, and Core.
<1> However, none of these take into the account the use of stored procedures.
<2> MeshMan, 3-tier apps are usually laid out as presentation, business and data ...
<1> Right.



<2> 'core' in your model would be 'data' then?
<1> The use of stored procedures however, though stored in the heart of your data, can be used as business.
<2> guiclient and business map to 'presentation
<1> Yes.
<2> and 'business' properly ...
<1> Business is the logic of the business.
<2> stored procedures are used as business rules
<1> For example, when receipting a Purchase order, the logic that takes place is stock adjustments, accounts, etc.
<2> the data layer just has access to them
<1> Could you give me an example, as I'm a little confused on it.
<2> an example ... like what?
<1> The use of a stored procedure in the business layer.
<2> i'm not much of a 3-tier developer ...
<2> SQL Server has nothing to do with your data layer ... from my understanding of 3-tier dev
<2> SQL Server is simply a place to store data ...
<2> and retrieve data
<2> stored procedures are used to adhere to business logic when retrieving data ...
<1> So in fact you have your 1 project, that being your GUIClient.
<1> But within your GUIClient, you dont want to be using ADO code directly in the GUI code.
<2> hrm
<1> Thats purely a data thing.
<2> GUIClient is the presentation ... it's where all your visual stuff happens
<1> So say I fill out a purchase order in the client.
<2> business layer is where business rules are applied ... either to data prior to being stored, or to data prior to being displayed ... as well as what can and can not be displayed, when and where ...
<1> Store the definition in XML or some object, whaetever.
<1> P*** this down to a Business Logic library.
<2> data is simply a way of retrieving and storing information
<1> Right.
<1> So all my ADO, SQL transactions, security management, goes in my core.
<1> My business rules, in a business project.
<1> And my client, who only needs to talk to the business project.
<1> as in Business->CreatePurchaseOrder(someXMLData);
<1> Business does:
<1> Data->AddPOEntry();
<1> Data->PostToAccounts();
<1> Data->CreateXYz();
<1> Done.
<1> Within Data, to execute "AddPOEntry", this calls a SP or uses ADO directly to send data.
<2> it should call a stored procedure
<2> even for simple stuff ...
<1> Always call a SP?
<2> do not query the database directly, execute procedures ... use ADO Command Parameters as well ...
<2> MeshMan, stored procedures remove the 'programming' from the 'data storage and retrieval'
<1> I see..
<2> in a large enterprise, you have DBA's, DBD's ... then you have GUI Coders, Business Logic Coders and Data Coders ;)
<1> I dont see the point to have a Data project then.
<1> DBAs, DBDs?
<2> Business Logic and Data coders are usually one in the same though
<2> DB Admin, DB Devel ...
<1> Ah i see.
<2> dba makes sure the data is good ... dbd writes stored procs, views, etc to rertieve data
<1> Thankyou, im beginning to see the picture clearly now.
<2> dba manages keys, constraints, etc ... dbd writes the procedures
<2> but this is only really useful for extremely large scale corporations where you have a dev team of like 20+ people working on a project
<1> Hmm, I see.
<2> for a simple project, you can remove alot of these tiers ... but using stored procs to store/retrieve your data is a good way to go ...
<2> allows you to easily modify the stored procedure, without having to recompile and redistribute your application
<2> to provide a simple business logic rule, or departmental change to the data being displayed, etc ...
<1> Hmm.
<2> and try not to re-write too much ... heh, re-use your stored procs ... write them so they can be called from other stored procs ... to perform routine things ...
<1> Not sure what you mean about that.



<2> well, if all your stored procs have a 'query person table, retrieve information' section in them ... then it works on that data ... write a sp_getInfo(@EID) procedure ... and have it use output params or something
<2> rather then putting ... select @fname = fname, @lname = lname from person where eid = @eid ... at the top of all your stored procs that work with EID's ... etc
<2> so if the logic behind it ever changes, you modify one thing ... not 100's ;)
<2> bbl
<1> Thanks for your help.
<3> I've been wrecking my brain for the last couple of hours trying to create a function in postgresql that tracks any changes made in one of my tables (inserts, updates, deletes) and dumps them into a seperate table (basically a log of all transactions on the table). Can anyone help me? The postgres documentation hasn't been very helpful at all...
<1> Hmm, don't know what Pstgresql, but you would do that with triggers in MSSQL
<3> postgres basically just uses something similar to pl/sql
<4> you can do it with triggers and stored procs Yushiro
<2> yeah
<2> write a trigger ... after insert, update, delete...
<2> then just record the changed data in your history table
<2> I wrote a log system like that for one of my mssql db's about a year or so ago ...
<1> I heard that sorta stuff should be development only though.
<1> Adds quite a bit of overhead?
<4> of course it will
<4> but if your system has some sort of auditing requirements then you need it
<3> Yeah, it's exactily what I'm trying to do
<3> I have a table that has a list of products, we're having problems with a lady deleting things and entering incorrect data then saying it's the softwares fault.
<3> so, we're trying to bust her ***.
<4> all you need is an on delete trigger
<3> I need it on everything
<4> then you need multiple triggers
<4> they can all call the same sp if you like
<3> I'll figure it out eventually, I was mostly just hoping that someone around here would have an example that I could learn off of.
<4> google on postgres and auditing
<4> you should find something
<3> ok
<3> thx
<4> if not then look into triggers
<3> googling postgres and audit tables found what I think I'm looking for
<3> thanks for your help.
<4> np
<5> is it possible to do something like this with a where clause? where PropertyID = 104,107,108,109,110,111 or does it have to be like where PropertyID = 104 or PropertyID = 107 or... etc?
<6> IN ()
<6> buy an intro to oracle book
<6> or intro to whatever
<5> yeah im still learning hehe
<5> thanks mate
<7> yaya i got matching nuuuumbers
<8> hey
<7> hey
<7> hey hay hey
<8> hey
<8> lol read the 5 rules
<8> gonan make sure to see if i can do it first before asking
<8> >_<
<8> wow oracle asks for alot of info
<8> yea it's asking for too much information. is there a program that works like oracle 9i and is free?
<8> one where i do not need to make a server or what not. i just want to do some of my lab work at home.
<6> igbeserk, there is a free oracle 10g
<6> 1 cpu, 1gig ram, 4gigs of data max
<6> no support
<8> isn't 9i free?
<6> not legally
<8> oh
<6> you can download it.. but if you dont pay they will hunt you down and kill you
<8> lol
<8> nice
<7> (oh they will)
<8> alright i'll look for 10g
<6> since they have more lawyers than your college has professors
<6> 10g express
<8> hmm
<8> my college in all
<8> or just my college
<8> lol i go to penn state we have many campuses.
<8> at least 6 locations in pennsylvania
<8> but yea i'm gonna look for 10g
<7> pennsylvania's not even a state
<7> :P
<6> true
<8> lol


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #sql
or
Go to some related logs:

#politics
#debian
helmut eichenburger
#gamedev
#beginner
stinfer
#politics
#eggtcl
#delphi
wrong # args: should be while test command



Home  |  disclaimer  |  contact  |  submit quotes