473,772 Members | 2,478 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

social netwroking website - database design - online users?

1 New Member
i am trying to put together the frame work for a social networking site. no small feat :) i've been reading up n database structure, but there's one thing i wasn't able to find.

how do sites like facebook show online users?

is it simply a field in the user table that shows if they are online? how is it not slowing down the db to check a user table with over 100000 uses to see who is online?

or is there one table for online users that holds a ID number? if so, how then do we determine if the user is still active? ie, they closed the browser window without logging out?

any advice is MUCH MUCH MUCH appreciated!
Dec 18 '09 #1
1 2075
dlite922
1,584 Recognized Expert Top Contributor
You really can't. It just an assumption and a timeout, is what it comes down to.

Have a data field with the user that stores their last activity time. All queries will calculate the difference in time between that and the current time. Depending on your needs, you can adjust what this value should be, 10 minutes, 30 minutes, an hour?

That's how I'd do it.
Jan 6 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
4516
by: Rushikesh | last post by:
I am designing a WEB BASED Accounting Software with ASP and SQL Server. For this I need some help for the Database design. My design is as follows. I)User table: User_id, UserName..... Users (e.g. John Smith) Each User would contain a following Group of tables a)Customers
5
674
by: Don Vaillancourt | last post by:
Hello all, Over the years as I design more database schemas the more I come up with patterns in database design. The more patterns I recognize the more I want to try to design some kind of generic design patterns that can be used and shared amongst many sub-schemas. For example, the grouping of entities. I may have the following tables: employee, product and client. These tables have no direct relationship with each other. But...
3
1490
by: speedy | last post by:
Hi, I am creating an website which will allow users to create their own surveys.the surveys they create are then stored in a database, so that other people using the website can answer the survey and their answered surveys will also be stored in the database so that the person who originally created it can view the responses. Im having some problems deciding on the database design and just wondering if anyone can help pls The part im...
2
2025
by: CAradhana | last post by:
I am checking online shopping sites like amazon. Can anybody tell me, is there any way to get Product database structure. i.e. database design to store product category and corresponding attributes data. For all product categories there are different attributes. So how to design database accordingly and how to define attributes for the product category?
2
1167
by: alabare | last post by:
http://designcustomwebsites.com/ Website Pros, Inc. enables the small to mid size business owner to be up and running on the Web in days, not weeks! Let us do the dirty work for you. E-commerce Flash Copywriting Database Creation
1
1540
by: Jeff | last post by:
Hey asp.net 2.0 I want to populate a GridView with a list of the online users, but I'm not sure how to get the collection of online users: I tryed using this code: MembershipUserCollection onlineUsers = Membership... but I didn't find a method in the Membership class which provide a collection users!
4
1250
by: DJE | last post by:
Does it make sense to create an enterprise database design where there is 1 table for people, another for addresses, another for phones...etc. The idea is each dept would contribute to these tables and then have their own database for specific applications. I'm not a database expert but this design seems nice in theory but difficult to use. Anyone else use such a design? Do you like it?
7
1174
by: Jonathan Wood | last post by:
I've been given a spec that seems unwieldy to me. As I'm pretty new to DB design, I would appreciated any input this spec. The site has three types of users: ADMIN, RESELLERS, and CLIENTS. The database will be storing ITEMS and COLLECTIONS (COLLECTIONS are lists of the ITEMS). First, ADMIN users are to be able to create a MASTER LIST of items. Next, RESELLER users are to be able to maintain a list of ITEMS that
3
3227
ssnaik84
by: ssnaik84 | last post by:
Hi Guys, I’m developing a website (in ASP.NET MVC) which allows users to join with GFC (Google Friend Connect). But, if users want, they can maintain their personal profile on my website (like social networking sites) My question is “How I can synchronize GFC user with my website database?” that is, "how I can make an entry of GFC user into my website DB?" Thanks in adv. Swapnil
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7461
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4009
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2851
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.