Nov 23, 2009

Lists Of Users, Etc In Tables

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Databases

Lists Of Users, Etc In Tables

FirefoxRocks
I'm wondering what the most efficient way of doing this is.
I have a table with users in it, each user has a unique id.
Now suppose I had a table with groups in it. Each user can join the group. I estimate that the maximum size of a group would be 100 users.

How do I store the user IDs in the group table? Do I make a column called `members` and store them in a semicolon separated list? If so, how do I delete members?

Then again, there might be other methods I've never even thought of so I'm open to ideas. If it helps, a user could join probably 10-15 groups (this could change).

Comment/Reply (w/o sign-up)

yordan
Of course you don't need to store the username in the group table, because there is already a table associating the userid to his name.
I would like to know if each user is in a unique group ? Then, the table could have two colums, groupid and userid.

Comment/Reply (w/o sign-up)

FirefoxRocks
No, the user can join more than 1 group.
In another forum I was told to make a table that contains the user ID and the group ID.

Comment/Reply (w/o sign-up)

yordan
QUOTE (FirefoxRocks @ Apr 12 2009, 05:39 PM) *
No, the user can join more than 1 group.
In another forum I was told to make a table that contains the user ID and the group ID.

Correct, in a relational model, a table with userid and groupid is the best way.

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : Lists Users Tables

  1. Updating A Database's Tables - (11)
    Is there an "easy" way to update a database's tables? Like for instance, I have my own
    custom-coded member login system. Whenever I add a new feature that needs a database, I manually
    have to download, update and upload the database. Is there an easy way I can do this? THANKS!!! F...
  2. MySQL, Multiple Tables - (27)
    Ok, I'm coding a project which is a leap than what I'd normally do. Before, I've always
    learned ONE table... put EVERYTHING in one database table. I'm making a profile system so there
    needs to be at least two tables: 1 for users, 1 for content. My problem is, how do I link the two
    together? I could probably figure this out faster if someone explained and posted sample SQL code
    that shows how the two are linked together. Thanks!! F...
  3. Mysql Multiple Tables - (3)
  4. Recover Tables From A MySQL .frm File - (9)
    I have a couple of .frm files with no corresponding data or index files. Is it possible to recover
    the table structure (field names, types, sizes, rows,col, etc) from these files? The table type is
    innodb...
  5. Linking Two Tables - (12)
    I have two tables in a database. userid and usercredits In userid I have all the fields that
    identify the user (name, address etc.) In my usercredits table I have the following fields: IDNUM
    ProgramName Camp# CompletionDate Amount DatePmtSent PmtMethod Comments creditID What I would like
    to understand about my table structure, is how do I associate my credits tothe correct user. If I
    have done this correctly, there is also a field in the first table that is called IDNUM where each
    user has a unique number to identify who they are. When someone is logged into the ...
  6. Mysql Problem - Linking tables (1)
    Hello guys, I'm making a PHP/MySQL site for a friend of mine who plays an online game where you
    can create towns, add buildings to them and upgrade them to a newer level. I've offered to make
    him a small site where he can input his data into a database and keep track of his towns, buildings
    and levels. I'll show you my database design and then explain what i want to do. Table: towns
    field 1: TownID (primary key, auto-increment) field 2: TownName field 3: TownType field 4: Town
    Description Table: buildings field 1: BuildingID (primary key, auto-incremen...
  7. Script Tables On Sql Server Compact - (0)
    So I have an application that's using SQL Server Compact Edition 2005. I need to export the
    table schema to a file of SQL statements, containing only the schema...no data, no rows, just the
    tables, indexes, and constraints. Now, when using SQL 2000/2005 I just use the script table as...
    feature to do exactly this, but because SQL server Compact Edition doesn't have the support for
    it, I can't do this. The tables in SQL Server Compact *do* have the information_schema views
    though, so I was wondering if anyone knows of any tools that can read these views and...
  8. How Many Concurrent Users For Oracle Database? - This is to analyse and get perfect result for How many concurrent use (1)
    Hi friends, How many concurrent users can practically access the oracle database?
    they say tht the figure is hundreds of thousands users...is there any exact figure? or does the
    number of concurrent users depend on any other factors as wel? I think depend on parameter
    1.session 2.processes session Specific connection of a user to an Oracle instance through a user
    process. A session lasts from the time the user connects until the time the user disconnects or
    exits the database application. Multiple sessions can be created and exist concurrently for ...
  9. (help With Sql And Php)retrive Datas From Realted Tables And Display Them! - Please help me to diplay datas by combining 3 tables! (4)
    Hi all.. Please help me to write the SQL Query for the following requirement! Im having 3 MySQL
    tables Sales_users Sales_products Sales_details 1st Table (Sales_users) contains unique userID
    and username for the users! 2nd Table (Sales_products) Contains unique Product ID, product Name and
    Product Description! 3rd Table (Sales_details) contacins unique Sales ID, Product ID (Foreign Key),
    FromUser (Foreign Key) and ToUser (Foreign Key) Sales_users
    User_id name 1 Test1 ...
  10. User Priveileges Vs. Tables Vs Rows - which method is best for accounts/logins (1)
    I want to know which is the most efficient way to create accounts and logins. I have trouble
    deciding which is the better of the three: - User Priveileges - TABLES - Rows...
  11. Creating Tables In MySQL On Home Comp - (8)
    Hi, I've tried seraching for a bit, but I couldn't find an answer to my questions.
    Recently I've succesfully installed Apache on my Windows XP Machine, along with PHP and mySQL. I
    need a database on my computer for testing purposes. I've enables mySQL in PHP, and both seems
    to be working fine. I can connect to the database, but how do I edit the database? E.g., edit rows
    or modify columns. I would much rather stay away from using the command-line stuff. I'm looking
    for a GUI Query program that I can use, but I have no clue which one to choose. It ...
  12. Generating Many Tables - (2)
    I have a database that will contain 43 tables (among others). For these particular tables, they will
    each contain the same type of information, each representing a particular week in the NASCAR season.
    I used the following script to create one table: DROP TABLE IF EXISTS gulfOwnerDriversWeek1;
    CREATE TABLE gulfOwnerDriversWeek1 ( ownerIndex int primary key, driverIndex1 int, driverIndex2 int,
    driverIndex3 int, driverIndex4 int ); This table represents a draft sheet for one particular week
    (Week 1) for a particular team. My first question is, should try to put all week...
  13. Selection From Multiple Tables - (0)
    I am in the middle of creating a little forums system, and all so far is going quite well. However I
    have come across a small problem; PHP:
    --------------------------------------------------------------------------------
    $gather_forums_qry = "SELECT a.frm_id, a.frm_name, a.frm_description,
    count(distinct(b.fth_id)) ThreadCount, count(distinct(c.fpt_id))
    PostCount, a.frm_enabled, IF( IFNULL( MAX(
    b.fth_dateposted), 0) > IFNULL( MAX( c.fpt_datepo...



Looking for Lists, Of, Users,, Etc, In, Tables

See Also,

*SIMILAR VIDEOS*
Searching Video's for Lists, Of, Users,, Etc, In, Tables
advertisement



Lists Of Users, Etc In Tables

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com