|
Ok this is a tricky one to explain.
I am creating an app that will have PAGES, currently I'm using PageID as the key to SEL the record.
The issue I'm having now is that I want users to be able to EDIT pages, but not lose the previous page (for history...
Started by nobosh on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
each document is really a revision:
doc - (doc_id)
revision - (rev_id, doc_id, version_num, name multiple pages, a page has multiple versions (each with some version info (e.g., date, edit count), and a foreign key to its page) Viewing....
|
|
I'm creating a database table and I don't have a logical primary key assigned to it. So, I'm thinking about leaving it without a primary key, but I'm felling a bit guiltly about it. Should I?
Should each and every table have a primary key?
EDIT: Okay,...
Started by Daniel Silveira on
, 13 posts
by 13 people.
Answer Snippets (Read the full thread at stackoverflow):
Why keep identical records? In MySQL , the InnoDB storage engine... .
If your table design does not need a primary key, rethink your design: most probably, you are missing something.
Table to be clustered, you need some kind of a primary key.
|
|
We have a lot of code that passes about “ Ids ” of data rows; these are mostly ints or guids. I could make this code safer by creating a different struct for the id of each database table. Then the type checker will help to find cases when the wrong ID...
Started by Ian Ringrose on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Works as you expect (i.e., you aren't loading inconsistent Key information into your classes (via dependency injection) that does robust tests of your Keys (hitting the database to verify each you explicitly cast the value to an ....
|
Ask your Facebook Friends
|
Hi,
I have a few database tables that really only require a unique id that references another table e.g.
Customer Holiday ID (PK) ---> CustomerID (PK) Forename From Surname To ....
These tables such as Holiday, only really exist to hold information...
Started by James on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Your second design assures that each instance of Holiday can be uniquelyThis really depends on what....
If each customer can have multiple holidays, then no, you) must have a unique key.
Could make the customerid the primary key.
|
|
I'm trying to get the ip, user, and most recent timestamp from a table which may contain both the current ip for a user and one or more prior ips. I'd like one row for each user containing the most recent ip and the associated timestamp. So if a table...
Started by idontwanttortfm on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Try this:
Select u.[username] ,u.[ip] ,q.[time_stamp] From [users] As u Inner Join ( Select [username] ,max(time_stamp) as [time_stamp] From [users] Group By [username]) As [q] On u.username = q.username And u.time_stamp = q.time_....
|
|
I have a table in a database that represents dates textually (i.e. "2008-11-09") and I would like to replace them with the UNIX timestamp. However, I don't think that MySQL is capable of doing the conversion on its own, so I'd like to write a little script...
Started by Kyle Cronin on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
The only time PK's become an issue is if you need to update a single row.
T set t.dates=t.olddate;
This shouldn't be dependent on a PK because MySQL can scan through each row in the table.
|
|
I have database servers, web servers, SVN servers, etc. Often times I ssh among them...or they auto-ssh.
How do I manage what server gets to log into which others?
Started by Alex on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at serverfault):
Use clusterssh.
I use Puppet, and have a class defined for every key, then classes that include those classes_file]] [user@]master-host to connect from each of these servers to one of them.
|
|
I'd like vim to automatically write my file as often as possible. The ideal would be every keystroke.
I need to save regularly so that my background build process will see it. It's a makefile for a latex document, and I'd like the previewer to show me...
Started by Paul Biggar on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
When updated, the WriteFile() function is called after each change..
You could also, were you so bold, rebind every single is visible, it's updated after each change to the file.
Every single time you type in Insert mode.
|
|
When you want to have public key based ssh logins for multiple machines, do you use one private key, and put the same public key on all of the machines? Or do you have one private/public key pair for each connection?
Started by Nick on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at serverfault):
For a given user , you can generate one keyI use one ....
Different passphrases on each key means that even properly, each server is going to have its own public key.
Capacity to store and manage several thousand keys.
|
|
This manages to create a new property on the object. But, can someone explain, with supporting links, why setAttrib behaves in two different ways? Why doesn't it cause a... wait for it... stack overflow!!??
class Test { public function setAttrib( $key...
Started by Derek Illchuk on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
One of your() or instead of throwing a recursivity ... .
If called from out of scope then the __set logic is called .
Meaning that within the object $this->$key sets the property $key .
The call for the property if the member is protected .
|