School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,175 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,547 people online right now. Registration is fast and FREE... Join Now!




How to create "children" tables from a "parent" on

 

How to create "children" tables from a "parent" on, I canīt remember for the life of me! :D

papuccino1

27 Jun, 2009 - 05:31 PM
Post #1

C# Programmer
Group Icon

Joined: 2 Mar, 2008
Posts: 945



Thanked: 33 times
Dream Kudos: 50
My Contributions
Hey guys, first time EVER posting the Database area of the forums.

I recently got tasked with making a database for some glassworks business.

I need to make a table called Client, which acts as a parent of tables RandomClient and CorporateClient.

How the heck could I sort this out guys? tongue.gif Iīm sure itīs just a few lines of code but I can't find anything online, maybe I'm just searching for the wrong keywords.

So its:


IPB Image

User is offlineProfile CardPM
+Quote Post

 
Reply to this topicStart new topic
Replies(1 - 2)

baavgai

RE: How To Create "children" Tables From A "parent" On

27 Jun, 2009 - 06:26 PM
Post #2

Dreaming Coder
Group Icon

Joined: 16 Oct, 2007
Posts: 4,351



Thanked: 412 times
Dream Kudos: 550
Expert In: C, C++, Java, C#, ASP.NET, PHP, Perl, Python, Oracle, SQL Server, MySql, HTML, JavaScript, Lua, Cheese

My Contributions
Common fields should be in Client, distinct fields in the other two.

CODE

Client
    ClientId
    Name
    Address
    
RandClient
    RandClientId
    ClientId (FK to Client)
    RandInfo

CorpClient
    CorpClientId
    ClientId (FK to Client)
    TaxId


User is offlineProfile CardPM
+Quote Post

papuccino1

RE: How To Create "children" Tables From A "parent" On

27 Jun, 2009 - 07:03 PM
Post #3

C# Programmer
Group Icon

Joined: 2 Mar, 2008
Posts: 945



Thanked: 33 times
Dream Kudos: 50
My Contributions
Baavgai, as always, my socks have been rocked.

Can I thank you enough? biggrin.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 07:17PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month