Premium Essay

Sql Naming Tips

In:

Submitted By dmw5678
Words 398
Pages 2
Stored Procedures and Views • Do not preface a stored procedure with sp_. Commonly accepted prefixes are: 1. sp or s (vw or v for views) 2. s21 where the 21 refers to the program number that uses this SP. This has the advantage of keeping all SP's for program 21 together. • The balance of the name should include a description of its action, e.g. 1. UpdateInvoice (note the use of Proper Case and no underscores) 2. InsertEmployee 3. SelectCustomer 4. FindInvoiceItem
User Defined Functions • A prefix isn't needed for two reasons: 1. When a function is called it must be prefaced by the owner’s name, e.g. dbo.FunctionName. 2. You shouldn't be writing very many UDFs as they are inefficient.
Table Names • Table names require no prefix to identify them as their use makes it fairly obvious as long as Views have a prefix. • Use descriptive names, no abreviations and no plurals. Some writers prefer to use plural where it seems appropriate, but my quarrel with them is that it is very difficult for everyone to agree when it is appropriate. Consequently, it is easier to leave no doubt and make them singular. • Designate look-up tables with either a prefix or suffix that will always indicate the tables purpose, e.g. luTableName or TableNameLkU. • Designate many-to-many tables (conjoint table) by using an underscore between the associated table names, e.g. Product_Supplier. • Never use a name that requires the use of [ ].
Column Names • Avoid underscores, they look unnatural and slow the reader down. • Never use a column name that requires [ ]. Shame on Microsoft for excessive use of ID which requires the use of a table qualifier. • Use Proper Case, descriptive names and don't abbreviate. • Name primary keys with a suffix that denotes it data type. 1. TableNameID for integer (the preferred choice for all primary keys). 2.

Similar Documents

Free Essay

Mr. Kiran

...Modifying the parameters 14. Saving the universe Session 3 1. Introduction to Designer Module (part II) 2. Modifying LOV files 3. Solving loops 4. Creating alias and context 5. Creating Hierarchical objects 6. Creating and using Aggregate awareness Objects 7. Linking Universes 8. Exporting and importing the universes 9. Saving universe for all users 10. Migrating universe Session 4 1. Introduction to Desktop Intelligence Module (part1) 2. Creating reports using universe 3. Modifying Report Tile 4. Inserting date and time cell 5. Formatting the cell 6. Applying calculations like count, sum … 7. Inserting rows 8. Inserting columns 9. Hiding columns 10. Refreshing the document 11. Inserting, deleting, naming, renaming and duplicating reports 12. Saving...

Words: 750 - Pages: 3

Premium Essay

Information Processing

