SQL layouts

Posted on 2014-08-07
Last Modified: 2014-08-16
As a developer, what is a good way to learning database tables layouts? There are multiple db, tables and views. What should I focus on first?
Question by:VBdotnet2005
    LVL 47

    Assisted Solution

    choose one db at a time
    investigate those tables
    then look at the views

    is this what you are looking for?
    ps: I'm not sure what you mean by "layout"

    +edit: what tools do you have to access the dbs?

    Author Comment

    I just started my new job. There are many tables, views and store procedures. I just a need good good way to approach them.

    Author Comment

    I am using Microsoft SQL Server Management Studio for 2008r2
    LVL 47

    Accepted Solution

    Diagrams are often a nice way to start with unfamiliar dbs.
    Perhaps there are already some diagrams - ask your co-workers

    Try looking at this youtube vid (esp. the beginning 2.5 minutes or so)
    LVL 23

    Assisted Solution

    I like to start with the views.  It'll give you a few ideas on how tables are joined.  Identify which tables require a foreign key from other tables.  Reports are a good source for this as well.  *Hopefully* there is some sort of consistent naming convention.  Also, look at any code that accesses the database (either stored procedures or client-side code).  The goal is try to identify the relationships, not just what data is where (that'll come to automatically later).  Use 'EXEC sp_help <object_name>' a LOT.  (EXEC sp_helptext 'proc_name' for stored procedures).
    LVL 35

    Expert Comment

    by:David Todd

    If in a MS shop, grab a copy of Viso and create a diagram or two per database and print it out. Viso can "reverse engineer" a database and show the relation between tables based on the foreign key attributes etc.

    Once you get that then take a look at a small sample of whats in the table. ie select top 100 * from dbo.sometable order by newid()


    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Introduction In my previous article ( I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
    Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now