vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Terminology question: Is there a term for a set of records related directly or indirectly by key value in several tables? For example, a single invoice record and its line item records -or- a single customer, the customer's orders, the order lines for those orders, the customer's invoices, and the invoice lines for those invoices. I'm thinking the term might be graph, but I'm not at all certain of this. Thanks, Steve J |
| |||
| Steve Jorgensen wrote: > Terminology question: > > Is there a term for a set of records related directly or indirectly by key > value in several tables? For example, a single invoice record and its line > item records -or- a single customer, the customer's orders, the order lines > for those orders, the customer's invoices, and the invoice lines for those > invoices. > > I'm thinking the term might be graph, but I'm not at all certain of this. > > Thanks, > > Steve J Entity? Invoice Header + Invoice Items = Invoice. |
| |||
| On Mon, 01 Nov 2004 08:36:03 +0000, Trevor Best <nospam@besty.org.uk> wrote: >Steve Jorgensen wrote: >> Terminology question: >> >> Is there a term for a set of records related directly or indirectly by key >> value in several tables? For example, a single invoice record and its line >> item records -or- a single customer, the customer's orders, the order lines >> for those orders, the customer's invoices, and the invoice lines for those >> invoices. >> >> I'm thinking the term might be graph, but I'm not at all certain of this. >> >> Thanks, >> >> Steve J > >Entity? > >Invoice Header + Invoice Items = Invoice. I'm looking for a term that could apply to an arbitrarily complex set of items, possibly with relationships among them, but all restricted by relationship to a single key value somewhere. It could be as simple as an invoice and its lines, or it could be as complex as a virtual schema for one company in a database that supports multiple, independent companies simultaneously, each with their own product catalog, customer, invoices, etc., and with no overlap allowed between records in different companies. For example... A collection of records comprising a single Company record and all other records in all other tables that apply to that company and only that company. Company *CompanyId CompanyName Product *ProductId CompanyId ProductName (Unique CompanyId, ProductName) Customer *CustomerId CompanyId CustomerName (Unique CompanyId, CustomerName) Invoice *InvoiceId CompanyId InvoiceNumber (Unique CompanyId, InvoiceNumber) InvoiceLine *InvoiceLineId CompanyId (part of both FKs to enforce same company) InvoiceId (part FK to Invoice) ProductID (part FK to Customer) LineQty UnitCost |
| |||
| From the top of my head, this is the universal relation restricted to tuples where CompanyID = Company X The universal relation (union of all relations) is how the database would look in a completely unormalized state. for instance Company A has Employees Nick and Tom CompanyB has Employees Jerry and Scott Each company also has an address. In a normalized database you would have a table Company, for Employees and for Addresses But the universal relation would be something like this Company Address EmpName A 27 Middle St, Boston, MA, USA Nick A 27 Middle St, Boston, MA, USA Tom B 40 Edge St, Boston, MA, USA Jerry B 40 Edge St, Boston, MA, USA Scott So what you are describing is the subset of the universal relation that results from a selection on a particular value of a particular attribute. In this case where Company = A, for instance. Regards, Konstantinos "Steve Jorgensen" <nospam@nospam.nospam> wrote in message news:s1ubo0598nmheb2k8udg65djjj5032ipfv@4ax.com... > On Mon, 01 Nov 2004 08:36:03 +0000, Trevor Best <nospam@besty.org.uk> > wrote: > >>Steve Jorgensen wrote: >>> Terminology question: >>> >>> Is there a term for a set of records related directly or indirectly by >>> key >>> value in several tables? For example, a single invoice record and its >>> line >>> item records -or- a single customer, the customer's orders, the order >>> lines >>> for those orders, the customer's invoices, and the invoice lines for >>> those >>> invoices. >>> >>> I'm thinking the term might be graph, but I'm not at all certain of >>> this. >>> >>> Thanks, >>> >>> Steve J >> >>Entity? >> >>Invoice Header + Invoice Items = Invoice. > > I'm looking for a term that could apply to an arbitrarily complex set of > items, possibly with relationships among them, but all restricted by > relationship to a single key value somewhere. It could be as simple as an > invoice and its lines, or it could be as complex as a virtual schema for > one > company in a database that supports multiple, independent companies > simultaneously, each with their own product catalog, customer, invoices, > etc., > and with no overlap allowed between records in different companies. > > For example... > > A collection of records comprising a single Company record and all other > records in all other tables that apply to that company and only that > company. > > Company > *CompanyId > CompanyName > > Product > *ProductId > CompanyId > ProductName > (Unique CompanyId, ProductName) > > Customer > *CustomerId > CompanyId > CustomerName > (Unique CompanyId, CustomerName) > > Invoice > *InvoiceId > CompanyId > InvoiceNumber > (Unique CompanyId, InvoiceNumber) > > InvoiceLine > *InvoiceLineId > CompanyId (part of both FKs to enforce same company) > InvoiceId (part FK to Invoice) > ProductID (part FK to Customer) > LineQty > UnitCost |
| |||
| In article <s1ubo0598nmheb2k8udg65djjj5032ipfv@4ax.com>, nospam@nospam.nospam says... > I'm looking for a term that could apply to an arbitrarily complex set of > items, possibly with relationships among them, but all restricted by > relationship to a single key value somewhere. It's called a one to many relationship. 1 record relates to many sub-records in another table by key. -- -- spamfree999@rrohio.com (Remove 999 to reply to me) |
| |||
| Thanks, but that's too long for a term. I was looking for a term I can use to describe this concept within a larger term for a pattern related to such. I guess I'll keep using "graph" (as in "directed graph") unless someone can tell me a reason that's not an appropriate use of the term. On Mon, 1 Nov 2004 04:28:45 -0500, "Konstantinos" <noemail@noemail.net> wrote: >From the top of my head, >this is the universal relation restricted to tuples where CompanyID = >Company X > >The universal relation (union of all relations) is how the database would >look in a completely unormalized state. > >for instance Company A has Employees Nick and Tom >CompanyB has Employees Jerry and Scott >Each company also has an address. > >In a normalized database you would have a table Company, for Employees and >for Addresses >But the universal relation would be something like this > >Company Address >EmpName >A 27 Middle St, Boston, MA, USA Nick >A 27 Middle St, Boston, MA, USA Tom >B 40 Edge St, Boston, MA, USA Jerry >B 40 Edge St, Boston, MA, USA Scott > >So what you are describing is the subset of the universal relation that >results from a selection on a particular value of a particular attribute. >In this case where Company = A, for instance. > >Regards, >Konstantinos |
| |||
| On Mon, 01 Nov 2004 11:43:38 GMT, Leythos <void@nowhere.org> wrote: >In article <s1ubo0598nmheb2k8udg65djjj5032ipfv@4ax.com>, >nospam@nospam.nospam says... >> I'm looking for a term that could apply to an arbitrarily complex set of >> items, possibly with relationships among them, but all restricted by >> relationship to a single key value somewhere. > >It's called a one to many relationship. > >1 record relates to many sub-records in another table by key. Not quite. 1-m relationship does not include the idea that we're only talking about a group of records related to a single ancestor, nor the fact that if a record is reachable by more than one 1-m path such as a junction between descendents, that those must share the single starting ancestor record . |
| |||
| In article <gcico01uvomgr6su4583o7u4v795tjdac4@4ax.com>, nospam@nospam.nospam says... > On Mon, 01 Nov 2004 11:43:38 GMT, Leythos <void@nowhere.org> wrote: > > >In article <s1ubo0598nmheb2k8udg65djjj5032ipfv@4ax.com>, > >nospam@nospam.nospam says... > >> I'm looking for a term that could apply to an arbitrarily complex set of > >> items, possibly with relationships among them, but all restricted by > >> relationship to a single key value somewhere. > > > >It's called a one to many relationship. > > > >1 record relates to many sub-records in another table by key. > > Not quite. 1-m relationship does not include the idea that we're only talking > about a group of records related to a single ancestor, nor the fact that if a > record is reachable by more than one 1-m path such as a junction between > descendents, that those must share the single starting ancestor record . you're thinking at the wrong level - you just described a 1-M relationship. Your fault is in thinking too low in the tree. you can have any number of 1-m relationships with each other. -- -- spamfree999@rrohio.com (Remove 999 to reply to me) |
| |||
| Steve Jorgensen <nospam@nospam.nospam> wrote in news:s1ubo0598nmheb2k8udg65djjj5032ipfv@4ax.com: > I'm looking for a term that could apply to an arbitrarily complex > set of items, possibly with relationships among them, but all > restricted by relationship to a single key value somewhere. A database? -- David W. Fenton http://www.bway.net/~dfenton dfenton at bway dot net http://www.bway.net/~dfassoc |
| ||||
| I think that what you are talking about is actually a kind of set, rather than a kind of graph (I'll accept the overlap of concepts), but unfortunately I can't think of a simple term for the set of records that makes a complete record. :~( In other contexts, I think you'd be talking about an Object or an InfoSet. I'd think that there might also be an XML term for what you've got in mind. Graph, like Tree, can refer either to the structure or to the data contained in that structure. (A tree a simple kind of graph, a tree graph). Most database schemas are trees, but relational data is not: the type tables are branches on the schema graph, but loops on the data graph. Neither Tree nor Graph specifically indicates that only a single branch of the data is required, but to make that point, sometimes the word Forest is introduced: A Tree contains only related data, a Forest contains unrelated data. (Because the unrelated date is excluded from the graph, the graph will normally be a tree, even when taken from a relational database). Since I don't know a better word, I can't make any other suggestions, but unless your graph includes loops, I'd call it a tree. If you're feeling brave, try the question again in comp.databases (david) "Steve Jorgensen" <nospam@nospam.nospam> wrote in message news:anpao0t6qpum45rqj873q1fp5sc6h0aqqi@4ax.com... > Terminology question: > > Is there a term for a set of records related directly or indirectly by key > value in several tables? For example, a single invoice record and its line > item records -or- a single customer, the customer's orders, the order lines > for those orders, the customer's invoices, and the invoice lines for those > invoices. > > I'm thinking the term might be graph, but I'm not at all certain of this. > > Thanks, > > Steve J |