Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. index

index

Scheduled Pinned Locked Moved Database
databasequestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SVb net
    wrote on last edited by
    #1

    what's different between index and primarykey?

    123

    J 1 Reply Last reply
    0
    • S SVb net

      what's different between index and primarykey?

      123

      J Offline
      J Offline
      John ph
      wrote on last edited by
      #2

      SVb.net wrote:

      what's different between index and primarykey?

      1. Primary Key Is A UNIQUE Constraint created against the table to uniquely identify each record in the table. 2. A table can have only one PRIMARY KEY constraint. 3. PRIMARY KEY constraint automatically creates Clustered Index against the Column. Physical order of rows is the same as the indexed order of the rows. 1.An Index is a UNIQUE Reference internally created by the Database engine against the Table or View for reference. 2. A table can have 250 Indexes (1 Clustered and 249 Non-Clustered). 3. Physical order of the rows is independent of their indexed order for Non-Clustered Indexes.

      - Regards -
         JON


      Life is not measured by the amount of breaths we take, but by the moments that take our breath away.


      X 1 Reply Last reply
      0
      • J John ph

        SVb.net wrote:

        what's different between index and primarykey?

        1. Primary Key Is A UNIQUE Constraint created against the table to uniquely identify each record in the table. 2. A table can have only one PRIMARY KEY constraint. 3. PRIMARY KEY constraint automatically creates Clustered Index against the Column. Physical order of rows is the same as the indexed order of the rows. 1.An Index is a UNIQUE Reference internally created by the Database engine against the Table or View for reference. 2. A table can have 250 Indexes (1 Clustered and 249 Non-Clustered). 3. Physical order of the rows is independent of their indexed order for Non-Clustered Indexes.

        - Regards -
           JON


        Life is not measured by the amount of breaths we take, but by the moments that take our breath away.


        X Offline
        X Offline
        Xmen Real
        wrote on last edited by
        #3

        John Prabhu wrote:

        Clustered Index against the Column

        what does it mean? can you please explain in details ?

        Becoming Programmer...

        J 1 Reply Last reply
        0
        • X Xmen Real

          John Prabhu wrote:

          Clustered Index against the Column

          what does it mean? can you please explain in details ?

          Becoming Programmer...

          J Offline
          J Offline
          John ph
          wrote on last edited by
          #4

          xmen_xwk wrote:

          can you please explain in details ?

          Initially when a new table is created, there is no index created by default. As I said in the previous post that an Index is a Reference created by the Database engine for reference, Just like an Index in the book to locate the information. there are 2 types of Indexes created in an Sql Server table - Clustered and Non-Clustered. As I said that When you create a Primary key on a table, By default a clustered Index is created on the table. A Clustered Index is similar to a dictionary. In a dictionary, the words are organized and sorted alphabetically. Same way on Clustered Index Column the records are sorted in the same order as the indexed order of the rows.

          - Regards -
             JON


          Life is not measured by the amount of breaths we take, but by the moments that take our breath away.


          X 1 Reply Last reply
          0
          • J John ph

            xmen_xwk wrote:

            can you please explain in details ?

            Initially when a new table is created, there is no index created by default. As I said in the previous post that an Index is a Reference created by the Database engine for reference, Just like an Index in the book to locate the information. there are 2 types of Indexes created in an Sql Server table - Clustered and Non-Clustered. As I said that When you create a Primary key on a table, By default a clustered Index is created on the table. A Clustered Index is similar to a dictionary. In a dictionary, the words are organized and sorted alphabetically. Same way on Clustered Index Column the records are sorted in the same order as the indexed order of the rows.

            - Regards -
               JON


            Life is not measured by the amount of breaths we take, but by the moments that take our breath away.


            X Offline
            X Offline
            Xmen Real
            wrote on last edited by
            #5

            i hope, i shall understand it soon XD

            Becoming Programmer...

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups