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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:46:27+00:00 2026-05-30T01:46:27+00:00

I am designing a database structure for a mail list The data i need

  • 0

I am designing a database structure for a mail list
The data i need to record is the mail receiver data:

Since the mail receiver data is not predefine,
it cause a problem:
for example:
some of the receiver have name, mail address, phone no
while the others have name, birthdate, mail address, gender, etc…

So my design is like this:
Table Receiver:
PK: ReceiverID
    AttributeID
    DataID

Table Attribute:
PK: AttributeID
    AttributeName

Table Data:
PK: DataID
    DataContent

A example of one receiver is:
Receiver: 1 1 1
Attribute: 1 mailAddress
Data:1 test@test.com

Receiver: 1 2 2
Attribute: 2 Name
Data:2 Tony

This cause a problem because i want to check the data field type and length, what is a better database design? Sorry about the poor description, i would clarify it if you are confused .Thanks a lot.

  • 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-05-30T01:46:28+00:00Added an answer on May 30, 2026 at 1:46 am

    Its impossible per definition to define datatypes for unknown attributes. This is just how databases work.

    I understand you want the birthday to be a DATETIME column. (and possibly other “special” datatypes for a few other attributes)

    I cannot believe the impossiblity to predefine the available attributes – they are limited. just go ahead and define a list of possible attributes.

    A better database design would be to just create a receiver table that contains all possible fields and allows them to be NULL. Using the database as a “generic storage” for arbitrary attributes is bad practice when not necessery.

    your table could look like this:

    CREATE TABLE maillist_receivers (
      id INT NOT NULL AUTO_INCREMENT, 
      PRIMARY KEY(id),
      email VARCHAR(128) NOT NULL, 
      firstname VARCHAR(128), 
      lastname VARCHAR(128), 
      phone VARCHAR(128), 
      birthdate DATETIME, 
      ...
    )
    

    And your data could look like this:

    id     firstname      lastname     email            phone      birthdate
    1      Max            Power        mp@foo.com       NULL       21.12.2012
    2      John           Doe          john@doe.com     555-1234   NULL
    
    • It performs better
    • the datatypes are well defined
    • You can check in your application code if a value is NULL and handle that accordingly. (as in: do not send birthday card, ..)
    • it is clean – you can read the plain data in a database browser
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good Day, I'm currently designing database structure for a website of mine. I need
We're designing a database in which I need to consider some FK(foreign key) constraints.
I'm designing a database for capturing clinical trial data. The data are entered twice
I am new to designing my own database. My project is orders/products/inventory type data,
We're in the process of designing a tiny database that will contain data regarding
All - I need some help designing a table for a Postgre SQL database.
I am designing a system to record and report on daily measurement data. The
I'm designing a relational database, but I'm not too much experienced, so I'd like
I'll need to represent location of some events and I am designing database schema
I am designing database tables for a master-detail scenario. The specific requirement is that

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.