code_junkie

Trying to design/model simple database app

Nov 13th, 2011
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. feed 1: <input type="text" value="http://rss.news.yahoo.com/rss/topstories"> **the default feed for everyone, but they can change it**
  2. feed 2: <input type="text" value="http://content.usatoday.com">
  3. feed 3: <input type="text" value="http://newsrss.bbc.co.uk/rss/newsonl.../world/rss.xml">
  4. feed 4: <input type="text" value="">
  5. feed 5: <input type="text" value="">
  6. feed 6: <input type="text" value="">
  7. feed 7: <input type="text" value="">
  8. feed 8: <input type="text" value="">
  9. feed 9: <input type="text" value="">
  10. <input type="submit" value="update">
  11.  
  12. CREATE TABLE users (
  13. user_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
  14. first_name VARCHAR(20) NOT NULL,
  15. last_name VARCHAR(40) NOT NULL,
  16. state CHAR(2) NOT NULL,
  17. email VARCHAR(60) NOT NULL,
  18. pass CHAR(32) NOT NULL,
  19. registration_date DATETIME NOT NULL,
  20.  
  21. PRIMARY KEY(user_id),
  22. UNIQUE (email),
  23. INDEX login (email, pass),
  24. INDEX state (state)
  25. );
  26.  
  27. CREATE TABLE feeds (
  28. user_id SMALLINT UNSIGNED NOT NULL,
  29. feed_url VARCHAR(255) NOT NULL DEFAULT 'http://rss.news.yahoo.com/rss/topstories',
  30. feed_id SMALLINT UNSIGNED NOT NULL DEFAULT 1,
  31.  
  32. PRIMARY KEY(user_id, feed_url)
  33. );
Add Comment
Please, Sign In to add comment