...DATABASE MODELING AND DESIGN The Morgan Kaufmann Series in Data Management Systems (Selected Titles) Joe Celko’s Data, Measurements and Standards in SQL Joe Celko Information Modeling and Relational Databases, 2nd Edition Terry Halpin, Tony Morgan Joe Celko’s Thinking in Sets Joe Celko Business Metadata Bill Inmon, Bonnie O’Neil, Lowell Fryman Unleashing Web 2.0 Gottfried Vossen, Stephan Hagemann Enterprise Knowledge Management David Loshin Business Process Change, 2nd Edition Paul Harmon IT Manager’s Handbook, 2nd Edition Bill Holtsnider & Brian Jaffe Joe Celko’s Puzzles and Answers, 2 Joe Celko nd Location-Based Services ` Jochen Schiller and Agnes Voisard Managing Time in Relational Databases: How to Design, Update and Query Temporal Data Tom Johnston and Randall Weis Database Modeling with MicrosoftW Visio for Enterprise Architects Terry Halpin, Ken Evans, Patrick Hallock, Bill Maclean Designing Data-Intensive Web Applications Stephano Ceri, Piero Fraternali, Aldo Bongio, Marco Brambilla, Sara Comai, Maristella Matera Mining the Web: Discovering Knowledge from Hypertext Data Soumen Chakrabarti Advanced SQL: 1999—Understanding Object-Relational and Other Advanced Features Jim Melton Database Tuning: Principles, Experiments, and Troubleshooting Techniques Dennis Shasha, Philippe Bonnet SQL: 1999—Understanding Relational Language Components Jim Melton, Alan R. Simon Information Visualization in Data Mining and Knowledge Discovery Edited by Usama Fayyad, Georges G. Grinstein...

Words: 89336 - Pages: 358

Premium Essay

Teach Yourself Sql

...Teach Yourself SQL in 21 Days, Second Edition Table of Contents: Introduction Week 1 at a Glance Day 1 Introduction to SQL Day 2 Introduction to the Query: The SELECT Statement Day 3 Expressions, Conditions, and Operators Day 4 Functions: Molding the Data You Retrieve Day 5 Clauses in SQL Day 6 Joining Tables Day 7 Subqueries: The Embedded SELECT Statement Week 1 in Review Week 2 at a Glance Day 8 Manipulating Data Day 9 Creating and Maintaining Tables Day 10 Creating Views and Indexes Day 11 Controlling Transactions Day 12 Database Security Day 13 Advanced SQL Topics Day 14 Dynamic Uses of SQL Week 2 in Review Week 3 at a Glance Day 15 Streamlining SQL Statements for Improved Performance Day 16 Using Views to Retrieve Useful Information from the Data Dictionary Day 17 Using SQL to Generate SQL Statements Day 18 PL/SQL: An Introduction Day 19 Transact-SQL: An Introduction Day 20 SQL*Plus Day 21 Common SQL Mistakes/Errors and Resolutions Week 3 in Review Appendixes A Glossary of Common SQL Statements B Source Code Listings for the C++ Program Used on Day 14 C Source Code Listings for the Delphi Program Used on Day 14 D Resources E ASCII Table F Answers to Quizzes and Excercises © Copyright, Macmillan Computer Publishing. All rights reserved. Teach Yourself SQL in 21 Days, Second Edition Acknowledgments A special thanks to the following individuals: foremost to my loving wife, Tina, for her tolerance and endless support, to Dan Wilson for his...

Words: 128515 - Pages: 515

Premium Essay

Imformation Systems Teach Yourself Sql

...Teach Yourself SQL in 21 Days, Second Edition Table of Contents: Introduction Week 1 at a Glance Day 1 Introduction to SQL Day 2 Introduction to the Query: The SELECT Statement Day 3 Expressions, Conditions, and Operators Day 4 Functions: Molding the Data You Retrieve Day 5 Clauses in SQL Day 6 Joining Tables Day 7 Subqueries: The Embedded SELECT Statement Week 1 in Review Week 2 at a Glance Day 8 Manipulating Data Day 9 Creating and Maintaining Tables Day 10 Creating Views and Indexes Day 11 Controlling Transactions Day 12 Database Security Day 13 Advanced SQL Topics Day 14 Dynamic Uses of SQL Week 2 in Review Week 3 at a Glance Day 15 Streamlining SQL Statements for Improved Performance Day 16 Using Views to Retrieve Useful Information from the Data Dictionary Day 17 Using SQL to Generate SQL Statements Day 18 PL/SQL: An Introduction Day 19 Transact-SQL: An Introduction Day 20 SQL*Plus Day 21 Common SQL Mistakes/Errors and Resolutions Week 3 in Review Appendixes A Glossary of Common SQL Statements B Source Code Listings for the C++ Program Used on Day 14 C Source Code Listings for the Delphi Program Used on Day 14 D Resources E ASCII Table F Answers to Quizzes and Excercises / Copyright, Macmillan Computer Publishing. All rights reserved. Join the National Guard Car Computer Serve in your own backyard Get Free Info Here. No Obligation www.military.com Complete Diagnostic Software Tool DTC Codes, Sensor Readings...

Words: 129252 - Pages: 518

Premium Essay

B2B Advantages and Disadvantages

...This page intentionally left blank Te n t h E d i t i o n MODERN DATABASE MANAGEMENT Editorial Director: Sally Yagan Editor in Chief: Eric Svendsen Executive Editor: Bob Horan Editorial Project Manager: Kelly Loftus Editorial Assistant: Jason Calcano Director of Marketing: Patrice Lumumba Jones Marketing Manager: Anne Fahlgren Marketing Assistant: Melinda Jensen Senior Managing Editor: Judy Leale Project Manager: Becca Richter Senior Operations Supervisor: Arnold Vila Operations Specialist: Ilene Kahn Senior Art Director: Jayne Conte Cover Designer: Suzanne Behnke Cover Art: Fotolia © vuifah Manager, Visual Research: Karen Sanatar Permissions Project Manager: Shannon Barbe Media Project Manager, Editorial: Denise Vaughn Media Project Manager, Production: Lisa Rinaldi Supplements Editor: Kelly Loftus Full-Service Project Management: PreMediaGlobal Composition: PreMediaGlobal Printer/Binder: Edwards Brothers Cover Printer: Lehigh-Phoenix Color/Hagerstown Text Font: Palatino Credits and acknowledgments borrowed from other sources and reproduced, with permission, in this textbook appear on appropriate page within text. Microsoft® and Windows® are registered trademarks of the Microsoft Corporation in the U.S.A. and other countries. Screen shots and icons reprinted with permission from the Microsoft Corporation. This book is not sponsored or endorsed by or affiliated with the Microsoft Corporation. Copyright © 2011, 2009, 2007, 2005, 2002...

Words: 193467 - Pages: 774

Free Essay

Oracle for Dummies

...™ Everything Easier! Making cle 11g Ora ® Learn to: • Set up and manage an Oracle database • Maintain and protect your data • Understand Oracle database architecture • Troubleshoot your database and keep it running smoothly Chris Zeis Chris Ruel Michael Wessler www.it-ebooks.info www.it-ebooks.info Oracle 11g ® FOR DUMmIES ‰ www.it-ebooks.info www.it-ebooks.info Oracle 11g ® FOR DUMmIES by Chris Zeis, Chris Ruel, and Michael Wessler ‰ www.it-ebooks.info Oracle® 11g For Dummies® Published by Wiley Publishing, Inc. 111 River Street Hoboken, NJ 07030-5774 www.wiley.com Copyright © 2009 by Wiley Publishing, Inc., Indianapolis, Indiana Published by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online...

Words: 106399 - Pages: 426

Premium Essay

Rm Avakjll

...manual complement many of the chapters of the Elmasri/Navathe text typically covered in most introductory database systems courses. Chapter Mappings The laboratory manual consists of 8 chapters and the following table shows the mapping to the chapters in the Elmasri/Navathe textbook: Laboratory Manual Chapter Elmasri/Navathe 6th Edition Chapter(s) Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapters 7, 8, and 9 Chapters 3, 6, and 26 Chapters 4, 5, and 13 Chapters 4, 5, and 14 Chapters 15 and 16 Chapter 11 Chapter 12 Chapters 13 and 14 Chapter 1 presents ERWin, a popular data modeling software that allows database designers to represent Entity-Relationship diagrams and automatically generate relational SQL code to create the database in one of several commercial relational database management systems such as Oracle or Microsoft SQLServer. The material presented in this chapter is tutorial in nature and covers the COMPANY database design of the Elmasri/Navathe text in detail. Chapter 2 presents three interpreters that can be used to execute queries in Relational Algebra, Domain Relational Calculus, and Datalog. These interpreters are part of a Java package that includes a rudimentary database engine capable of storing relations and able to perform basic relational...

Words: 18417 - Pages: 74

Free Essay

Information Technology

...CALABAR HIGH SCHOOL CSEC INFORMATION TECHNOLOGY (General Proficiency) School Based Assessment SPREADSHEET ------------------------------------------------- Description of Project It takes 90 seconds or less for a car thief to take your vehicle.  It is no longer enough to just roll-up your windows and lock your doors.  Although few stolen vehicles are recovered within 48 -72 hours, the damage has already been done.  The Spartahouse City Council in collaboration with the Spartahouse Police Department is encouraging residents to protect their vehicles. This is due to the fact that Incidents of Grand Theft Auto in the city have spiked by over 35% over the last year.  There is work to be done to educate citizens on how to protect their vehicles to reduce this particular crime even more. The council has been approached by the National Motor vehicle Theft Reduction Organization NMTRO and has planned to launch a campaign entitled “PROTECT YOUR VEHICLE". The program is specifically targeted at encouraging owners of high risk vehicles to install immobilizers and other antitheft devices. NMTRO works with other stakeholders to develop and implement countermeasures that will impede the activities of organized criminals. In the city and surrounding suburbs, any make or model of car is subject to theft.  Toyota and Nissan models made between 2005 and 2012 and Honda products are the most vulnerable for being stolen.   The City has hired a team of specialist to analyze...

Words: 2817 - Pages: 12

Premium Essay

Java Servlets

...2 4 Advanced Java Programming with Database Application Centre for Information Technology and Engineering, Manonaniam Sundaranar University CONTENTS Lecture 1 1 Data Base Management Systems Introduction Summary of DBMS Functions CODD's Rules Lecture 2 17 Structured Query Language Structured Query Language Using SQL as a Data Definition Language Using SQL as a Data Manipulation Language Using SQL as a Data Query Language Functions Lecture 3 33 JDBC Architecture Remote Database Access Lecture 4 40 JDBC Introduction Connecting to an ODBC Data Source JDBC Connection JDBC Implementation Resultset Processing: Retrieving Results Lecture 5 67 Prepared Statement Callable Statement Other JDBC Classes Moving the Cursor in Scrollable Result Sets Making Updates to Updatable Result Sets Updating a Result Set Programmatically Lecture 6 94 Introduction To Software Components Software Component Model Features of Software Component Javabean Importance of Java Component Model4 Bean Development Kit Starting the BeanBox Using The BDK Beanbox and The Demo Javabeans Centre for Information Technology and Engineering, Manonaniam Sundaranar University Lecture 7 107 Building Simple Bean Building the First Bean Event Handling Lecture 8 117 Bean Persistence Serialization and Deserialization Serializable Bean Lecture 9 130 Introspection Introspector Bean Info Simple Bean Info Feature Descriptor Bean...

Words: 31370 - Pages: 126

Free Essay

Performance Tuning for Windows Server 2008

...Performance Tuning Guidelines for Windows Server 2012 April 12, 2013 Abstract This guide describes important tuning parameters and settings that you can adjust to improve the performance and energy efficiency of the Windows Server 2012 operating system. It describes each setting and its potential effect to help you make an informed decision about its relevance to your system, workload, and performance goals. The guide is for information technology (IT) professionals and system administrators who need to tune the performance of a server that is running Windows Server 2012. For the most current version of this guide, see Performance Tuning Guidelines for Windows Server 2012. ------------------------------------------------- Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including URL and other Internet website references, may change without notice. Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here. You bear the risk of using it. ------------------------------------------------- Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred. ------------------------------------------------- This document does not provide you with any legal rights to any intellectual...

Words: 50142 - Pages: 201

Premium Essay

Study Guide

...® OCA Oracle Database 11g: SQL Fundamentals I Exam Guide (Exam 1Z0-051) ABOUT THE AUTHORS John Watson (Oxford, UK) works for BPLC Management Consultants, teaching and consulting throughout Europe and Africa. He was with Oracle University for several years in South Africa, and before that worked for a number of companies, government departments, and NGOs in England and Europe. He is OCP qualified in both database and Application Server administration. John is the author of several books and numerous articles on technology and has 25 years of experience in IT. Roopesh Ramklass (South Africa), OCP, is an independent Oracle specialist with over 10 years of experience in a wide variety of IT environments. These include software design and development, systems analysis, courseware development, and lecturing. He has worked for Oracle Support and taught at Oracle University in South Africa for several years. Roopesh is experienced in managing and executing IT development projects, including infrastructure systems provisioning, software development, and systems integration. About the Technical Editor Bruce Swart (South Africa) works for 2Cana Solutions and has over 14 years of experience in IT. Whilst maintaining a keen interest for teaching others, he has performed several roles including developer, analyst, team leader, administrator, project manager, consultant, and lecturer. He is OCP qualified in both database and developer roles. He has taught at Oracle University...

Words: 150089 - Pages: 601

Premium Essay

Tools for Business

...conduct a general study of Business Intelligence and BI systems followed by a comparison of Cognos 8 BI, Microsoft BI and SAP BW/NetWeaver. The goal was to distinguish similarities and differences between the tools regarding technique, cost, usability and educational need and to provide a mapping for different customer situations. The method consisted of a theoretical study followed by a practical part including development, testing and interviews. The comparison showed that SAP and Microsoft both use the client/server model while Cognos is an integrated web-based system built on SOA. SQL Server can only be installed on Windows while BW and Cognos also support UNIX, Linux and IBM. SSRS report formats are HTML, PDF, CSV, XML, TIFF, Word and Excel. In BW, query results can be viewed as HTML, CSV and Excel. Cognos report formats are HTML, PDF, CSV, XML and Excel. The educational need for SQL Server and Cognos is low and may often be solved internally or through e-learning. In contrast, BW uses its own terminology and the enhanced star schema,...

Words: 25350 - Pages: 102

Premium Essay

Obia Installation

...Oracle® Business Intelligence Applications Installation Guide for Informatica PowerCenter Users Release 7.9.6.4 E35271-01 November 2012 Provides the steps to install and set up Oracle Business Intelligence Applications Release 7.9.6.4. Oracle Business Intelligence Applications Installation Guide for Informatica PowerCenter Users, Release 7.9.6.4 E35271-01 Copyright © 2009, 2012, Oracle and/or its affiliates. All rights reserved. Primary Author: P Brownbridge This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed...

Words: 60905 - Pages: 244

Premium Essay

Mr S K Alam

...Code: CMA304 Computer Based Accounti ng Systems Lectu rers Name: School of Law and Business Charles Darwin University Casuarina NT 0909 Phone: (08) 8946 6830 Kevin J CLARK Asses sment T itl e DE Ll ve ~ f1L-E IttI Lodgement Date (dd/mm/yyyy) I Applied for Extension Semester : Assign ment Two - (Systems AnalysisTerm Project) Due Date (dd/mm/yyyy) Two I ;~~2 (dd/mm/yyyy) 2110912012 2110912012 N/A NO YES-to Lodgement Locations : (refer to specific lodgement requirements as set out by the lecturer) The assignment must be lodged onli ne via the Learnline Assignment Lodgement link on the Learnline site for this unit. Ensure your file is named using a file naming convention that allows the lecturer to identify to whom it belongs. Failure to use an acceptable file naming convention may result in your assignment lodgement being rejected. Refer to the endnotes of the aSSign ment detail s for lodgement options if the Learnline Assignment Lodgement link for this unit is unavailable. o 0 0 . . DO NOT LODGE BY FAX nor EMAIL nor at LECTURER'S OFFICE KEEP A COpy Ensure you have a copy of the assignment lodged. If you have submitted assessment work electronically please make sure you have a backup copy. DECLARATION BY STUDENTS I certify that this assignment is my own work, based on my own personal study and research, and that I have acknowledged all material and sources in the preparation of this assignment, whether they be books, articles...

Words: 8082 - Pages: 33

Free Essay

Security Weaknesses Top 25

...2011 CWE/SANS Top 25 Most Dangerous Software Errors Copyright © 2011 http://cwe.mitre.org/top25/ The MITRE Corporation Document version: 1.0.3 Project Coordinators: Bob Martin (MITRE) Mason Brown (SANS) Alan Paller (SANS) Dennis Kirby (SANS) Date: September 13, 2011 Document Editor: Steve Christey (MITRE) Introduction The 2011 CWE/SANS Top 25 Most Dangerous Software Errors is a list of the most widespread and critical errors that can lead to serious vulnerabilities in software. They are often easy to find, and easy to exploit. They are dangerous because they will frequently allow attackers to completely take over the software, steal data, or prevent the software from working at all. The Top 25 list is a tool for education and awareness to help programmers to prevent the kinds of vulnerabilities that plague the software industry, by identifying and avoiding all-too-common mistakes that occur before software is even shipped. Software customers can use the same list to help them to ask for more secure software. Researchers in software security can use the Top 25 to focus on a narrow but important subset of all known security weaknesses. Finally, software managers and CIOs can use the Top 25 list as a measuring stick of progress in their efforts to secure their software. The list is the result of collaboration between the SANS Institute, MITRE, and many top software security experts in the US and Europe. It leverages experiences in the development of the SANS Top 20 attack vectors...

Words: 24162 - Pages: 97