Sublime directory Surf the web anonymous Pagerank Monitor


Help with database schema

concept07
Fri 17 July 2009, 11:46 am GMT +0200
here is the problem

things that need to be tracked

Number string
segment of number strings location (this will be how i segment the number string)


other things that need to be tracked
who generated the number string meaning
which stock
which industry
which market
which sector

now finally each number string needs to be tracked if it win or loss and where it won or lost at
IE
did it have a loss in
A specific stock
a specific industry
a specific market
a specific sector

Now what i am thinking is making a table for each segment number
so the table would be named segment_1 or X
and the primary key will be the exact number string segment
because that way there will not be duplicate data

now from that what i think i can do is this
is take that specific segment
in a another huge table
that stores the score of the segment meaning win and loss no change
the stock the segment came from
the industry the segment came from
the market the segment came from


Stock DB Schema

Table Stock_location
Key{symbol} | Market | Indystry | Sector

Table Stock_Data
Symbol | Date | Open | High | Low | Close | Volume | ADJ Close | other data such as day win or day loss or whatever else i want

now i can do the following either way what do u think is best or neither

Table Segment_X (x will be the total number of segments of the number string)
Number String Segment {primary key}

Table Segment_Table
Number String Segment | Win | Loss | No Change | segment location | stock symbol | industry | sector | market

_____________________________________________________________________

Or solution 2 for number string and segmentation tracking

Table Segment_Table
Segment | Segment location | Win | Loss | no score change | stock symbol | industry | sector | market

i indicated where i felt keys needed to be because some of thej data needs to be tracked and that is the best way i could think of  it

so if you have any ideas or better ways please let me nkow

Nikolas
Fri 17 July 2009, 12:27 pm GMT +0200
I am not sure what is the question here.

In general I prefer to have separate tables for every entity and then link them with joins

sfhdweb
Thu 23 December 2010, 08:39 am GMT +0100
sorry i  cant  understand you query

shania david
Thu 30 December 2010, 11:05 am GMT +0100
What do you want in this database and what are you trying to create.

mark_john
Thu 17 November 2011, 11:39 pm GMT +0100
Yes, if you update that customers address in the database, if you run that report that location will no longer be in the report.

mark_john
Fri 9 December 2011, 11:41 am GMT +0100
Database layout, normalisation and large user profile site database schema help MySQL.

hirecrishecom
Wed 21 December 2011, 07:11 am GMT +0100
What you want to exactly ???? Which kind of help you need in database schema ??

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional