Unix Technical Forum

standard and easy way to do schema design

This is a discussion on standard and easy way to do schema design within the MySQL forums, part of the Database Server Software category; --> I wonder instead of just brainstorming, there probably is a very standard and a simple way to do database ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 11:26 AM
Summercoolness@gmail.com
 
Posts: n/a
Default standard and easy way to do schema design

I wonder instead of just brainstorming, there probably is
a very standard and a simple way to do database schema design.

let's say we are doing a website. the user can go over
and type in the movie name and zipcode, and the website
will return all the theaters showing that movie and at what
time, for theaters in THAT zipcode only (for simplicity).

so how do we just start and use a standard method that
can be simple and very accurate to ensure good tables design?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 11:26 AM
sybrandb
 
Posts: n/a
Default Re: standard and easy way to do schema design

On Aug 15, 1:08 pm, Summercooln...@gmail.com wrote:
> I wonder instead of just brainstorming, there probably is
> a very standard and a simple way to do database schema design.
>
> let's say we are doing a website. the user can go over
> and type in the movie name and zipcode, and the website
> will return all the theaters showing that movie and at what
> time, for theaters in THAT zipcode only (for simplicity).
>
> so how do we just start and use a standard method that
> can be simple and very accurate to ensure good tables design?


The standard method is to make a functional design based upon the end-
users information needs.
The determine your entities and the relations between entities, then
you convert your entities to tables, and your functions to screens.
This is basically what products like Designer and JDeveloper do.
Entity Relationship Modeling is a department of Information Science.
What you describe is taking a pencil, sticking your thumb in the air,
and starting 'somewhere'. This is called Woodshed Modeling.
Regrettably this is how most applications are build nowadays. This
won't work, ever.

--
Sybrand Bakker
Senior Oracle DBA

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 11:26 AM
Helma
 
Posts: n/a
Default Re: standard and easy way to do schema design

On Aug 15, 1:30 pm, sybrandb <sybra...@gmail.com> wrote:
> On Aug 15, 1:08 pm, Summercooln...@gmail.com wrote:
>
> > I wonder instead of just brainstorming, there probably is
> > a very standard and a simple way to do database schema design.


Yes, the way is indeed simple. First, read books like "Handbook of
Relational Database Design"

http://www.amazon.com/Handbook-Relat...7036320&sr=1-1

After that, you need a few month of making mistakes. After that,
things become very standard and simple - just as with writing software
in general >-



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-28-2008, 11:26 AM
David Cressey
 
Posts: n/a
Default Re: standard and easy way to do schema design


<Summercoolness@gmail.com> wrote in message
news:1187176120.886269.130090@z24g2000prh.googlegr oups.com...
> I wonder instead of just brainstorming, there probably is
> a very standard and a simple way to do database schema design.
>
> let's say we are doing a website. the user can go over
> and type in the movie name and zipcode, and the website
> will return all the theaters showing that movie and at what
> time, for theaters in THAT zipcode only (for simplicity).
>
> so how do we just start and use a standard method that
> can be simple and very accurate to ensure good tables design?
>


If you want to get an overview of what data modeling and table design are
all about, take a look at the outline in this website:

http://www.utexas.edu/its/windows/da.../overview.html

These techniques are overkill for the problem you outlined. But if the
information needs grow, as they always do, you will soon be in the
territory where you need these techniques or something like them.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-28-2008, 11:26 AM
Summercoolness@gmail.com
 
Posts: n/a
Default Re: standard and easy way to do schema design

On Aug 15, 5:21 am, "David Cressey" <cresse...@verizon.net> wrote:
> <Summercooln...@gmail.com> wrote in message
>
> news:1187176120.886269.130090@z24g2000prh.googlegr oups.com...
>
> > I wonder instead of just brainstorming, there probably is
> > a very standard and a simple way to do database schema design.

>
> > let's say we are doing a website. the user can go over
> > and type in the movie name and zipcode, and the website
> > will return all the theaters showing that movie and at what
> > time, for theaters in THAT zipcode only (for simplicity).


Nowadays when I go for interviews, many interviewers hope that
I can produce a schema in just 2, 3 minutes...

So I wonder for the example above, is there a 2 minute way of thinking
to produce the solution?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-28-2008, 11:26 AM
Bob Badour
 
Posts: n/a
Default Re: standard and easy way to do schema design

Summercoolness@gmail.com wrote:

> On Aug 15, 5:21 am, "David Cressey" <cresse...@verizon.net> wrote:
>
>><Summercooln...@gmail.com> wrote in message
>>
>>news:1187176120.886269.130090@z24g2000prh.google groups.com...
>>
>>>I wonder instead of just brainstorming, there probably is
>>>a very standard and a simple way to do database schema design.

>>
>>>let's say we are doing a website. the user can go over
>>>and type in the movie name and zipcode, and the website
>>>will return all the theaters showing that movie and at what
>>>time, for theaters in THAT zipcode only (for simplicity).

>
> Nowadays when I go for interviews, many interviewers hope that
> I can produce a schema in just 2, 3 minutes...
>
> So I wonder for the example above, is there a 2 minute way of thinking
> to produce the solution?


