I feel like a nerd

Random irrelevance that just didn't fit into other forums. Talk about anything.

Moderator: Talkative People

Post Reply
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

I feel like a nerd

Post by MarauderIIC »

Today, I feel like a true nerd again. It's not often I use Linux shells any more, but one of my homework problems was
hw wrote:# (1pt) Visit MultiLab. Login to a machine, and login into MySQL. Create table customers(lname,fname,address). Insert marek's record, print contents of the table and attach to hw4.
So after spending about 40 minutes (I was not yet a nerd again) trying to figure out what sql they had installed in multilab (mysqld nonexistent, ps au | grep mysqld showed) remotely -- using PuTTy -- because I didn't want to drive to campus,

ls /usr/bin/*sql* turned up 'sqlite' and 'sqlite3' which looked promising
So,

Code: Select all

penstemon:~> man sqlite3
penstemon:~> sqlite3 data1.db
SQLite version 3.4.2
Enter ".help" for instructions
sqlite> CREATE TABLE Customers(lname, fname, address);
sqlite> INSERT INTO Customers(lname, fname, address)
...> VALUES('Marek', 'Victor', '22 Broadway Lexington KY');
sqlite> SELECT * FROM Customers;
Marek|Victor|22 Broadway Lexington KY
sqlite> .headers ON
sqlite> SELECT * FROM Customers;
lname|fname|address
Marek|Victor|22 Broadway Lexington KY
sqlite> .mode TABS
mode should be one of: column csv html insert line list tabs tcl
sqlite> .mode tabs
sqlite> SELECT * FROM Customers;
lname fname address
Marek Victor 22 Broadway Lexington KY
sqlite> .exit
penstemon:~> exit
Hooray! Now I'm just confused as to why it let me do it without types.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
trufun202
Game Developer
Game Developer
Posts: 1105
Joined: Sun Sep 21, 2008 12:27 am
Location: Dallas, TX
Contact:

Re: I feel like a nerd

Post by trufun202 »

SQLite ignores the datatype specification of columns and allows any kind of data to be put in a column regardless of its declared datatype.
Sounds like SQLite doesn't care about the datatype. (scary)

But, gratz on working smarter, not harder. You win!
-Chris

YouTube | Twitter | Rad Raygun

“REAL ARTISTS SHIP” - Steve Jobs
User avatar
sparda
Chaos Rift Junior
Chaos Rift Junior
Posts: 291
Joined: Tue Sep 23, 2008 3:54 pm

Re: I feel like a nerd

Post by sparda »

Whoa, I'll completely dodge this one. I have absolutely no experience with server-side stuff, or SQL for that matter (embarrassing, I know).
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: I feel like a nerd

Post by dandymcgee »

So was this on your account, or was everyone assigned a different entry? I'm wondering how every student created a table called "Customers" for their HW.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: I feel like a nerd

Post by Falco Girgis »

I only have slight database experience, but I have server side experience with Perl (back in the day) and minor PHP things.

So what the hell? Databasing is now part of your "Computer Science" degree's cirriculum?
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Re: I feel like a nerd

Post by MarauderIIC »

dandymcgee wrote:So was this on your account, or was everyone assigned a different entry? I'm wondering how every student created a table called "Customers" for their HW.
The database is local to the student.
GyroVorbis wrote:I only have slight database experience, but I have server side experience with Perl (back in the day) and minor PHP things.

So what the hell? Databasing is now part of your "Computer Science" degree's cirriculum?
I'm using a database extensively in the web application I am developing for Cycom, and it's definitely in my best professional interest to at least take a class on it. That class is a pick from one of a group of six, and I have to take one of the group. So it's like a limited-choice elective. My technical electives though are Intro to AI and Software Testing Techniques.
Or maybe software testing is one of the req group and Intro to Database Management Systems is my technical elective. I don't recall atm.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
trufun202
Game Developer
Game Developer
Posts: 1105
Joined: Sun Sep 21, 2008 12:27 am
Location: Dallas, TX
Contact:

Re: I feel like a nerd

Post by trufun202 »

GyroVorbis wrote:So what the hell? Databasing is now part of your "Computer Science" degree's cirriculum?
It was for me - well at least Databases 1 was required. At the time I was already using SQL at work, so it was a blow off class for me.

Databases 2, on the other hand, was a BITCH. It was primarily a math class, which pissed me off. I was like, "WTF! I use databases at work everyday, and we never have to solve 6 page problems regarding 'tuples'."
-Chris

YouTube | Twitter | Rad Raygun

“REAL ARTISTS SHIP” - Steve Jobs
User avatar
Arce
Jealous Self-Righteous Prick
Jealous Self-Righteous Prick
Posts: 2153
Joined: Mon Jul 10, 2006 9:29 pm

Re: I feel like a nerd

Post by Arce »

Databases 2, on the other hand, was a BITCH. It was primarily a math class, which pissed me off. I was like, "WTF! I use databases at work everyday, and we never have to solve 6 page problems regarding 'tuples'."
:lol: :lol:
<qpHalcy0n> decided to paint the office, now i'm high and my hands hurt
Post Reply