473,725 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Good Database Philosophy Book?

Looking for a book to help me develop a philosophy for building
databases (particularly on MySQL). And then taking them from concept to
construction.

Something like.... Start by asking which queries you will be performing,
then define all data needed for each of those queries, then progress to
normalize this data, etc.

Any Ideas....thanks ...

Regards,

David Thompson
President
Provoix Corporation - Business Web Solutions
www.provoix.com
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.497 / Virus Database: 296 - Release Date: 7/4/2003

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
1 4205
On Tue, 8 Jul 2003 23:21:13 +0000 (UTC), in mailing.databas e.mysql
dt*******@provo ix.com ("David Thompson") wrote:
| Looking for a book to help me develop a philosophy for building
| databases (particularly on MySQL). And then taking them from concept to
| construction.
|
| Something like.... Start by asking which queries you will be performing,
| then define all data needed for each of those queries, then progress to
| normalize this data, etc.
|
| Any Ideas....thanks ...


Step 1.
Write out a Purpose Statement for your database. The more detailed the
better.

Step 2.
On another piece of paper write out 3 headings People, Events, Things.
Scan through your Purpose Statement for keywords for each section i.e.
People: client, employees, customers
Things: Stock, Books, Inventory
Events: Sales, Hiring

Step 3.
Under these keywords, roughly, fill in some field names i.e
People: Client: ClientName, Address
Things: Books: Title, Author, Price, location, Genre
Events: Sales: Date, InvoiceNumber, Salesperson, customer info

The idea here is just to get the information while you are
concentrating on each table.

When filling in this information ask yourself - what information does
this table need to have.

Except for the Events table(s) there should be no reference /
information outside of that table i.e. a customer table will only have
the customers details, no sales information, no stock information etc.

Step 4.
Revise the fieldnames that you will be using. Break them down to the
smallest logical component i.e.
People: Client: Address breaks down to Street, Suburb, State, Zip etc
Things: Books: location could be Shelf location, warehouse bin
location etc.
Events: Sales: check that you are capturing all the information that
you require for your reports.

Refer back to your Purpose Statement for additional information that
you might have missed. Repeat step 4.

Step 5.
Revise the tables. Look for any item that might have repeating data
that could be moved to its own table. An example would be the Genre
field in the Books table. Create the table and repeat from step 3.

Step 6.
Determine the primary key for each table. If there is not an obvious
one then add a new field to the table. (see note below)

Step 7.
Grab another sheet of paper and this time draw a grid (4cols x 4Rows)
for each table. The layout should be similar to that of the table
design.

This is going to serve 2 purposes. 1) it will give you the
relationships between the tables and 2) you will see if there are any
orphaned tables.

On the top row of each grid fill in some important data fields.
Fill in some pretend data for your People and Things tables only.

Now for the Event table(s) - play computer. By this I mean pretend you
are the computer capturing the transactions. Pull information from
your other tables that match the fields on your Event table.

Don't forget to do this to other tables in the People and Things area.
Try adding a new book to the list. Does it have a reference to the
Genre table?

Once you have done that - look at how the tables 'relate' to each
other. Draw the necessary lines.

Revise your table design as necessary.

Step 8.
On another piece of paper (or spreadsheet). Write out your table names
and their fieldnames. Fill in the datatype and any formatting
consideration (phone numbers, SSN etc). Also decide on default values
for the fields.

Make sure that your primary/foreign key datatypes match.

Step 9.
Go create your database within the db application.

------------------------------------------
Defining a Primary Key.
I'll use the Customer table as an example.
Table: FirstName, LastName, DOB, Street, Suburb, State, Phone.
Ask yourself, what field; in this table; is unique to that record?

In the Customer table there are no fields that are unique because:
Several people have the same first name or last name
Customers could have the same DOB (unlikely but possible)
The same goes for the address details.
Option - create a new field.

In the Events table you might have:
Sales: InvoiceNumber, Date, EmployeeNo, Book

It is pretty obvious the unique field here.

Fieldname Naming Convention
---------------------------
These are some of the conventions I use.
You may want to prefix each non-event table Fieldname with the
tablename i.e. Cust_FirstName, Sup_SupplierNam e etc.

Never use spaces in fieldnames - use underscores (saves headaches with
queries and migration to other databases).

Use mixed casing for the fieldnames (although mySQL doesn't honor
this).

