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 8098805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:11:26+00:00 2026-06-05T22:11:26+00:00

I have a database that has a table email_eml that stores 3 attributes name_eml,

  • 0

I have a database that has a table email_eml that stores 3 attributes name_eml, host_eml and domain_eml. Which store email name the name of website and the domain name (like .com .net etc) It doesnt store @ or a . in any of the variables.
This allows me some flexibility (for example checking average name lenght(before the @ symbol) will be faster) . I can collect some statistics on email name, I can also create usernames from the name_eml attribute.
It however is also a burden to handle when people are submitting their email or i have to compare a whole email.
This will make me store the additional @ and . symbols and make me seperate the name through script when i want to collect statistics.

I wonder if its better to store the email in a single column instead of the 3 columns.
Is one of the ways more proper or more normalized way?

I would like the answer to include pros and cons of both approaches to storing the email adresses. (even if storing the emails in 3 columns doesnt have many pros)

  • 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-05T22:11:28+00:00Added an answer on June 5, 2026 at 10:11 pm

    It doesnt store @ or a . in any of the variables.

    Well, it should; cat.call@somedomain.com is a legal email address.

    I wonder if its better to store the email in a single column instead
    of the 3 columns. Is one of the ways more proper or more normalized
    way?

    This doesn’t have anything to do with normalization. It has to do with complex data types.

    The relational model allows arbitrarily complex data types. A commonly used complex data type is a timestamp, which typically includes year, month, day, hour, minute, second, and microsecond.

    Given a timestamp, sometimes you might need to know only the date, and sometimes you might need to know only the year or only the hour. The relational model imposes a specific burden on the dbms when dealing with complex data types. For a complex data type, the dbms is required either to return it in its entirety, or to provide functions that return its various parts. The point is that, if a user wants only the hour out of a timestamp, the user doesn’t write code to get it.

    SQL dbms have good support for timestamps; every dbms that I’m familiar with provides functions that return various parts of timestamps. None of them have native support for email addresses.

    On a SQL platform, you have at least two alternatives to keep your database close to the relational model. You can write functions that can be incorporated into the database server (if your dbms and your programming skill allows that), or you can split up the data type into pieces so each can be addressed in its entirety like any other value.

    While there are probably some data types that make sense to split like that (street addresses might be one of them), I don’t really see any compelling reason to split an email address.

    This allows me some flexibility (for example checking average name
    lenght(before the @ symbol) will be faster) . I can collect some
    statistics on email name, I can also create usernames from the
    name_eml attribute.

    While that’s true, right now I can’t imagine anything at all interesting about the average length of a username. I don’t find any of your reasons compelling, but you know more about your application than I do.

    If you really need to do a lot of operations on the pieces, it makes more sense to keep the pieces separate. More “normal” client code should access the email addresses through a view that concatenates the pieces. (Concatenation is a lot easier than parsing an email address at run time.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database structure that has a Person table which contains fields such
I have a SQL database that has a table with a field set to
I have a database table that has a Unique Key constraint defined to avoid
I have a ms access database that has one table for each photo album
I have a SQL database that has the following table: Table: PhoneRecords -------------- ID(identity
I have a database that has node & nodetype tables. Nodes table NodeID ParentNodeID
I have a table in an Oracle Database that has, among others, a DATE
I have a table within my database that has many records, some records share
I have an application that has a status table see Database best practices -
I am designing a database for a project. I have a table that has

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.