Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9208729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:40:46+00:00 2026-06-18T00:40:46+00:00

I’m looking to develop a MySQL database. The main unique piece of information for

  • 0

I’m looking to develop a MySQL database. The main unique piece of information for this database will be a MAC address (eg. AA:BB:CC:DD:EE:FF). For each MAC address record, there will then be a number of subrecords which will record when these MAC addresses were recorded. So this field will be a subrecord for the MAC address if you like and will contain the following:-

  • Reference number for device that detected the MAC address
  • Date and Time
  • Longitude
  • Latitude

This will be passive data that is just continually connected from a network. Nonetheless, I’d also like to have an active table / list whereby I can specify a MAC address and if it is detected, a record is logged with the same information above.

I’m wondering what’s the best way to structure this information? I assume I would have one main table containing the MAC addresses and then a foreign key linking it to another table containing the ref number, date and time, long and lat? How is best to structure passively collating the information though and actively collating the information.

With the data collated passively, I may want to query it at some stage however with the active list (MAC addresses to look out), I want to set an email alert when these are detected and so I don’t know whether to store these separately.

Ideally I’d like to have all the data in one table for passive or active data and so I’m just wondering if I can add a further column to the main table containing the MAC address marking it as ‘active’ so that for any detections for this MAC, I can then generate code to create an email?

I hope this makes sense

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:40:47+00:00Added an answer on June 18, 2026 at 12:40 am

    I think you are on the right track. Have a primary table with the MAC addresses and an ID, then the other table could track the activity of the MAC address (ID, MAC_ID, REF_NUM, DateTime, LONG, LAT). I think having a flag in the MAC address table is a good idea to key on or you could have a separate table containing the MAC_ID (or MAC Addresses) and use it as a lookup table. You might need to create a trigger so that if a MAC Address is sent that is in the ‘watch’ table, it kicks of the insert into the ‘Active’ table which sounds like it would be a duplicate of the activity table with the REF_NUM, etc.

    Another option would be to combine the tables and just have a flag in the activity table that is checked if the MAC Address is found in the lookup table or if that row was inserted via the trigger. Just thinking out loud.

    Here’s an example of the table structures with example data:

    MAC_ADDRESSES_TABLE 
    MAC_ID (PK)     MAC_ADDRESS
    1               00-B0-D0-86-BB-F7
    2               00-B1-D0-86-BC-F8
    3               00-B2-D0-86-BD-F9
    4               00-B3-D0-86-BE-A7
    5               00-B4-D0-86-BF-A9
    …                …
    
    
    MAC_ACTIVITIES_TABLE                    
    MAC_ACTIVITY_ID (PK)    MAC_ID (FK)     REF_NUM         DATETIME      LONG          LAT
    1                              1           A1       1/20/2013 13:40   40.689060   74.044636
    2                              1           B2       1/21/2013 13:40   40.689061   74.044636
    3                              3           C3       1/22/2013 13:40   40.689062   74.044636
    4                              4           A5       1/23/2013 13:40   40.689063   74.044636
    5                              4           D9       1/24/2013 13:40   40.689064   74.044636
    …                              …           …         …                 …          …
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a view passing on information from a database: def serve_article(request, id): served_article
Let's say I'm outputting a post title and in our database, it's Hello Y’all
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.