I suggest you stop interviewing for idiots. They won't advance your
career any.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-28-2008, 11:26 AM
fitzjarrell@cox.net
 
Posts: n/a
Default Re: standard and easy way to do schema design

On Aug 15, 7:57 am, Summercooln...@gmail.com wrote:
> On Aug 15, 5:21 am, "David Cressey" <cresse...@verizon.net> wrote:
>
> > <Summercooln...@gmail.com> wrote in message

>
> >news:1187176120.886269.130090@z24g2000prh.googleg roups.com...

>
> > > I wonder instead of just brainstorming, there probably is
> > > a very standard and a simple way to do database schema design.

>
> > > let's say we are doing a website. the user can go over
> > > and type in the movie name and zipcode, and the website
> > > will return all the theaters showing that movie and at what
> > > time, for theaters in THAT zipcode only (for simplicity).

>
> Nowadays when I go for interviews, many interviewers hope that
> I can produce a schema in just 2, 3 minutes...
>
> So I wonder for the example above, is there a 2 minute way of thinking
> to produce the solution?


The less time you spend in design the more time you'll spend later in
development costs as your 'model' will show its weaknesses (such as
being totally unscalable) and require MORE work than it would have
taken to build the application properly.

I suggest you stop being lazy and start being smart.


David Fitzjarrell

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-28-2008, 11:26 AM
Doug_McMahon@yahoo.com
 
Posts: n/a
Default Re: standard and easy way to do schema design

On Aug 15, 4:08 am, Summercooln...@gmail.com wrote:
> I wonder instead of just brainstorming, there probably is
> a very standard and a simple way to do database schema design.
>
> let's say we are doing a website. the user can go over
> and type in the movie name and zipcode, and the website
> will return all the theaters showing that movie and at what
> time, for theaters in THAT zipcode only (for simplicity).
>
> so how do we just start and use a standard method that
> can be simple and very accurate to ensure good tables design?



You could start with atomic pieces of information and then look for
relationships between them. For example, list Movies, Theaters, and
ZipCodes on the board. Then it should be clear that there is a many-
to-many relationship between Movies and Theaters, so you can add a
relation for that. Then it should also be clear that there is a many-
to-one relationship between ZipCodes and Theaters, so you can create a
foreign key from Theaters to ZipCodes. It's not a substitute for real
design work, but it might be enough for the 2-minute interview quiz.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-28-2008, 11:26 AM
Captain Paralytic
 
Posts: n/a
Default Re: standard and easy way to do schema design

On 15 Aug, 16:29, "David Cressey" <cresse...@verizon.net> wrote:
> "Captain Paralytic" <paul_laut...@yahoo.com> wrote in message
>
> news:1187191510.809376.63070@b79g2000hse.googlegro ups.com...
>
>
>
>
>
> > On 15 Aug, 16:12, Doug_McMa...@yahoo.com wrote:
> > > On Aug 15, 4:08 am, Summercooln...@gmail.com wrote:

>
> > > > I wonder instead of just brainstorming, there probably is
> > > > a very standard and a simple way to do database schema design.

>
> > > > let's say we are doing a website. the user can go over
> > > > and type in the movie name and zipcode, and the website
> > > > will return all the theaters showing that movie and at what
> > > > time, for theaters in THAT zipcode only (for simplicity).

>
> > > > so how do we just start and use a standard method that
> > > > can be simple and very accurate to ensure good tables design?

>
> > > You could start with atomic pieces of information and then look for
> > > relationships between them. For example, list Movies, Theaters, and
> > > ZipCodes on the board. Then it should be clear that there is a many-
> > > to-many relationship between Movies and Theaters, so you can add a
> > > relation for that. Then it should also be clear that there is a many-
> > > to-one relationship between ZipCodes and Theaters, so you can create a
> > > foreign key from Theaters to ZipCodes. It's not a substitute for real
> > > design work, but it might be enough for the 2-minute interview quiz.

>
> > Wouldn't it be one-to-many between ZipCodes and Theatres or do you
> > really have theatres that big?

>
> I know of a theater in northern Vermont/southern Quebec that straddles the
> international border.
>
> An unusual case, though. Not worth altering the model.- Hide quoted text -
>
> - Show quoted text -


I wondor, if the 2 countries have different views on censorship, can
certain parts of a scene only be played on one part of the stage?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-28-2008, 11:26 AM
Summercoolness@gmail.com
 
Posts: n/a
Default Re: standard and easy way to do schema design


> You could start with atomic pieces of information and then look for
> relationships between them. For example, list Movies, Theaters, and
> ZipCodes on the board. Then it should be clear that there is a many-
> to-many relationship between Movies and Theaters, so you can add a
> relation for that. Then it should also be clear that there is a many-
> to-one relationship between ZipCodes and Theaters, so you can create a
> foreign key from Theaters to ZipCodes. It's not a substitute for real
> design work, but it might be enough for the 2-minute interview quiz.


will zipcode be just a property (a field) inside the theater table,
or will zipcode need to be a table itself?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:04 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com