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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:58:02+00:00 2026-05-25T16:58:02+00:00

Hey today I was in a job interview where they gave us a tree

  • 0

Hey
today I was in a job interview where they gave us a tree with unknown structure(could b not binary) and i was asked to insert it to a database in a certain order where I could turn back the db into tree and show I have done it using ER model, every node in the tree has two data members data1 and data2

can someone answer or give me an hint for how it’s done ?

EDIT: what I wrote is because every child has a father we should add relation between the nodes father and son
because son has onley one father the son has a arrow one to one to his father ‘ i gave for everyy one of them an index and every sun had his father pointer and what does it got to do with the ER model ‘ i dont knoww too this is why i asked it here.

  • 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-25T16:58:03+00:00Added an answer on May 25, 2026 at 4:58 pm

    One thing you can do is to label en entire branch with an index (say 1,2,3..) and now the whole branch with a particular index can be taken as a record.
    Look over entire tree and try to find some relation between the data and assign some attribute name to every node at each level of that tree.
    Now once u have done this you can separate out what those attributes are.. and make an entity which could represent those attributes(or properties).
    Now once you your entity is decided you can make an entity and attributes in an ERD(Entity Relationship Diagram)

    if you have gone through network model of designing database then you could get some more hint

    start thinking from bottom level,then proceed towards the solution,

    Good Luck

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

Sidebar

Related Questions

Hey guys google web fonts not loading on Firefox and ie9. Yesterday they was
Hey guys I'm having such a hard time of it today. I have a
Hey there. been a busy debugger today. ill give ths short version. ive made
I was working on some code earlier today, when I realized, Hey! This code
hey, I'm wondering how to retrieve data from my database using php to get
Hey I was wondering if there was a specific query that I could enter
Hey all, I'm having a strange issue today after upgrading to the latest jqueryui.
Hey guys today I started to develop my own little alarmclock app. But now
Hey guys I am still sort of a noob but today I finished up
Hey everyone, today I'm trying to get a link to an XML file passed

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.