Allow user to create table via the Internet

This is a discussion on Allow user to create table via the Internet within the MySQL Database forums, part of the Database Forums category; Hello, I have a web site that allow user to login and create their user and password, after that, they ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-30-2007
kwan
 
Posts: n/a
Default Allow user to create table via the Internet

Hello,

I have a web site that allow user to login and create their user and
password, after that, they will also create a address table for
themself with their own privilege that allow them to modify and delete
the table. My question is should I allow the table to create according
to the user? Any security issue?

this is the real database

user table
name
address
password


name_address_book
add_id
name
address
state
city
zip
country

if I use my name as a login: kwan

then the table for the address book is kwan_address_book

if my friend naem: lilo
then his table for the address book is lilo_address_book


should I create each user with the table like that or I should store
the information altogether in one table which share with all other
users. Hope to get some explaination

THank you

Kwan

Reply With Quote
  #2 (permalink)  
Old 05-31-2007
subtenante
 
Posts: n/a
Default Re: Allow user to create table via the Internet

On 30 May 2007 10:27:47 -0700, kwan <kwan.jingx@gmail.com> wrote:

>should I create each user with the table like that or I should store
>the information altogether in one table which share with all other
>users. Hope to get some explaination


Second option.
You can have a table like :

table : user
user_id *
....

table : address_book
user_id
add_id *
....

The primary key on these tables is shown with a *.
user_id in address_book is a foreign key to our user table.

Having only two tables will be far easier to work with.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:30 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0