Profiel van Jefferyhttp://www.facebook.com/...Foto'sWeblogLijstenMeer ![]() | Help |
|
31 oktober Sample Relational Database Model * Motor Vehicle Insurance Policy Management ScenarioI have been asked by some people interested in SQL and its design to explain a relational database model. I will try to do that here. The following data model is designed to hold information relating to Motor Vehicle Insurance Policies. For this scenario we need to define the following facts: These facts define the requirements which the Database must meet and should be agreed between the Database User and the Database Designer prior to physical creation. An insurance company writes policies for drivers. One policy can cover many drivers and also many vehicles, but a vehicle can be related to only one policy. Drivers can share one or more vehicles (e.g. a husband and wife own one vehicle and they both drive the same vehicle or a family can have multiple vehicles). The company gets a master list of violations from the Department of Motor Vehicles. These violations are then input into the system and used to determine the price of the policy. A driver may commit more than one violation. One or more drivers can commit the same violation. The system should keep a track of all customers - active (with insurance) and inactive (held in an archive – for canceled customers). All customers should be able to get a quote, insurance or cancel the insurance. The draft facts have been defined as: The Entities required should include:
The Entities are related as follows:
When asking questions of the database we may need to know:
Lets examine what the table structure might look like: 20 oktober View your Index usage statistics to better architect your environment for scaleReports index stats, index size+rows, member seek + include columns as two comma separated output columns, and index usage stats for one or more tables and/or schemas. Flexible parameterized sorting. Required Input Parameters Optional Usage:
SET ANSI_NULLS ON IF OBJECT_ID('dbo.Util_IndexUsage', 'P') IS NOT NULL DROP PROCEDURE dbo.Util_IndexUsage /** Reports index stats, index size+rows, member seek + include columns as two comma separated output columns, and index usage stats for one or more tables and/or schemas. Flexible parameterized sorting. Required Input Parameters Optional Usage:
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= CREATE PROCEDURE dbo.Util_IndexUsage SELECT --*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= 15 oktober Reflecting today on some of my favorite quotes. Decided to write a few hereIn questions of science, the authority of a thousand is not worth the humble reasoning of a single individual. You have enemies? Good. That means you've stood up for something, sometime in your life Play for more than you can afford to Patience and the mulberry leaf becomes a silk gown. Never say more than is necessary. There comes a time when one must take a position that is neither safe, nor politic, nor popular, but he must take it because his conscience tells him it is right.... That which does not kill you makes you stronger. It is better to light one candle than to curse the darkness. Anyone who has never made a mistake We always strive after what is forbidden, and desire the things refused us. The Athenians, alarmed at the internal decay of their Republic, asked Demosthenes what to do. If you don't know where you are going, When one door closes another opens. But often we look so long so regretfully upon the closed door that we fail to see the one that has opened for us. There is time for everything. Every generation laughs at the old fashions, I demolish my bridges behind me...then there is no choice but to move forward. Nothing can bring you peace but yourself. You cannot step twice into the same river, for other waters are continually flowing on. Happiness does not depend on outward things, but on the way we see them. The art of living lies less in eliminating our troubles than in growing with them. The shortest way to do many things is to do only one thing at a time. Imagination is more important than knowledge. We don't live in a world of reality, The first and greatest commandment is, 11 oktober SQL Questions answeredI have started answers questions relative to SQL on http://wiki.answer.com
I enjoy helping the community and of course, it keeps you thinking! |
|
|