Indicate primary/foreign keys with the postfix of ID, PK or FK
i.e. Cust_Customer_I D (Customer table)
Customer_FK (Sales table)

Sample Purpose Statement
------------------------
I want to track the number of albums (CDs, LP and singles) that I own.
I want to know when and where I purchased the album and how much it
cost.
I would like to be able to search the database by Artists Name and the
music type.
I need to have a list of tracks on each album and each songs playing
time.
A nice little touch would be, I could give the album and each song a
rating value. This is so that I could create my own music cds with all
my favourites songs of a particular genre.
I store my music according to a numbering system so I need to be able
to find the album by this number also.
Another nice touch would be, friends borrow by albums so I would like
to know who has a particular album, when they borrowed it. On a
report/query only those albums that have been leant out will be
listed.
------------------------
The above gives you enough info to create the database. First create
the database with OUT the 'nice touch' items. Once designed and
completed add in the 'nice touch' features. With a good, solid design
this will not cause too much additional work.
-----------------------------------------
HTH
---------------------------------------------------------------
jn****@yourpant sbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
5823
by: Patrick K. O'Brien | last post by:
I'm looking for a good schema to use as an example for an object database system. Something like a books/authors/publishers or teachers/students/courses kind of thing. There are plenty of examples of such to be found, especially in the academic literature involving object databases, but most of them are pathetic. It's hard to take a schema seriously when it shows MarriedTeacher inheriting from Teacher, etc. I want something that makes...
226
12631
by: Stephen C. Waterbury | last post by:
This seems like it ought to work, according to the description of reduce(), but it doesn't. Is this a bug, or am I missing something? Python 2.3.2 (#1, Oct 20 2003, 01:04:35) on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> d1 = {'a':1} >>> d2 = {'b':2} >>> d3 = {'c':3}
7
3560
by: Michele Simionato | last post by:
So far, I have not installed Prothon, nor I have experience with Io, Self or other prototype-based languages. Still, from the discussion on the mailing list, I have got the strong impression that you do not actually need to fork Python in order to implement prototypes. It seems to me that Python metaclasses + descriptors are more than powerful enough to implementing prototypes in pure Python. I wrote a module that implements part of what...
0
1712
by: Rick Miller | last post by:
I'm trying to spread the word about a recently published, unique C++ text/reference book. The most frequent comment I hear regarding this book is: "I wish I had this book when I learned C++!" However, I am the author so my views on the matter are obviously jaded. The ebook/PDF edition (ISBN: 1-932504-00-1) is available at . The paperback edition will be available in October. I'd like to get the word out about this book. If you are...
7
5283
by: tada991 | last post by:
Hello Everyone, I just purchased Visual Studio .Net Architect 2003 and want to know what's a good book for begginers to start with. I know nothing about programming whatsoever, but I do have a desire to learn- as obvious with this purchase. So please let me know where I can start and thanks. Also, what newsgroup should I post my queries to?
6
2908
by: Keith Smith | last post by:
I read in a Visual Studio .NET book that with C# it is now recommended to open database connections whenever you need to query a database as opposed to the traditional method of opening a database at the start of your app and closing it at the end. Their reasoning was that "opening a database connection is no longer an expensive operation". Do you guys agree?
6
1633
by: Christoph | last post by:
I was browsing both the Amazon and Barnes & Noble websites looking for some good books but there appears to be *so* many and it's hard to tell which are going to be good or not. I'm looking for one or two *good* books on the subjects of ASP.NET and ADO.NET together. E.g., using ASP.NET on the front end to communicate with a back end database via ADO.NET. I'm hoping to find a mid-level type of book. I've been using PHP and MySQL for...
2
1521
by: mesut demir | last post by:
Dear collegeaus, I would like to learn Visual Basic.NET and working with DATABASES. My intention is making some Windows programs using Database & Internet programs using Databaseses.(SQL) I'm a 3GL programmer.... Which and What book do you advice for start learning these stuffs? I have downloaded from Microsoft site:
206
8344
by: WaterWalk | last post by:
I've just read an article "Building Robust System" by Gerald Jay Sussman. The article is here: http://swiss.csail.mit.edu/classes/symbolic/spring07/readings/robust-systems.pdf In it there is a footprint which says: "Indeed, one often hears arguments against building exibility into an engineered sys- tem. For example, in the philosophy of the computer language Python it is claimed: \There should be one|and preferably only one|obvious...
0
8889
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9179
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9116
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8099
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3228
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.