The refund agreement was not a "Poison Pill." A poison pill simply states that if another acquiring firm purchases more then x percent of a target company's shares then the target company has the right to issue more shares making it prohibitively expensive for the acquiring company to do a takeover without the consent of the targeted firm.
Since its pretty obvious you haven't pulled your own credit report through one of the bureaus before let me give you a run-down of the things you must verify.
Start with your SSN, home address, phone number, etc. After authenticating all of that information you will get probably five questions like the following:
In October 2001, a request to open a loan was made by Toyota Financial Services, how much is this payment each month for this loan A. 200.27 - 224.56 B. 235.57 - 260.01 C. 265.33 - 290.17 D. 315.29 - 327.89 E. I do not have an account with this institution
Now when I go through it, I have to pull my bills to answer all the questions . This is one of the things that the bureaus have been good at in terms of enforcing security by putting these questions to the person requesting their credit file.
As bad as this sounds, this is the imagination that's necessary in our brave new world. Hopefully, someone who is in charge of this will take notice and consider the possibilities.
I agree with a national sales tax but as you said it will never happen. Its the same reason we will not have a flat tax either. Gotta keep those tax advisors and the people at Turbo Tax's Intuit unit employed. There is another reason income taxes will not be replaced by either one of these. Income taxes give governments the ability to both reward and punish certain behaviors. For instance, you get a break for giving money to chairity, purchasing an electic car, or putting a child through school. You do not have the ability to reward and punish such behaviors when everyone is just paying a flat rate or paying a tax on goods.
Also, I would not sign on to a VAT until there was specific language in the law that declared an income tax and VAT could not exist at the same time.
and I'm sure everyone is checking that on their state income tax forms come tax time right. Just like I'm sure any item you purchase from a catalog or over the Internet and did not pay sales tax for you sent that in to the state of WA. I have yet to meet any individual (not business and not to say people do not pay this) that has actually paid this tax. I cannot find it at the moment but the actual collection of use tax from individuals is EXTERMELY low.
Americans aren't all that good about being consistant, even within a single State. (Not that any other country is much better.) To expect all fifty States to unify around a single optimised set of laws is hopeful at best. Most Americans would even argue that such a concept is "bad" as the present system gives individuals the ability to "customize" where they live, to a degree.
That's why AG's for the states get together in order to draft legislation that will create some consistency in the laws across the country. I would agree with the second statement. Many people choose to establish residency in Florida before declaring bankruptcy because of the laws put into place to protect the individual declaring bankruptcy.
Probably a more realistic system would be to require a corporation to state its "home turf" (much as a ship states its home nationality). The corporation would then have to obey the laws (including tax laws) of its home turf AS WELL AS the laws of wherever any outposts were.
Before putting forth this analogy go see where the majority of ships nationalities are registered. It isn't here in the US its actually Panama and the Bahamas because once again they are avoiding tax liability.
Unfortunately you are correct many companies are moving off-shore, Tyco and Dewalt come to mind off the top of my head as two recent examples, but the only way to prevent those things from happening (and retain our jobs here at home) is to become consistent and competitive.
Taking your argument to the extreme is very Kant'ish of you but in no way resolves the issue at hand. Not everyone can skip the country and if everyone did the laws would be changed. BTW, according to the Congressional Budget Office the top 20% of all taxpayers shoulder 82%~ of the tax burden of the country. The minimum wage worker does not even contribute to the tax burden because they receive payments back from the government.
Ohhh! Ohhh! I got an idea too. What if the majority of my revenue comes from another state since were are talking about state INCOME tax and where my LABOR comes from can have nothing to do where I make my money. But wait, what if I have multiple businesses, all of whom who have labor in every state, and I need one jurisdiction to deal with all possible legal challenges to contracts. That's when I incorporate in Deleware because the Delware Chancery Courts are the default Supreme Court for business law in the country. No, you cannot expect anyone to incorporate in just any state based upon the parameter that suits your purpose at the time. You have to either create consistentcy in US law or you have to deal with situations such as this.
all sorts of companies incorporate in Nevada not just Microsoft for this same purpose. In fact, while Delaware is the number one state to incorporate, Nevada follows up close behind because of the lax laws. Just like I'm sure you, your friends, and your family go down to Oregon to do your Christmas shopping so you don't have to pay state sales tax. If you want to close these loopholes then every state needs to have consistent incorporation statutues and laws. The only companies that incorporate in their own state are the ones who can't afford to incorporate in another and/or follow another state's governance laws and procedures .
I have been using Firefox for about eight months and have loved it (I run XP Pro BTW). One thing missing for Firefox for me is pushing down updates rather then going to find them. It's not a deal killer, but I would like not to have to go to the website and download a new version when a vunerablitity is found. BTW, if anyone knows an extension that does this I am all ears.
This wasn't a shot at Microsoft this was a shot after being fired at by MS. SQL Server 2005 Express is replacing MSDE and its query governor restriction with almost identical restrictions to the Sybase announcement: 1 CPU 1 GB RAM 4 GB Database size (excluding log files)
No those same developers (myself included) will happliy stay SQL Server.
Wal-Mart...to many it is a pariah, a sadist, something to be scorned and looked down upon. For others, it quite simply the place where they buy everything because its cheap. Let's look at the article's points
Wal-Mart opposition overseas has been from unions (over low pay)
Wal-Mart has always been anti-union. There has only been one successful union organization I believe (butchers in one of the stores) and Wal-Mart turned around, fired them all, and started buying beef from a distributor. Wal-Mart doesn't apologize for it and most other grocery stores if they had their druthers would probably do the same. Wal-Mart just ensured that this didn't happen early on and it is not at point in its promience and power that no union can organize it.
Local regulators (over predatory pricing)
Wal-Mart basically puts the clamp on you when your a supplier because they are the toughest customer in the world. In fact, there are many businesses that will not deal with Wal-Mart because they do not want to go through the pain of readying themselves to meet Wal-Mart's demands and becoming beholden to what will become their largest customer if successful in a region trial. You do not have to choose to do so, but people see the number of SKUs you can sell to them and go for it. Wal-Mart, in turn, will demand 180 day payment, return of all unsold items, only pay for those items that have actually been sold to a customer, a set delivery time and quantity (if you miss either one of these your basically thrown out as a supplier, no chance ever again to redeem yourself), and a 5% reduction in cost to Wal-Mart each year. Wal-Mart in turn passes this back to the consumer. When someone would ask Sam Walton to do a coupon or a special offer, he would tell them take the amount we would spend on it and drop the price by that much. In the end its the difference between a consumer spending $120 - $130 versus spending $100 at Wal-Mart.
and small businesses that face financial ruin....In the U.K, Wal-Mart's takeover of Asda has had a devastating effect. Award-wining food journalist Joanna Blythman's new book called "Shopped: The Shocking Power of British Supermarkets" published May 2004 outlines how: "I learned that UK supermarkets now jump to the tune of our second largest chain, Asda. Since 1999 when it was taken over by the biggest retailer in the world, the U.S. chain Wal-Mart, Asda's strategy of 'Every Day Low Pricing', has triggered a supermarket price war in which chains without buying muscle are disadvantaged...Every week in the UK, 50 specialist shops like butchers and bakers are closing and one farmer or farm worker commits suicide. We enter a race to the bottom where everyone loses, especially the consumer.
Wal-Mart never put any small Mom and Pop out-of-business, you and I did. Those butchers and bakers aren't closing because they have customers, they're closing because you and I and the rest of the people you know find the same staples of their lives at Wal-Mart for far cheaper.
Final thought, seven cents of every dollar spent in America is spent at Wal-Mart. Think about that for a moment, scary isn't it. However, when you goto Wal-Mart do you think about the fact your going to a store that makes more money then probably half the nations on the planet. No, you think about cheap prices. Sam Walton found it was more profitable to serve 95% of the population well then to only serve 5% and the in the process made just about every company in America and abroad that deals with Wal-Mart better in the process. While Wal-Mart does put the squeeze on its producers and ends up squeezing the inefficiences out of the supply chain below it because every year you and I will expect prices to fall on a product at Wal-Mart.
Actually an excellent idea
on
Port-A-Nuke
·
· Score: 1
As long as the reactor is tamper-proof, I am all for the concept. This could ensure that developing countries or remote locations do not need a large coal or natural gas power planet especially when these resources are scarce.
One more thought, ok you can come out with a "safer" or more efficient model then basically pop-out the old reactor from the location and plug in the new one. Of course this wouldn't be as easy as that, but with the ability to move or replace the reactor you give yourself a great deal of flexibility. Done correctly I think this is the kind of idea that could solve a great deal of problems today as they concern energy.
Actually no, you missed his point. Mark has pointed to the fact that quality is what the end-user hungers for and quality does not work well when compressed. He even pointed to the fact that when asked most people have never downloaded a video. True you can download a video that's been ripped to DivX and fit it on the CD. However, compression is reaching the limits of what it can do with video and as quality increases the ability to compress video to that same CD and still have any sort of definable quality will become non-existent. Thus, quality = more consumers, less piracy. Go rip a DVD and watch it at 320 x 240 with a grainy picture. I want to watch a uncompressed HD format with crystal clear clarity.
In two key areas, Sony beats Apple. The new Walkman, which looks sort of like a small digital camera, is shorter than the iPod, and a bit thinner and wider. Even though it packs the same hard-disk capacity, the Sony is about 10% smaller in overall volume and it's also a third lighter, at 3.8 ounces vs. 5.6 ounces for the Apple. It's not as small or light as Apple's iPod mini, but the mini is in a different category, with much lower capacity.
1) I'd use both and I wouldn't use security as an argument to use stored
procedures. Mere mortals should not have access to the database server at all.
Just beware of SQL injection attacks (Google it if you don't know what that is).
I am not worried about mere mortals, I'm worried about your application ID
and password getting into the wild and picking up the pieces as someone with
that information goes trouncing through the tables your application had
underlying rights to in the database.
2) Stored procedures aren't always the fastest because you can't do array
inserts with stored procedures, for instance.
See OPENXML in SQL Server or this site http://vyaskn.tripod.com/passing_arrays_to_stored_ procedures.htm
3) Queries are cached. So the second time a query is executed it won't be
compiled. Just make sure that your queries are parameterized. Don't put your
values in the query with string concatenation. Use parameters. Otherwise queries
can't be cached. You will also be vulnerable to SQL injection attacks.
If you have memory pressure on your database server, your query plan may not
be around the next time your run it. From my understanding in all platforms, stored procedure
query plans will persist longer then ad-hoq queries.
4) Use stored procedures when you will gain a clear performance advantage. You
may want to try to implement it in your data tier first, and if that isn't fast
enough, move it to a stored procedure.
What's the difference in time and resources in writing the same code in a
procedure one time instead of writing it twice at the end of your long death
march of a project?
5) Buy or make a code generator that will generate data tier code for you (and
possibly other code).
Yea, because we all know that code generators out there do such a wonderful
job in generating high performance, efficient code.
6) As for database compatibility, if you implement it as stored procedures, you
are screwed for sure. If you use normal SQL you are probably screwed anyway.
Check out
this chart [mimer.com] this chart for compatibility. And that only points
out the parts of these databases that follow the standard. They do have plenty
of non standard features as well. If you want to try your queries for standards
compliance you can go
here [mimer.com].
Unless you are writing an application to sell to the public trying to achieve
database independence this is at best a pipedream unless you write code that is
really simple. At that point, I hope the rest of your code is absolutely
fast because your application performance is going to suffer due to poor dynamic
SQL.
This rant is focused specifically on SQL Server. I do not work with Oracle, but if should apply similarly.
If I give you rights to update a table, that means the user you log into the database has all rights to update in that table. Your writing dynamic code against the database so therefore you must be granted writes to the underlying tables themselves in order to work. Now I either get to write some backend code i.e. triggers to ensure that your user has only rights to update the records specifically for that user (think Windows Authentication) or your application logs as one user into the database.
So, I can either add every user in the domain to the database and give them permissions and manage all the underlying rights associated with those users (this means anyone with Query Analyzer can login without any restriction to the database) or I can give your application one login that it then uses for everyone and we build some security tables for users to log in to the application...but of course if you wrote down the login and password or someone saw your code where you log into the database now were compromised and we just gave an attacker free reign on all the tables in the databases because as we said before you wrote against base tables. Or we might go with the best option and have you write all of your code against stored procedures meaning an attacker must use the same procedures that your application does to manipulate the database. Just because your parsing out things like "--" from your input parameters does not mean that your application is secure from injection or compromise.
Excuse grammer, spelling, babbling, etc...I am tired and have a headache from watching the jerky camera work in the Bourne Supremacy.
Learn your favorite RDBMS XML syntax. You would be surprised what you mind find. Various snippets of a procedure currently running in our production SQL Server environment today. Sorry about the formatting, Slashdot sucks in code mode. BTW, go check out a book called SQL Server XML distilled for information on how to exactly do what you did but with XML in all in one trip.
1. SPs turn your database into an application server, centralizing things that needn't be, and raising load on that central machine.
And having all that load sit on an application server while also taxing your database server with poor performing queries is better?
2. SPs invite use of vendor-specific features, and therefore lock-in and loss of portability.
Unless you work for a software development company, I see the purchase of a core database server being one of those one-time-only purchases.
3. SPs are not typically amenable version control and are maintained outside the rest of your code base.
SQL Server and Visual Sourcesafe can be integrated together and all SQL scripts can be checked into your version control suite of choice.
4. SPs represent "premature optimization." There may be a time and a place for SPs, but they are used a lot more than needed in many applications. For example, one application at my company has over 1,000 SPs, and quite a number are just wrappers for simple select statements.
Would you rather write it once where you KNOW your going to get the best peformance or figure out at the end of your development cycle that your loop through 500,000 rows is slow performing considering that both cost you about the same amount of time. Also simple selects could be there for the purposes of security. If you run your applications exclusively through stored procedures when working with the database you can deny all rights except for the procedures to your application thereby enhaning the security of your application.
Enhanced security. Depending on stored procedures as a key element of security is obviously not desirable. Having said that, in your particular case, though suboptimal, you have to look at the big picture to see if the business justification is there to leave it in for this reason. Having said that, I would try to design the app, security-wise, as though stored procedures don't exist to whatever extend possible. Just as with the business rules, you should be free to change DB vendors from a security standpoint as well.
SQL injection is a very large problem in the enterprise. Stored procedures facilitate better safety. Yes, you can test for all the characters in your code but as soon as your app and password are compromised their is open reign on your database if you gave it data reader, data writer, dbo or heaven forbid SA. All new applications are build on stored procedures not only for data modfication but also SELECT queries. The application itself has no rights to the underlying tables. This ensures if indeed the application was ever compromised the most anyone could do is what the application does today. Also, they would have to figure out the XML strings to manipulate the data with a stored procedure.
That's probably about the number of lines in one small application backend that I would write. My questions for you are: Were the procedures well documented? Are there spec documents for the procedures? Were the procedures written by someone who knew very little or a great deal about databases?
All of these could create problems regardless of where this code was in a web page, a middle-tier object, or a stored procedure.
If all you have is a couple of web / middle-tier developers, yea your procedures will rust. If you have someone on your team who is dedicated to the procedures then you do not have that problem. You can turn the argument right back around on itself. If I don't have any web developers and only database developers of course my web pages rust.
BTW, I hope you do not plan on using any of that business logic in any sort of reporting...unless of course you decided to go out and build an entire reporting engine instead of buying off the shelf. Then you get to keep that logic in sync between your higher layers and your reports when you could be running all of it from the same stored procedure.
Let me start out by saying, developers work well in there chosen language but the difference between the code and schemas I have seen between people that understand databases and people who code apps/web pages/middle tier objects is quite shocking. I wouldn't sit down today and pretend to write ASP, PHP, Python code, etc. and be in expert at it. Quite frankly my code would probably suck.
A few bullets
1. Application coders write suck performing SQL and running SQL dynamically makes performance problems worse 2. Forget your pipe dream about writing SQL one time and running it on all database platforms, the SQL is so generic and so inefficient that it inherently leads back to number 1 3. Its better to enforce data integrity in the database, coders who leave all their code in ASP and middle-tier objects don't put things like foreign keys on their tables, have flags flipped incorrectly, and wonder why there are orphan records all over the database. True story, during a conversion of another bank's records I found a customer hadn't been billed for approximately $70,000 worth of interest because of poor data integrity 4. Rolling out changes to stored procedures is much easier then pushing out changes to application code along with being easier to unit test 5. Stored procedures facilitate the use of transactions and set-based operations
I have found VERY few app coders (10+) that actually could write good, clean, efficient SQL code and design schemas to match. The problem lies when you're dealing with a large data-centric application, ALMOST ALWAYS YOUR PERFORMANCE ISSUE LIES IN THE SQL! If you have someone writing dynamic SQL looping through a 500,000 record resultset doing something like this (this comes from an application we purchased), your performance will be horrendous:
BEGIN TRAN UPDATE IAR SET ARIBDATE = '7/30/2004' WHERE ARRECID = 38196.810543788582 COMMIT TRAN
Your application coders will write this sort of crap instead of using one set-based operation and you will all wonder why your application takes so long to complete an operation.
Your best bet, find two or three good SQL developers and have them do traces and find out how many of those 3000+ stored procedures written actually are getting used. My guess is a whole bunch of them are not being used or just were never cleaned off after their retirement. Next, go in and let them figure out how many of these procedures are one-off of one another, you probably take out a good 20% from there. Now you're getting towards a more manageable number. Very few people are good at database development. It is a unique skill set that can have a major impact on the maintainability and performance of your application. Stay with stored procedures and find some additional database developers if you need them. Let your app and web coders code what there good at, let database developers code what they are good at and you will have a wonderful application.
The refund agreement was not a "Poison Pill." A poison pill simply states that if another acquiring firm purchases more then x percent of a target company's shares then the target company has the right to issue more shares making it prohibitively expensive for the acquiring company to do a takeover without the consent of the targeted firm.
Since its pretty obvious you haven't pulled your own credit report through one of the bureaus before let me give you a run-down of the things you must verify.
Start with your SSN, home address, phone number, etc. After authenticating all of that information you will get probably five questions like the following:
In October 2001, a request to open a loan was made by Toyota Financial Services, how much is this payment each month for this loan
A. 200.27 - 224.56
B. 235.57 - 260.01
C. 265.33 - 290.17
D. 315.29 - 327.89
E. I do not have an account with this institution
Now when I go through it, I have to pull my bills to answer all the questions . This is one of the things that the bureaus have been good at in terms of enforcing security by putting these questions to the person requesting their credit file.
As bad as this sounds, this is the imagination that's necessary in our brave new world. Hopefully, someone who is in charge of this will take notice and consider the possibilities.
I agree with a national sales tax but as you said it will never happen. Its the same reason we will not have a flat tax either. Gotta keep those tax advisors and the people at Turbo Tax's Intuit unit employed. There is another reason income taxes will not be replaced by either one of these. Income taxes give governments the ability to both reward and punish certain behaviors. For instance, you get a break for giving money to chairity, purchasing an electic car, or putting a child through school. You do not have the ability to reward and punish such behaviors when everyone is just paying a flat rate or paying a tax on goods.
Also, I would not sign on to a VAT until there was specific language in the law that declared an income tax and VAT could not exist at the same time.
and I'm sure everyone is checking that on their state income tax forms come tax time right. Just like I'm sure any item you purchase from a catalog or over the Internet and did not pay sales tax for you sent that in to the state of WA. I have yet to meet any individual (not business and not to say people do not pay this) that has actually paid this tax. I cannot find it at the moment but the actual collection of use tax from individuals is EXTERMELY low.
Americans aren't all that good about being consistant, even within a single State. (Not that any other country is much better.) To expect all fifty States to unify around a single optimised set of laws is hopeful at best. Most Americans would even argue that such a concept is "bad" as the present system gives individuals the ability to "customize" where they live, to a degree.
That's why AG's for the states get together in order to draft legislation that will create some consistency in the laws across the country. I would agree with the second statement. Many people choose to establish residency in Florida before declaring bankruptcy because of the laws put into place to protect the individual declaring bankruptcy.
Probably a more realistic system would be to require a corporation to state its "home turf" (much as a ship states its home nationality). The corporation would then have to obey the laws (including tax laws) of its home turf AS WELL AS the laws of wherever any outposts were.
Before putting forth this analogy go see where the majority of ships nationalities are registered. It isn't here in the US its actually Panama and the Bahamas because once again they are avoiding tax liability.
Unfortunately you are correct many companies are moving off-shore, Tyco and Dewalt come to mind off the top of my head as two recent examples, but the only way to prevent those things from happening (and retain our jobs here at home) is to become consistent and competitive.
Taking your argument to the extreme is very Kant'ish of you but in no way resolves the issue at hand. Not everyone can skip the country and if everyone did the laws would be changed. BTW, according to the Congressional Budget Office the top 20% of all taxpayers shoulder 82%~ of the tax burden of the country. The minimum wage worker does not even contribute to the tax burden because they receive payments back from the government.
Ohhh! Ohhh! I got an idea too. What if the majority of my revenue comes from another state since were are talking about state INCOME tax and where my LABOR comes from can have nothing to do where I make my money. But wait, what if I have multiple businesses, all of whom who have labor in every state, and I need one jurisdiction to deal with all possible legal challenges to contracts. That's when I incorporate in Deleware because the Delware Chancery Courts are the default Supreme Court for business law in the country. No, you cannot expect anyone to incorporate in just any state based upon the parameter that suits your purpose at the time. You have to either create consistentcy in US law or you have to deal with situations such as this.
all sorts of companies incorporate in Nevada not just Microsoft for this same purpose. In fact, while Delaware is the number one state to incorporate, Nevada follows up close behind because of the lax laws. Just like I'm sure you, your friends, and your family go down to Oregon to do your Christmas shopping so you don't have to pay state sales tax. If you want to close these loopholes then every state needs to have consistent incorporation statutues and laws. The only companies that incorporate in their own state are the ones who can't afford to incorporate in another and/or follow another state's governance laws and procedures .
I have been using Firefox for about eight months and have loved it (I run XP Pro BTW). One thing missing for Firefox for me is pushing down updates rather then going to find them. It's not a deal killer, but I would like not to have to go to the website and download a new version when a vunerablitity is found. BTW, if anyone knows an extension that does this I am all ears.
This wasn't a shot at Microsoft this was a shot after being fired at by MS. SQL Server 2005 Express is replacing MSDE and its query governor restriction with almost identical restrictions to the Sybase announcement:
1 CPU
1 GB RAM
4 GB Database size (excluding log files)
No those same developers (myself included) will happliy stay SQL Server.
Wal-Mart...to many it is a pariah, a sadist, something to be scorned and looked down upon. For others, it quite simply the place where they buy everything because its cheap. Let's look at the article's points
Wal-Mart opposition overseas has been from unions (over low pay)
Wal-Mart has always been anti-union. There has only been one successful union organization I believe (butchers in one of the stores) and Wal-Mart turned around, fired them all, and started buying beef from a distributor. Wal-Mart doesn't apologize for it and most other grocery stores if they had their druthers would probably do the same. Wal-Mart just ensured that this didn't happen early on and it is not at point in its promience and power that no union can organize it.
Local regulators (over predatory pricing)
Wal-Mart basically puts the clamp on you when your a supplier because they are the toughest customer in the world. In fact, there are many businesses that will not deal with Wal-Mart because they do not want to go through the pain of readying themselves to meet Wal-Mart's demands and becoming beholden to what will become their largest customer if successful in a region trial. You do not have to choose to do so, but people see the number of SKUs you can sell to them and go for it. Wal-Mart, in turn, will demand 180 day payment, return of all unsold items, only pay for those items that have actually been sold to a customer, a set delivery time and quantity (if you miss either one of these your basically thrown out as a supplier, no chance ever again to redeem yourself), and a 5% reduction in cost to Wal-Mart each year. Wal-Mart in turn passes this back to the consumer. When someone would ask Sam Walton to do a coupon or a special offer, he would tell them take the amount we would spend on it and drop the price by that much. In the end its the difference between a consumer spending $120 - $130 versus spending $100 at Wal-Mart.
and small businesses that face financial ruin....In the U.K, Wal-Mart's takeover of Asda has had a devastating effect. Award-wining food journalist Joanna Blythman's new book called "Shopped: The Shocking Power of British Supermarkets" published May 2004 outlines how: "I learned that UK supermarkets now jump to the tune of our second largest chain, Asda. Since 1999 when it was taken over by the biggest retailer in the world, the U.S. chain Wal-Mart, Asda's strategy of 'Every Day Low Pricing', has triggered a supermarket price war in which chains without buying muscle are disadvantaged...Every week in the UK, 50 specialist shops like butchers and bakers are closing and one farmer or farm worker commits suicide. We enter a race to the bottom where everyone loses, especially the consumer.
Wal-Mart never put any small Mom and Pop out-of-business, you and I did. Those butchers and bakers aren't closing because they have customers, they're closing because you and I and the rest of the people you know find the same staples of their lives at Wal-Mart for far cheaper.
Final thought, seven cents of every dollar spent in America is spent at Wal-Mart. Think about that for a moment, scary isn't it. However, when you goto Wal-Mart do you think about the fact your going to a store that makes more money then probably half the nations on the planet. No, you think about cheap prices. Sam Walton found it was more profitable to serve 95% of the population well then to only serve 5% and the in the process made just about every company in America and abroad that deals with Wal-Mart better in the process. While Wal-Mart does put the squeeze on its producers and ends up squeezing the inefficiences out of the supply chain below it because every year you and I will expect prices to fall on a product at Wal-Mart.
As long as the reactor is tamper-proof, I am all for the concept. This could ensure that developing countries or remote locations do not need a large coal or natural gas power planet especially when these resources are scarce.
One more thought, ok you can come out with a "safer" or more efficient model then basically pop-out the old reactor from the location and plug in the new one. Of course this wouldn't be as easy as that, but with the ability to move or replace the reactor you give yourself a great deal of flexibility. Done correctly I think this is the kind of idea that could solve a great deal of problems today as they concern energy.
Actually no, you missed his point. Mark has pointed to the fact that quality is what the end-user hungers for and quality does not work well when compressed. He even pointed to the fact that when asked most people have never downloaded a video. True you can download a video that's been ripped to DivX and fit it on the CD. However, compression is reaching the limits of what it can do with video and as quality increases the ability to compress video to that same CD and still have any sort of definable quality will become non-existent. Thus, quality = more consumers, less piracy. Go rip a DVD and watch it at 320 x 240 with a grainy picture. I want to watch a uncompressed HD format with crystal clear clarity.
truth and justict for those who can pay for it...
Sounds like he understood it to me...
In two key areas, Sony beats Apple. The new Walkman, which looks sort of like a small digital camera, is shorter than the iPod, and a bit thinner and wider. Even though it packs the same hard-disk capacity, the Sony is about 10% smaller in overall volume and it's also a third lighter, at 3.8 ounces vs. 5.6 ounces for the Apple. It's not as small or light as Apple's iPod mini, but the mini is in a different category, with much lower capacity.
Preach on brother man!
1) I'd use both and I wouldn't use security as an argument to use stored procedures. Mere mortals should not have access to the database server at all. Just beware of SQL injection attacks (Google it if you don't know what that is).
I am not worried about mere mortals, I'm worried about your application ID and password getting into the wild and picking up the pieces as someone with that information goes trouncing through the tables your application had underlying rights to in the database.
2) Stored procedures aren't always the fastest because you can't do array inserts with stored procedures, for instance.
See OPENXML in SQL Server or this site http://vyaskn.tripod.com/passing_arrays_to_stored_ procedures.htm
3) Queries are cached. So the second time a query is executed it won't be compiled. Just make sure that your queries are parameterized. Don't put your values in the query with string concatenation. Use parameters. Otherwise queries can't be cached. You will also be vulnerable to SQL injection attacks.
If you have memory pressure on your database server, your query plan may not be around the next time your run it. From my understanding in all platforms, stored procedure query plans will persist longer then ad-hoq queries.
4) Use stored procedures when you will gain a clear performance advantage. You may want to try to implement it in your data tier first, and if that isn't fast enough, move it to a stored procedure.
What's the difference in time and resources in writing the same code in a procedure one time instead of writing it twice at the end of your long death march of a project?
5) Buy or make a code generator that will generate data tier code for you (and possibly other code).
Yea, because we all know that code generators out there do such a wonderful job in generating high performance, efficient code.
6) As for database compatibility, if you implement it as stored procedures, you are screwed for sure. If you use normal SQL you are probably screwed anyway. Check out this chart [mimer.com] this chart for compatibility. And that only points out the parts of these databases that follow the standard. They do have plenty of non standard features as well. If you want to try your queries for standards compliance you can go here [mimer.com].
Unless you are writing an application to sell to the public trying to achieve database independence this is at best a pipedream unless you write code that is really simple. At that point, I hope the rest of your code is absolutely fast because your application performance is going to suffer due to poor dynamic SQL.
This rant is focused specifically on SQL Server. I do not work with Oracle, but if should apply similarly.
If I give you rights to update a table, that means the user you log into the database has all rights to update in that table. Your writing dynamic code against the database so therefore you must be granted writes to the underlying tables themselves in order to work. Now I either get to write some backend code i.e. triggers to ensure that your user has only rights to update the records specifically for that user (think Windows Authentication) or your application logs as one user into the database.
So, I can either add every user in the domain to the database and give them permissions and manage all the underlying rights associated with those users (this means anyone with Query Analyzer can login without any restriction to the database) or I can give your application one login that it then uses for everyone and we build some security tables for users to log in to the application...but of course if you wrote down the login and password or someone saw your code where you log into the database now were compromised and we just gave an attacker free reign on all the tables in the databases because as we said before you wrote against base tables. Or we might go with the best option and have you write all of your code against stored procedures meaning an attacker must use the same procedures that your application does to manipulate the database. Just because your parsing out things like "--" from your input parameters does not mean that your application is secure from injection or compromise.
Excuse grammer, spelling, babbling, etc...I am tired and have a headache from watching the jerky camera work in the Bourne Supremacy.
Learn your favorite RDBMS XML syntax. You would be surprised what you mind find. Various snippets of a procedure currently running in our production SQL Server environment today. Sorry about the formatting, Slashdot sucks in code mode. BTW, go check out a book called SQL Server XML distilled for information on how to exactly do what you did but with XML in all in one trip.
e eScenario>e eScenarioName>Test Me</FeeScenarioName>1 /1/2003</StartDate>e Rule>1 979</StartDate>e Percentage>6</FeePercentage>e nario>
2 )
e eRule',2)
<Root>
<PayoutBatch>
<EmployeeNumber>84 5227925</EmployeeNumber>
<CreateFeeScenario>
<F
<FeeScenarioID>15</FeeScenarioID>
<F
<ActiveFlag>1</ActiveFlag>
<FeeRule>
<TranCode>1156</TranCode>
<StartDate>
<EndDate>1/1/2050</EndDate>
<FeePercentage>8</FeePercentage>
</FeeRule>
<Fe
<TranCode>4117</TranCode>
<StartDate>1/1/
<EndDate>4/5/2050</EndDate>
<Fe
</FeeRule>
</FeeSc
</CreateFeeScenario>
</Root>
EXE C sp_xml_preparedocument @IDOC OUTPUT, @StrXML
DECLARE @FeeScenario TABLE
(
ScenarioID [INT] NOT NULL,
ScenarioName [VARCHAR] (50) NULL,
ScenarioActiveFlag [INT] NULL,
EmployeeID [VARCHAR] (12) NULL,
ActionType [VARCHAR] (50) NOT NULL
)
INSERT INTO @FeeScenario (ScenarioID, ScenarioName, ScenarioActiveFlag,
EmployeeID, ActionType)
SELECT FeeScenarioID, FeeScenarioName, ActiveFlag, EmployeeNumber, 'Insert'
FROM OPENXML (@IDOC, 'Root/PayoutBatch/CreateFeeScenario/FeeScenario',
WITH (
FeeScenarioID [INT],
FeeScenarioName [VARCHAR] (50),
EmployeeNumber [VARCHAR] (12) '../../EmployeeNumber',
ActiveFlag [INT]
)
INSERT INTO @FeeRule (RuleScenarioID, TranCode, FeePercentage, StartDate, EndDate)
SELECT FeeScenarioID, TranCode, FeePercentage, StartDate, EndDate
FROM OPENXML (@IDOC, 'Root/PayoutBatch/CreateFeeScenario/FeeScenario/F
WITH (
FeeScenarioID [INT] '../FeeScenarioID',
TranCode [CHAR] (6),
FeePercentage [DECIMAL] (7,4),
StartDate [SMALLDATETIME],
EndDate [SMALLDATETIME]
)
1. SPs turn your database into an application server, centralizing things that needn't be, and raising load on that central machine.
And having all that load sit on an application server while also taxing your database server with poor performing queries is better?
2. SPs invite use of vendor-specific features, and therefore lock-in and loss of portability.
Unless you work for a software development company, I see the purchase of a core database server being one of those one-time-only purchases.
3. SPs are not typically amenable version control and are maintained outside the rest of your code base.
SQL Server and Visual Sourcesafe can be integrated together and all SQL scripts can be checked into your version control suite of choice.
4. SPs represent "premature optimization." There may be a time and a place for SPs, but they are used a lot more than needed in many applications. For example, one application at my company has over 1,000 SPs, and quite a number are just wrappers for simple select statements.
Would you rather write it once where you KNOW your going to get the best peformance or figure out at the end of your development cycle that your loop through 500,000 rows is slow performing considering that both cost you about the same amount of time. Also simple selects could be there for the purposes of security. If you run your applications exclusively through stored procedures when working with the database you can deny all rights except for the procedures to your application thereby enhaning the security of your application.
Enhanced security. Depending on stored procedures as a key element of security is obviously not desirable. Having said that, in your particular case, though suboptimal, you have to look at the big picture to see if the business justification is there to leave it in for this reason. Having said that, I would try to design the app, security-wise, as though stored procedures don't exist to whatever extend possible. Just as with the business rules, you should be free to change DB vendors from a security standpoint as well.
SQL injection is a very large problem in the enterprise. Stored procedures facilitate better safety. Yes, you can test for all the characters in your code but as soon as your app and password are compromised their is open reign on your database if you gave it data reader, data writer, dbo or heaven forbid SA. All new applications are build on stored procedures not only for data modfication but also SELECT queries. The application itself has no rights to the underlying tables. This ensures if indeed the application was ever compromised the most anyone could do is what the application does today. Also, they would have to figure out the XML strings to manipulate the data with a stored procedure.
That's probably about the number of lines in one small application backend that I would write. My questions for you are:
Were the procedures well documented?
Are there spec documents for the procedures?
Were the procedures written by someone who knew very little or a great deal about databases?
All of these could create problems regardless of where this code was in a web page, a middle-tier object, or a stored procedure.
If all you have is a couple of web / middle-tier developers, yea your procedures will rust. If you have someone on your team who is dedicated to the procedures then you do not have that problem. You can turn the argument right back around on itself. If I don't have any web developers and only database developers of course my web pages rust.
BTW, I hope you do not plan on using any of that business logic in any sort of reporting...unless of course you decided to go out and build an entire reporting engine instead of buying off the shelf. Then you get to keep that logic in sync between your higher layers and your reports when you could be running all of it from the same stored procedure.
Let me start out by saying, developers work well in there chosen language but the difference between the code and schemas I have seen between people that understand databases and people who code apps/web pages/middle tier objects is quite shocking. I wouldn't sit down today and pretend to write ASP, PHP, Python code, etc. and be in expert at it. Quite frankly my code would probably suck.
A few bullets
1. Application coders write suck performing SQL and running SQL dynamically makes performance problems worse
2. Forget your pipe dream about writing SQL one time and running it on all database platforms, the SQL is so generic and so inefficient that it inherently leads back to number 1
3. Its better to enforce data integrity in the database, coders who leave all their code in ASP and middle-tier objects don't put things like foreign keys on their tables, have flags flipped incorrectly, and wonder why there are orphan records all over the database. True story, during a conversion of another bank's records I found a customer hadn't been billed for approximately $70,000 worth of interest because of poor data integrity
4. Rolling out changes to stored procedures is much easier then pushing out changes to application code along with being easier to unit test
5. Stored procedures facilitate the use of transactions and set-based operations
I have found VERY few app coders (10+) that actually could write good, clean, efficient SQL code and design schemas to match. The problem lies when you're dealing with a large data-centric application, ALMOST ALWAYS YOUR PERFORMANCE ISSUE LIES IN THE SQL! If you have someone writing dynamic SQL looping through a 500,000 record resultset doing something like this (this comes from an application we purchased), your performance will be horrendous:
BEGIN TRAN
UPDATE IAR SET ARIBDATE = '7/30/2004' WHERE ARRECID = 38196.810543788582
COMMIT TRAN
Your application coders will write this sort of crap instead of using one set-based operation and you will all wonder why your application takes so long to complete an operation.
Your best bet, find two or three good SQL developers and have them do traces and find out how many of those 3000+ stored procedures written actually are getting used. My guess is a whole bunch of them are not being used or just were never cleaned off after their retirement. Next, go in and let them figure out how many of these procedures are one-off of one another, you probably take out a good 20% from there. Now you're getting towards a more manageable number. Very few people are good at database development. It is a unique skill set that can have a major impact on the maintainability and performance of your application. Stay with stored procedures and find some additional database developers if you need them. Let your app and web coders code what there good at, let database developers code what they are good at and you will have a wonderful application.
A small island off of Vanau Levu, Fiji Islands called Nukubati.