My favorite example is the removal of the ability to disable autoplay by holding down shift. WTF was the rationalization for that I wonder? Because it was a terrible way to approach it?
Now you have a very nice control panel applet that lets you set very granular rules for what kind of devices autoplay runs on, in what conditions, etc etc.
There are some things missing... but this is one thing they did right. You no longer have to edit the registry to disable autoplay.
There are other operating systems in this universe other than unix/unix-clones and windows.
Most Cisco kit runs Cisco IOS for the operating system (home-grown, based off DEC & VMS roots). There is a newer version of IOS that is based off QNX, which is also not Unix (though it is POSIX-compliant).
Another issue is dual monitors. But I don't use dual monitors, just want to when I an afford the second monitor but I'm not aware of laptops with dual monitor support; could be my own ignorance, I've not looked into it. Any modern corporate laptop docked in a port-replicator or docking station will support multi-mon (at least two monitors).
Just avoid the consumer level stuff. On Dell buy the Latitudes or Precision, rather than Vostro or Inspiron. On HP buy the Compaq laptops, rather than the pavilion garbage.
These will let you get docking stations or port-replicators that have dual-dvi out or dvi+vga out.
The HPs have a nice 'uber-docking-station' with a built-in NAS too, for a reasonable price.
Now mind you, if you are getting all this plus a laptop that has a powerful enough graphics card to play heavy games, you're looking at $2000-3000 including the docking station. But you have lots of flexibility.
As an example, I just put myself into an HP Compaq 8710w. 2.4GHz Core2Duo, 4GB ram, 120GB 7200 rpm hard drive, 512MB GeForce Quadro 1600M (real 512 memory, no shared garbage), abgn wifi and gigabit ethernet.
Not cheap, but hideously powerful. Running Vista Business x64 on it, and it just screams.
Well, one small advantage of having your apps online is that you don't have to manage updates and patches. Not true. You still have to manage patches of your web-browser (IE, Firefox, Opera, whatever), Flash, and your JRE.
Note that in the windows world, at least, these are _harder_ to keep patched and updated than MS Office.
MS Office just patches itself with Automatic Updates. No user intervention required.
Firefox, Opera, Flash, and Java all will notify you when they need to be updated, but then you have to runas/sudo the update installers as an admin account. In other words, it requires manual work, or a strong IT shop that packages and distributes updated Flash, browser, and JRE versions.
With a perfectly good, free online alternative (i.e., Google Docs), why should anyone put their data at risk by having it stored in only one place (i.e., at home) and likely not backed up? This can be turned around quite easily too.
With a perfectly good, powerful local alternative (ie, ms office or oo) and an elementary backup system, why would any business put their data at risk by entrusting it to an un-interested third party, who makes no claims about privacy, security, or backups. Not to mention why put your business at risk of being out of business anytime the ISP is flaky or problematic.
Mind you, I'm not saying there isnt a place for light-weight collab tools like Google Docs. Inter-business working groups, home users, college students, etc. These are great tools for them. And its great to have them in the ecosystem.
But I cant imagine why any business would put their critical data out 'in the cloud' without an ironclad NDA, Non-compete, backup guarantees, and SLAs.
Outlook is a very basic email and calendar program with lousy search Compared to what? I've got a little over 2GB on my exchange account, and search from within outlook is instant, whether I'm online or off. I have saved search folders, and a very powerful server-side rule system.
What else is missing?
and absolutely primitive web access (I can only access my Inbox on the web, not any of my filed emails... how pathetic). This makes no sense to me. What is a 'filed email'? Does that mean an email in a folder other than your Inbox?
Or do you mean that you're using exchange, but filing your mail in a PST file stored locally on your desktop, and then not understanding why its not available on the server?
If you put your 'filed email' on the exchange server, and dont take an extra step to move it into a local storage, then its accessible via the web (by which I assume you mean OWA).
I ask because I can access all 2+ GB of my email via OWA, plus my calendar, tasks, and anyone's calendars or tasks to whom I have delegated rights.
Plus since Outlook works online/offline, I have access to all of this stuff when I'm sitting in a car with no internet access.
In both of the cases you cite, it sounds like you have a misconfiguration, or are going out of your way to use the products in a non-standard way, and then complaining that they dont work right.
It may be different, but it is also much faster to use.
The interface is much 'flatter', and requires significantly less clickety-click and tappety-tap (ie, mouse clicking and/or typing).
So a little bit of learning curve, which isnt that bad, because its all the same functionality, with all the same names, just in a shallower interface. But after the learning curve, it ends up being noticeably faster and simpler to use.
You cant do that using a custom 404 page, but you can do it (retain all original information) using the IIS built in redirection functionality, or one of the many ISAPI url re-writers.
The URL re-writer is probably a better solution anyway, as it gets the http request before any of the more complicated stack get it, and then you can manage the list of redirects through a simple text file.
Also if they're using router ACLs to filter ports, that *is* a firewall, albeit a fairly crude one. Not necessarily. If they running cisco kit then they're doing they're doing router filtering through installed FSM (Firewall Service Modules).
Yeah, its high end cisco stuff, but they're running one of the worlds busiest websites, and they've got cash leaking out of their pockets. So yeah, they're probably going to be running high end kit.
Even without FSMs, router acls work fine as long as the number of statefully managed sessions (which usually means outbound) isnt too big.
Lets see, thats one link about a vuln in dotnetnuke, one link about an unpatched IIS5 (ie, win2000 server) being broken into back in 2002, another one about the SAME french dotnetnuke as the first site being hacked, another about an unpatched win2000 server from 2000, another about an unpatched win2000 server being hacked through the (2+ year old vuln) being unpatched, and one about a win2000 server getting hacked through an IIS zero-day vuln in 2001.
Of all of these, only one (the last one) is even remotely relevant, and you had to back 6 years and 2 major versions of the OS to find that.
IIS and Windows may or may not be secure, but your post added absolutely nothing to the conversation.
It is amazing that people post links to things but they forget to read their own links to see whether it supports their statements or not.
That secunia link you posted is actually quite impressive.
There have been 3 IIS6 advisories ever. None of them allow remote ownership of the box.
The worst one is this: "The vulnerability is caused due to a boundary error in asp.dll when handling ASP code. This can be exploited to cause a stack-based buffer overflow by placing ASP code that attempts to include a file with an overly long name (longer than 260 bytes).
Successful exploitation allows bypassing any security restrictions enforced by ASP or execution of API's with no ASP equivalent, but requires permissions to upload ASP code to a web folder."
The other two are a WebDAV DoS vuln, and one where the server can inappropriate return an error page if you dont have a custom one defined.
I dont think your one-line response had the effect you wanted it to.
All NT based systems do #1. Dont know if thats something that is even on the radar to be fixed.
2a is fixed in vista, in my experience.
2b is fixed in vista, in my experience.
Not sure about 2c, havent run into that yet on my new laptop.
In general, all the 'network issues locking up the shell' problems from XP and prior seem to be resolved. Not sure if you need to be running the new desktop manager to get that benny.
The times when some action is waiting on slow network responses seem to work correctly on a separate thread now. At least as far as I've seen, which has only been a couple weeks.
I know you think you're being amusing, but this is still a real problem.
To date, over the last 10 years, trying a new version of Linux approx every other year, I have NEVER been able to get a machine working with all the built-in hardware functional without at least a week of work and the help of experts.
My last two laptops were nearly unusable on Ubuntu and suse. In both case, the video card, network card, and wifi cards didnt work out of the box.
In both cases, the screen would actually go black on the ubuntu install and never recover. We had to use the alternate install disc and modify the grub config to not show a splash screen.
How is it that STILL none of the linux systems have a default, software 640x480 character mode fallback rendering?
I'm sitting here writing this on my new HP Compaq 8710w laptop (2.4 c2d, 4gb ram, nvidia geforce fx1600m w/ 512mb onboard, 120gb 7200rpm hdd, intel 82566MM gb nic, intel 4965 agn wifi).
It runs Vista Business x64 flawlessly. Fast, rock-solid stable, no disk thrashing, great new desktop manager. Believe me, this was a surprise to me too, but there you go. It's been fast and absolutely flawless so far (couple weeks).
But kubuntu 7.10 had big problems with the video, had trouble even getting a shell to work initially, and the wifi still doesnt work, despite the fact that there is a nice intel-sponsored open-source driver for this wifi card. Suse did a bit better, and dealt with the graphics card effortlessly, but still no wifi.
In neither case (kubuntu or suse) did standby or hibernate work.
This is almost identical to my experiences a while ago with my new (at the time) Dell Latitude D630.
If you have subselect that depends on the parent:
SELECT * FROM users u WHERE (SELECT * foo WHERE foo.bar = u.username); then doesn't that force the database to walk through the entire users table? This is functionally equivalent to:
select u.* from users u where u.username in (select bar from foo)
which is functionally equivalent to:
select u.* from users u inner join foo f on u.username = f.bar
Since they are functionally equivalent, any reasonable modern database system will perform them the same under the hood.
Given that, the only time it would walk through the entire users table (table-scan) is if there was no appropriate index on the table. Or if you were using an immature db system, like any version of MySQL prior to the current major ver.
When you were doing your multiple-minute query-with-subquery, what did the execution plan say was happening? Did it do a table-scan on users? Was this because there werent proper indexes?
Frankly, it sounds like you were using old versions of MySQL, which had an atrocious query planner/optimizer that couldnt deal with even mildly complex things like subqueries.
Where did you get the idea that the app is not allowed or should not modify the DB directly? I never said any such thing... and I have no idea where you would get that.
What I was saying is that the app you're writing now wont be the only one to modify the db/data over the data's lifetime.
Actually, the model class automatically enforces this rule. Upon saving the model class, it will automatically set the is_newest_revision of older revision objects to false. That is what abstraction and object oriented programming is for. It has only been around for, oh you know, 20-30 years? I dont think you understood what I was saying. When I say the data will be modified by other apps, I mean by other apps. IE, not your app. Which means the model classes you have now are not the ones that will be used in the future.
In fact, the future data-modifying app will probably be written in a different language, whatever is fashionable then.
Which brings back to my point. The data and schema you design now will far outlast the application you design now. New apps will run alongside your app, and eventually your app will retire. But the data will live on, with new apps on top of it. Those are the poor bastards who will be inheriting your 'legacy' schema and complaining that the RoR-of-the-future doesnt support legacy schemas.
Reading all this makes me think that people use stored procedures as a replacement for database model classes because their developers are too incompetent to write good SQL. What do stored procedures have to do with anything? Did I at any point bring up stored procedures?
There's also the chance that the surrogate key will be used by the query optimizer anyway, sometimes resulting in horribly inefficient joins. The surrogate key SHOULD be used for joins. It's the only column in common between the two joined tables.
Unless of course you've thrown data-integrity and normalization out the window by having redundant natural key data in the child/related tables too.
Actually no I am not talking about compound keys (although yes that is very, very important). I was talking about:
CREATE TABLE foo (company_name text PRIMARY KEY)
Which as I understand it, Rails is too stupid to understand. For that last sentence, I think you mean to say: "Rails is too smart to encourage you to do."
Your deisgn is a terrible choice, which you will regret within a year of production usage (probably sooner).
Company names change. Company names get typo'd and need to be updated. Companies merge.
The correct choice is to do this:
create table foo (id long identity primary key, company_name text unique)
This way, your schema guarantees no two company's get in with the same name (assuming thats appropriate), and changes in company names dont break integrity with child or related tables.
You seem to be stuck on N indexes over N+1 indexes (differences between a natural key and a natural plus opaque identity key). If that is really a compelling issue for your database, then something else is probably wrong, because thats a minor issue underl normal circumstances.
If you're working so far out on the ragged edge of extreme, billions of inserts/udpates per table per day, then you're already having to deal with load. The tiny marginal load, storage, etc increases from these N+1 indexes per table is just not a big deal.
I dont know your specific situation, but in the vast majority of them, I'd say you have your priorities out of whack.
Subqueries are expensive. I've tried several minutes to come up with a query, but it's 11:24 PM right now, and I'm a bit tired, and failed. So I'll leave it up to you. Subqueries are no more expensive than joins, and many query planners/optimizers will end up doing the exact same internal approach to both.
There is only one type of database where subqueries are expensive, and that is older versions of MySQL. And thats why, for many, many years, you didnt use MySQL if you needed a proper database, and not just a fancy ISAM indexed text file.
But if I waste a little space by adding an 'is_newest_revision' boolean column, and have the application update that column every time a new revision is inserted, then the query can be much simpler:
SELECT * FROM documents doc, document_revisions rev
WHERE doc.id = rev.document_id AND rev.is_newest_revision Just one join, no grouping, no subqueries, no aggregate functions. It's a simple query and the DBMS can execute it very quickly. Here I've wasted a little space but look at what I've gained. And thats fine until the second application starts modifying data in that DB. Then what if that developer didnt know about that rule? Since the db wasnt configured to guarantee data integrity the other developer has to somehow know that thats something the application must enforce to ensure integrity.
Thats not a good idea.
In case you're worried about data integrity: I do all updates in a transaction, so it's not possible for two revisions of the same document to have a true value on is_newest_revision. See above. Thats only a valid defense so long as your app is the only one modifying that data. If your app is successful, and survives more than a couple years, then in most enterprises you can almost be guaranteed that other apps will start working with it too.
My point from the very beginning, is that one should carefully weight the pros and cons of application code complexity and normalization, instead of blindly pursuing theoretical idealism. I'd agree, with an additional qualification that you also have to consider maintenance and data integrity for the lifetime of the application, where other apps may modify the data, or your original app may be completely replaced by another (but the data lives forever).
In that domain is where the whole 'its okay, cause my app does the data integrity, so I dont need to do it at the db-leve' argument falls down.
The data is separate from the app.
The lifetime of the data will be 2-10 times the lifetime of the app. Think about this carefully. This means that the data and schema will keep on being used long after the app you've written is abandoned or replaced.
Given that, its almost never appropriate to do data integrity in the app. That will almost certainly guarantee lack of data integrity at some point down the line in the data.
I don't use RoR at all, but these comments saying that co7mposite primary keys are useless are simply insane. They're a fact of life... They're only a fact of life when you inherit a schema from a bad dba or designer.
There are very very few cases where composite keys AS the primary keys are a good idea. In fact, I cant think of any.
Now thats not to say that there wont be natural composite keys in your data. And if so they probably should have unique constraints on them.
But they should not, ever, be the primary key for a table. They are candidate keys.
But you want a one-column, fast-indexed (ie, numeric where possible) opaque identity key as your primary key.
I'd love to hear some compelling cases where natural composite keys as the primary key make sense, as I cant think of any, and in 10+ years have never seen one.
The only reason I've ever heard to favor composite keys is that it makes it 'easier' for the dba to read the data directly. Which is fairly pathetic.
If the client says that "orders have order items, numbered 1,2,3,4..." then your model should have (ORDER#, LINE#) as the compound key for order items. If the client says "customers are identified by an arbitrary customer number", then it's okay to use an artificial ID. If the client says "customers are identified by SSNs" then that's your key. I hate to feed the cowards, but I just cant let this go.
You are completely incorrect.
If your domain model describes the way an actor finds an entry is by Order# and Line#, that should in no way, shape, or form decree what your technical artifacts look like.
The correct thing to do in that case is to have a unique, opaque, identity key (numeric or guid, just so long as its unrelated to the record data, and has no additional meaning beyond the unique value of that record).
Then you can also add unique constraints or indexes to the composite key, and/or you can enforce that unique constraint in the application. Or both, for the smart ones.
But you need to have a unique way to identify the record THAT IS NOT SUBJECT TO CHANGE. In your example, you could re-order the lines, or one line could have been a mistake and you need to move it to a different order.
If you've used composite keys on order# and line#, then you've got alot of cleanup work to do after your change.
If you've used proper opaque identity keys, then you just change the data, and there are no side effects.
Since in that case your joins are also done on the identity keys, your relatinoships are stable even when you change order# or line#.
The SSN one is even worse. I can guarantee you that if you do that, someone will have the wrong SSN, and it will need to be changed in your data.
If you've used SSN as the primary key, then its a pain in the ass, and you have to do data integrity cleanup.
If you've used a proper opaque identity key, then you just change the SSN, and there are no side effects.
This is stuff you learn the first time you write an app as a junior developer without a mentor, and use SSN as a key. A year or two later you come to regret it, and the lesson is learned for a lifetime.
Ahh, I see. So your concern is that you cant use GUIDs or some other globally unique, replication friendly key?
Thats true, but its also a pretty niche issue.
Even read-only replication doesnt require GUIDs on most systems IIRC, so its only an issue where you're using a web front end on a multi-master replication configuration.
Thats pretty unique/rare... and doesnt strike me as the best of all possible designs, at least for what I can think of why you'd do that.
Even in VB if you want to do something else with let's say the date/time class that it can't do, you have to re-write the entire class yourself. Why?
Just create a MyDateTime class, and delegate all the built-in methods of the native date-time to the native date-time, and then add your own custom extensions. Then use your MyDateTime.
That way you dont have to re-write the entire class, just some wrapper methods and your unique extensions.
Now mind you, I've never done that particular thing in VB, so maybe there's a technical gotcha there I cant see. Please yell if so.
What is it that you see in having unique, opaque, identity keys that prevents proper normalization of a database?
In my experience, its usually the amateurs who love to make the 'name' or 'code' of a record the unique key, or several combined columns of such. This then of course creates havoc down the road when you need to change one of these 'keys'.
I dont think they strictly have to be autoincrementing.... just so that they're numeric and unique (parts of RoR would be funky if you used GUIDs for your identity values, as an example). Of course, maybe I'm wrong about RoR having to be auto-incrementing... but I sure havent seen that yet.
You're trying to mis-use the tool if you're trying to edit PDFs. Thats not what they're for. They're fully intended to be static, read-only documents. Thats their whole point.
Thats like trying to do all your vector graphics in raw bitmap and wondering why its hard. Thats just not what it was intended for.
Now you have a very nice control panel applet that lets you set very granular rules for what kind of devices autoplay runs on, in what conditions, etc etc.
There are some things missing
There are other operating systems in this universe other than unix/unix-clones and windows.
Most Cisco kit runs Cisco IOS for the operating system (home-grown, based off DEC & VMS roots). There is a newer version of IOS that is based off QNX, which is also not Unix (though it is POSIX-compliant).
Just avoid the consumer level stuff. On Dell buy the Latitudes or Precision, rather than Vostro or Inspiron. On HP buy the Compaq laptops, rather than the pavilion garbage.
These will let you get docking stations or port-replicators that have dual-dvi out or dvi+vga out.
The HPs have a nice 'uber-docking-station' with a built-in NAS too, for a reasonable price.
Now mind you, if you are getting all this plus a laptop that has a powerful enough graphics card to play heavy games, you're looking at $2000-3000 including the docking station. But you have lots of flexibility.
As an example, I just put myself into an HP Compaq 8710w. 2.4GHz Core2Duo, 4GB ram, 120GB 7200 rpm hard drive, 512MB GeForce Quadro 1600M (real 512 memory, no shared garbage), abgn wifi and gigabit ethernet.
Not cheap, but hideously powerful. Running Vista Business x64 on it, and it just screams.
Note that in the windows world, at least, these are _harder_ to keep patched and updated than MS Office.
MS Office just patches itself with Automatic Updates. No user intervention required.
Firefox, Opera, Flash, and Java all will notify you when they need to be updated, but then you have to runas/sudo the update installers as an admin account. In other words, it requires manual work, or a strong IT shop that packages and distributes updated Flash, browser, and JRE versions.
With a perfectly good, powerful local alternative (ie, ms office or oo) and an elementary backup system, why would any business put their data at risk by entrusting it to an un-interested third party, who makes no claims about privacy, security, or backups. Not to mention why put your business at risk of being out of business anytime the ISP is flaky or problematic.
Mind you, I'm not saying there isnt a place for light-weight collab tools like Google Docs. Inter-business working groups, home users, college students, etc. These are great tools for them. And its great to have them in the ecosystem.
But I cant imagine why any business would put their critical data out 'in the cloud' without an ironclad NDA, Non-compete, backup guarantees, and SLAs.
What else is missing? and absolutely primitive web access (I can only access my Inbox on the web, not any of my filed emails... how pathetic). This makes no sense to me. What is a 'filed email'? Does that mean an email in a folder other than your Inbox?
Or do you mean that you're using exchange, but filing your mail in a PST file stored locally on your desktop, and then not understanding why its not available on the server?
If you put your 'filed email' on the exchange server, and dont take an extra step to move it into a local storage, then its accessible via the web (by which I assume you mean OWA).
I ask because I can access all 2+ GB of my email via OWA, plus my calendar, tasks, and anyone's calendars or tasks to whom I have delegated rights.
Plus since Outlook works online/offline, I have access to all of this stuff when I'm sitting in a car with no internet access.
In both of the cases you cite, it sounds like you have a misconfiguration, or are going out of your way to use the products in a non-standard way, and then complaining that they dont work right.
It may be different, but it is also much faster to use.
The interface is much 'flatter', and requires significantly less clickety-click and tappety-tap (ie, mouse clicking and/or typing).
So a little bit of learning curve, which isnt that bad, because its all the same functionality, with all the same names, just in a shallower interface. But after the learning curve, it ends up being noticeably faster and simpler to use.
Can you point to anything in the article that indicates this 'unix security blanket' you refer to?
All I see in it is that they have acls in place on the routers (probably with FSMs), which are cisco kit.
You do know that Cisco routers dont run Unix, right?
You cant do that using a custom 404 page, but you can do it (retain all original information) using the IIS built in redirection functionality, or one of the many ISAPI url re-writers.
The URL re-writer is probably a better solution anyway, as it gets the http request before any of the more complicated stack get it, and then you can manage the list of redirects through a simple text file.
Yeah, its high end cisco stuff, but they're running one of the worlds busiest websites, and they've got cash leaking out of their pockets. So yeah, they're probably going to be running high end kit.
Even without FSMs, router acls work fine as long as the number of statefully managed sessions (which usually means outbound) isnt too big.
Wow, your google-fu is not very good.
Lets see, thats one link about a vuln in dotnetnuke, one link about an unpatched IIS5 (ie, win2000 server) being broken into back in 2002, another one about the SAME french dotnetnuke as the first site being hacked, another about an unpatched win2000 server from 2000, another about an unpatched win2000 server being hacked through the (2+ year old vuln) being unpatched, and one about a win2000 server getting hacked through an IIS zero-day vuln in 2001.
Of all of these, only one (the last one) is even remotely relevant, and you had to back 6 years and 2 major versions of the OS to find that.
IIS and Windows may or may not be secure, but your post added absolutely nothing to the conversation.
It is amazing that people post links to things but they forget to read their own links to see whether it supports their statements or not.
That secunia link you posted is actually quite impressive.
There have been 3 IIS6 advisories ever. None of them allow remote ownership of the box.
The worst one is this:
"The vulnerability is caused due to a boundary error in asp.dll when handling ASP code. This can be exploited to cause a stack-based buffer overflow by placing ASP code that attempts to include a file with an overly long name (longer than 260 bytes).
Successful exploitation allows bypassing any security restrictions enforced by ASP or execution of API's with no ASP equivalent, but requires permissions to upload ASP code to a web folder."
The other two are a WebDAV DoS vuln, and one where the server can inappropriate return an error page if you dont have a custom one defined.
I dont think your one-line response had the effect you wanted it to.
All NT based systems do #1. Dont know if thats something that is even on the radar to be fixed.
2a is fixed in vista, in my experience.
2b is fixed in vista, in my experience.
Not sure about 2c, havent run into that yet on my new laptop.
In general, all the 'network issues locking up the shell' problems from XP and prior seem to be resolved. Not sure if you need to be running the new desktop manager to get that benny.
The times when some action is waiting on slow network responses seem to work correctly on a separate thread now. At least as far as I've seen, which has only been a couple weeks.
I know you think you're being amusing, but this is still a real problem.
To date, over the last 10 years, trying a new version of Linux approx every other year, I have NEVER been able to get a machine working with all the built-in hardware functional without at least a week of work and the help of experts.
My last two laptops were nearly unusable on Ubuntu and suse. In both case, the video card, network card, and wifi cards didnt work out of the box.
In both cases, the screen would actually go black on the ubuntu install and never recover. We had to use the alternate install disc and modify the grub config to not show a splash screen.
How is it that STILL none of the linux systems have a default, software 640x480 character mode fallback rendering?
I'm sitting here writing this on my new HP Compaq 8710w laptop (2.4 c2d, 4gb ram, nvidia geforce fx1600m w/ 512mb onboard, 120gb 7200rpm hdd, intel 82566MM gb nic, intel 4965 agn wifi).
It runs Vista Business x64 flawlessly. Fast, rock-solid stable, no disk thrashing, great new desktop manager. Believe me, this was a surprise to me too, but there you go. It's been fast and absolutely flawless so far (couple weeks).
But kubuntu 7.10 had big problems with the video, had trouble even getting a shell to work initially, and the wifi still doesnt work, despite the fact that there is a nice intel-sponsored open-source driver for this wifi card. Suse did a bit better, and dealt with the graphics card effortlessly, but still no wifi.
In neither case (kubuntu or suse) did standby or hibernate work.
This is almost identical to my experiences a while ago with my new (at the time) Dell Latitude D630.
SELECT * FROM users u WHERE (SELECT * foo WHERE foo.bar = u.username);
then doesn't that force the database to walk through the entire users table? This is functionally equivalent to:
select u.* from users u where u.username in (select bar from foo)
which is functionally equivalent to:
select u.* from users u inner join foo f on u.username = f.bar
Since they are functionally equivalent, any reasonable modern database system will perform them the same under the hood.
Given that, the only time it would walk through the entire users table (table-scan) is if there was no appropriate index on the table. Or if you were using an immature db system, like any version of MySQL prior to the current major ver.
When you were doing your multiple-minute query-with-subquery, what did the execution plan say was happening? Did it do a table-scan on users? Was this because there werent proper indexes?
Frankly, it sounds like you were using old versions of MySQL, which had an atrocious query planner/optimizer that couldnt deal with even mildly complex things like subqueries. Where did you get the idea that the app is not allowed or should not modify the DB directly? I never said any such thing
What I was saying is that the app you're writing now wont be the only one to modify the db/data over the data's lifetime. Actually, the model class automatically enforces this rule. Upon saving the model class, it will automatically set the is_newest_revision of older revision objects to false. That is what abstraction and object oriented programming is for. It has only been around for, oh you know, 20-30 years? I dont think you understood what I was saying. When I say the data will be modified by other apps, I mean by other apps. IE, not your app. Which means the model classes you have now are not the ones that will be used in the future.
In fact, the future data-modifying app will probably be written in a different language, whatever is fashionable then.
Which brings back to my point. The data and schema you design now will far outlast the application you design now. New apps will run alongside your app, and eventually your app will retire. But the data will live on, with new apps on top of it. Those are the poor bastards who will be inheriting your 'legacy' schema and complaining that the RoR-of-the-future doesnt support legacy schemas. Reading all this makes me think that people use stored procedures as a replacement for database model classes because their developers are too incompetent to write good SQL. What do stored procedures have to do with anything? Did I at any point bring up stored procedures?
Unless of course you've thrown data-integrity and normalization out the window by having redundant natural key data in the child/related tables too.
CREATE TABLE foo (company_name text PRIMARY KEY)
Which as I understand it, Rails is too stupid to understand. For that last sentence, I think you mean to say: "Rails is too smart to encourage you to do."
Your deisgn is a terrible choice, which you will regret within a year of production usage (probably sooner).
Company names change. Company names get typo'd and need to be updated. Companies merge.
The correct choice is to do this:
create table foo (id long identity primary key, company_name text unique)
This way, your schema guarantees no two company's get in with the same name (assuming thats appropriate), and changes in company names dont break integrity with child or related tables.
You seem to be stuck on N indexes over N+1 indexes (differences between a natural key and a natural plus opaque identity key). If that is really a compelling issue for your database, then something else is probably wrong, because thats a minor issue underl normal circumstances.
If you're working so far out on the ragged edge of extreme, billions of inserts/udpates per table per day, then you're already having to deal with load. The tiny marginal load, storage, etc increases from these N+1 indexes per table is just not a big deal.
I dont know your specific situation, but in the vast majority of them, I'd say you have your priorities out of whack.
Excellent, thanks for the pointer.
/persons/15
/persons/{123H4-D838-AD23284849-2238}
My thinking in saying (in an earlier post) that it may cause problems is because it gets fairly ugly to replace this:
with:
but it would probably work, or could be made to work.
There is only one type of database where subqueries are expensive, and that is older versions of MySQL. And thats why, for many, many years, you didnt use MySQL if you needed a proper database, and not just a fancy ISAM indexed text file. But if I waste a little space by adding an 'is_newest_revision' boolean column, and have the application update that column every time a new revision is inserted, then the query can be much simpler:
SELECT * FROM documents doc, document_revisions rev
WHERE doc.id = rev.document_id AND rev.is_newest_revision
Just one join, no grouping, no subqueries, no aggregate functions. It's a simple query and the DBMS can execute it very quickly. Here I've wasted a little space but look at what I've gained. And thats fine until the second application starts modifying data in that DB. Then what if that developer didnt know about that rule? Since the db wasnt configured to guarantee data integrity the other developer has to somehow know that thats something the application must enforce to ensure integrity.
Thats not a good idea. In case you're worried about data integrity: I do all updates in a transaction, so it's not possible for two revisions of the same document to have a true value on is_newest_revision. See above. Thats only a valid defense so long as your app is the only one modifying that data. If your app is successful, and survives more than a couple years, then in most enterprises you can almost be guaranteed that other apps will start working with it too. My point from the very beginning, is that one should carefully weight the pros and cons of application code complexity and normalization, instead of blindly pursuing theoretical idealism. I'd agree, with an additional qualification that you also have to consider maintenance and data integrity for the lifetime of the application, where other apps may modify the data, or your original app may be completely replaced by another (but the data lives forever).
In that domain is where the whole 'its okay, cause my app does the data integrity, so I dont need to do it at the db-leve' argument falls down.
The data is separate from the app.
The lifetime of the data will be 2-10 times the lifetime of the app. Think about this carefully. This means that the data and schema will keep on being used long after the app you've written is abandoned or replaced.
Given that, its almost never appropriate to do data integrity in the app. That will almost certainly guarantee lack of data integrity at some point down the line in the data.
There are very very few cases where composite keys AS the primary keys are a good idea. In fact, I cant think of any.
Now thats not to say that there wont be natural composite keys in your data. And if so they probably should have unique constraints on them.
But they should not, ever, be the primary key for a table. They are candidate keys.
But you want a one-column, fast-indexed (ie, numeric where possible) opaque identity key as your primary key.
I'd love to hear some compelling cases where natural composite keys as the primary key make sense, as I cant think of any, and in 10+ years have never seen one.
The only reason I've ever heard to favor composite keys is that it makes it 'easier' for the dba to read the data directly. Which is fairly pathetic.
You are completely incorrect.
If your domain model describes the way an actor finds an entry is by Order# and Line#, that should in no way, shape, or form decree what your technical artifacts look like.
The correct thing to do in that case is to have a unique, opaque, identity key (numeric or guid, just so long as its unrelated to the record data, and has no additional meaning beyond the unique value of that record).
Then you can also add unique constraints or indexes to the composite key, and/or you can enforce that unique constraint in the application. Or both, for the smart ones.
But you need to have a unique way to identify the record THAT IS NOT SUBJECT TO CHANGE. In your example, you could re-order the lines, or one line could have been a mistake and you need to move it to a different order.
If you've used composite keys on order# and line#, then you've got alot of cleanup work to do after your change.
If you've used proper opaque identity keys, then you just change the data, and there are no side effects.
Since in that case your joins are also done on the identity keys, your relatinoships are stable even when you change order# or line#.
The SSN one is even worse. I can guarantee you that if you do that, someone will have the wrong SSN, and it will need to be changed in your data.
If you've used SSN as the primary key, then its a pain in the ass, and you have to do data integrity cleanup.
If you've used a proper opaque identity key, then you just change the SSN, and there are no side effects.
This is stuff you learn the first time you write an app as a junior developer without a mentor, and use SSN as a key. A year or two later you come to regret it, and the lesson is learned for a lifetime.
Ahh, I see. So your concern is that you cant use GUIDs or some other globally unique, replication friendly key?
... and doesnt strike me as the best of all possible designs, at least for what I can think of why you'd do that.
Thats true, but its also a pretty niche issue.
Even read-only replication doesnt require GUIDs on most systems IIRC, so its only an issue where you're using a web front end on a multi-master replication configuration.
Thats pretty unique/rare
Just create a MyDateTime class, and delegate all the built-in methods of the native date-time to the native date-time, and then add your own custom extensions. Then use your MyDateTime.
That way you dont have to re-write the entire class, just some wrapper methods and your unique extensions.
Now mind you, I've never done that particular thing in VB, so maybe there's a technical gotcha there I cant see. Please yell if so.
I'm a little confused by your comment.
.... just so that they're numeric and unique (parts of RoR would be funky if you used GUIDs for your identity values, as an example). Of course, maybe I'm wrong about RoR having to be auto-incrementing ... but I sure havent seen that yet.
What is it that you see in having unique, opaque, identity keys that prevents proper normalization of a database?
In my experience, its usually the amateurs who love to make the 'name' or 'code' of a record the unique key, or several combined columns of such. This then of course creates havoc down the road when you need to change one of these 'keys'.
I dont think they strictly have to be autoincrementing
You're trying to mis-use the tool if you're trying to edit PDFs. Thats not what they're for. They're fully intended to be static, read-only documents. Thats their whole point.
Thats like trying to do all your vector graphics in raw bitmap and wondering why its hard. Thats just not what it was intended for.