| | |
Database set-up
Please support our MySQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2006
Posts: 75
Reputation:
Solved Threads: 0
Hey how will I write a text file to setup a database with the information below
Database set-up:
Members Table:
id - int primary key auto_increment.
username - varchar 15.
password - varchar 32. will be a md5 and sha1 hash of the password then the username.
e-mail - varchar 35.
admin - tinyint. will either be a value of 1 (admin) or the default, 0 (regular member)
last_ip - varchar 15. will store the last ip address person logged in with.
Buddy List:
uid - User ID from members table. int.
buddy - Buddies username or id. either varchar 15 or int.
blocked - Blocked users username or id. either varchar 15 or int.
Messages:
id - message id. int primary key auto_increment.
from - users name. varchar 15 characters.
to - buddies name. varchar 15 characters.
message - blob
time - timestamp CURRENT_TIMESTAMP.
Database set-up:
Members Table:
id - int primary key auto_increment.
username - varchar 15.
password - varchar 32. will be a md5 and sha1 hash of the password then the username.
e-mail - varchar 35.
admin - tinyint. will either be a value of 1 (admin) or the default, 0 (regular member)
last_ip - varchar 15. will store the last ip address person logged in with.
Buddy List:
uid - User ID from members table. int.
buddy - Buddies username or id. either varchar 15 or int.
blocked - Blocked users username or id. either varchar 15 or int.
Messages:
id - message id. int primary key auto_increment.
from - users name. varchar 15 characters.
to - buddies name. varchar 15 characters.
message - blob
time - timestamp CURRENT_TIMESTAMP.
•
•
Join Date: Aug 2007
Posts: 165
Reputation:
Solved Threads: 18
You're on your own for accessing the MySQL server.
The following statements usually work for creating databases and tables:
Download the MySQL manual (PDF) and peruse the syntax of the aforementioned statements. I taught myself MySQL by RTFMing, though I did have a slight head start by having learned Informix 15 years earlier, so SQL wasn't a completely foreign language.
N
The following statements usually work for creating databases and tables:
MySQL Syntax (Toggle Plain Text)
CREATE DATABASE; USE; CREATE TABLE a (field1, field2, ..., key);
Download the MySQL manual (PDF) and peruse the syntax of the aforementioned statements. I taught myself MySQL by RTFMing, though I did have a slight head start by having learned Informix 15 years earlier, so SQL wasn't a completely foreign language.
N
Last edited by Fest3er; Dec 25th, 2008 at 12:52 am.
![]() |
Similar Threads
- Search code in a database (Visual Basic 4 / 5 / 6)
- built in login and createuser wizard but for a remote SQL database? how to change? (ASP.NET)
- Insert into sql database (ASP.NET)
- Using Database Content to produce drop down options (JSP)
- Submit info to database error (PHP)
- conditional database query (ColdFusion)
- Assistance needed with graphics to be used in database. (Visual Basic 4 / 5 / 6)
- Info in Database converted to Chart (Visual Basic 4 / 5 / 6)
Other Threads in the MySQL Forum
- Previous Thread: mysql logic
- Next Thread: plz could any one help me to undresdant this
| Thread Tools | Search this Thread |
1 agplv3 amazon api aws bizspark breathalyzer changingprices cmg communityjournalism contentmanagement contractors copyright count court crm data database design developer development distinct drupal dui ec2 email enterprise error eudora facebook form foss gartner gnu government gpl groklaw groupware hiring hyperic images innerjoins insert ip joebrockmeier join journalism keyword keywords kickfire laptop law legal license licensing linux maintenance managing mariadb matchingcolumns metron micromanage microsoft microsoftexchange mindtouch montywidenius mozilla multiple mysql mysqlcolumnupdating mysqldatetimeordermax() mysqlindex mysqlinternalqueries mysqlsearch news open-xchange opendatabasealliance opengovernment opensource operand oracle penelope php priceupdating query referencedesign reorderingcolumns resultset select sharepoint simpledb sourcecode spotify sql sugarcrm syntax techsupport thunderbird transparency virtualization





